connect(model,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(changeDescr(QStandardItem*)));
QPushButton*p;
hl->addLayout(vl2=new QVBoxLayout);
- vl2->addWidget(p=new QPushButton(tr("Update Now")));
+ vl2->addWidget(p=new QPushButton(tr("&Update Now")));
connect(p,SIGNAL(clicked()),this,SLOT(forceUpdate()));
vl2->addSpacing(20);
- vl2->addWidget(p=new QPushButton(tr("Add Variant")));
+ vl2->addWidget(p=new QPushButton(tr("&Add Variant")));
connect(p,SIGNAL(clicked()),this,SLOT(addItem()));
- vl2->addWidget(p=new QPushButton(tr("Delete Variant")));
+ vl2->addWidget(p=new QPushButton(tr("&Delete Variant")));
connect(p,SIGNAL(clicked()),this,SLOT(deleteItem()));
vl2->addSpacing(20);
- vl2->addWidget(p=new QPushButton(tr("Change Flags")));
+ vl2->addWidget(p=new QPushButton(tr("Change &Flags")));
connect(p,SIGNAL(clicked()),this,SLOT(changeFlags()));
vl2->addSpacing(20);
- vl2->addWidget(p=new QPushButton(tr("Save Template...")));
+ vl2->addWidget(p=new QPushButton(tr("&Save Template...")));
connect(p,SIGNAL(clicked()),this,SLOT(saveItem()));
- vl2->addWidget(p=new QPushButton(tr("Edit Template")));
+ vl2->addWidget(p=new QPushButton(tr("&Edit Template")));
connect(p,SIGNAL(clicked()),this,SLOT(editItem()));
vl2->addStretch(1);
vl->addSpacing(15);
vl->addLayout(hl=new QHBoxLayout);
hl->addStretch(1);
- hl->addWidget(p=new QPushButton(tr("Close")));
+ hl->addWidget(p=new QPushButton(tr("&Close")));
connect(p,SIGNAL(clicked()),this,SLOT(accept()));
updateView();
MTicketEditor::MTicketEditor(QWidget* parent, Qt::WindowFlags f): QMainWindow(parent, f)
{
+ setWindowTitle(tr("Label Editor"));
//menu
QMenuBar*mb=menuBar();
QMenu*m=mb->addMenu(tr("&File"));
- m->addAction(tr("&Open File..."),this,SLOT(openFile()))
- ->setShortcut(QKeySequence(Qt::Key_Control|Qt::Key_O));
- m->addAction(tr("&Save"),this,SLOT(saveFile()))
- ->setShortcut(QKeySequence(Qt::Key_Control|Qt::Key_S));
+ m->addAction(tr("&Open File..."), this, SLOT(openFile()), tr("Ctrl+O","open file shortcut"));
+ m->addAction(tr("&Save"), this, SLOT(saveFile()), tr("Ctrl+S","save file shortcut"));
m->addAction(tr("Save &as..."),this,SLOT(saveFileAs()));
m->addSeparator();
m->addAction(tr("&Close"),this,SLOT(close()));
m=mb->addMenu(tr("&Edit"));
- QMenu *aim=m->addMenu(tr("Add Item"));
- m->addAction(tr("Remove Item"),this,SLOT(delItem()));
+ QMenu *aim=m->addMenu(tr("&Add Item"));
+ m->addAction(tr("&Remove Item"),this,SLOT(delItem()));
m->addSeparator();
- m->addAction(tr("Add File"),this,SLOT(addFile()));
- m->addAction(tr("Remove File"),this,SLOT(delFile()));
+ m->addAction(tr("Add &File"),this,SLOT(addFile()));
+ m->addAction(tr("Remove F&ile"),this,SLOT(delFile()));
QSignalMapper*map=new QSignalMapper(this);
- map->setMapping(aim->addAction(tr("Add Text Item"),map,SLOT(map())),(int)Private::Text);
- map->setMapping(aim->addAction(tr("Add Picture Item"),map,SLOT(map())),(int)Private::Picture);
- map->setMapping(aim->addAction(tr("Add Barcode Item"),map,SLOT(map())),(int)Private::Barcode);
- map->setMapping(aim->addAction(tr("Add Load Font Item"),map,SLOT(map())),(int)Private::LoadFont);
+ map->setMapping(aim->addAction(tr("Add &Text Item"),map,SLOT(map())),(int)Private::Text);
+ map->setMapping(aim->addAction(tr("Add &Picture Item"),map,SLOT(map())),(int)Private::Picture);
+ map->setMapping(aim->addAction(tr("Add &Barcode Item"),map,SLOT(map())),(int)Private::Barcode);
+ map->setMapping(aim->addAction(tr("Add &Load Font Item"),map,SLOT(map())),(int)Private::LoadFont);
connect(map,SIGNAL(mapped(int)),this,SLOT(addItem(int)));
//central