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