mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-06-06 15:12:42 +02:00
Update MacroCart editor
This commit is contained in:
parent
e5afe1eac7
commit
1115af238d
@ -107,7 +107,7 @@ MacroCart::MacroCart(RDCart *cart,QWidget *parent)
|
||||
rdcart_macro_list->setGeometry(100,0,430,sizeHint().height());
|
||||
rdcart_macro_list->setAllColumnsShowFocus(true);
|
||||
rdcart_macro_list->setItemMargin(5);
|
||||
rdcart_macro_list->setSorting(0);
|
||||
rdcart_macro_list->setSorting(-1);
|
||||
connect(rdcart_macro_list,
|
||||
SIGNAL(doubleClicked(Q3ListViewItem *,const QPoint &,int)),
|
||||
this,
|
||||
@ -195,9 +195,6 @@ void MacroCart::addMacroData()
|
||||
unsigned line;
|
||||
|
||||
if(item==NULL) {
|
||||
return;
|
||||
}
|
||||
if(item->text(0).isEmpty()) {
|
||||
line=rdcart_events->size();
|
||||
}
|
||||
else {
|
||||
@ -309,13 +306,12 @@ void MacroCart::RefreshList()
|
||||
{
|
||||
Q3ListViewItem *item;
|
||||
|
||||
item=new Q3ListViewItem(rdcart_macro_list);
|
||||
item->setText(1,tr("--- End of cart ---"));
|
||||
for(int i=0;i<rdcart_events->size();i++) {
|
||||
item=new Q3ListViewItem(rdcart_macro_list);
|
||||
item->setText(0,QString().sprintf("%03d",i+1));
|
||||
item->setText(1,rdcart_events->command(i)->toString());
|
||||
}
|
||||
SortLines();
|
||||
}
|
||||
|
||||
|
||||
@ -323,9 +319,17 @@ void MacroCart::RefreshLine(Q3ListViewItem *item)
|
||||
{
|
||||
int line=item->text(0).toInt()-1;
|
||||
item->setText(1,rdcart_events->command(line)->toString());
|
||||
SortLines();
|
||||
}
|
||||
|
||||
|
||||
void MacroCart::SortLines()
|
||||
{
|
||||
rdcart_macro_list->setSorting(0);
|
||||
rdcart_macro_list->sort();
|
||||
rdcart_macro_list->setSorting(-1);
|
||||
}
|
||||
|
||||
void MacroCart::AddLine(unsigned line,RDMacro *cmd)
|
||||
{
|
||||
unsigned curr_line;
|
||||
|
@ -68,6 +68,7 @@ class MacroCart : public QWidget
|
||||
void AddLine(unsigned line,RDMacro *cmd);
|
||||
void DeleteLine(Q3ListViewItem *item);
|
||||
void UpdateLength();
|
||||
void SortLines();
|
||||
RDCart *rdcart_cart;
|
||||
Q3ListView *rdcart_macro_list;
|
||||
QLabel *rdcart_macro_list_label;
|
||||
|
@ -1140,7 +1140,7 @@ vozík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>--- Konec vozíku ---</translation>
|
||||
<translation type="obsolete">--- Konec vozíku ---</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
@ -1128,7 +1128,7 @@ starten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>--- Ende des Carts ---</translation>
|
||||
<translation type="obsolete">--- Ende des Carts ---</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
@ -1137,7 +1137,7 @@ Cartucho</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>--- Fin del cartucho ---</translation>
|
||||
<translation type="obsolete">--- Fin del cartucho ---</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
@ -938,10 +938,6 @@ Line</source>
|
||||
Cart</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
<translation type="unfinished"></translation>
|
||||
|
@ -1124,7 +1124,7 @@ korg</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>--- Slutten på korga ---</translation>
|
||||
<translation type="obsolete">--- Slutten på korga ---</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
@ -1124,7 +1124,7 @@ korg</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>--- Slutten på korga ---</translation>
|
||||
<translation type="obsolete">--- Slutten på korga ---</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
@ -1126,7 +1126,7 @@ Cartão</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>--- End of cart ---</source>
|
||||
<translation>-- Fim do Cartão --</translation>
|
||||
<translation type="obsolete">-- Fim do Cartão --</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Line</source>
|
||||
|
Loading…
x
Reference in New Issue
Block a user