added some button icons (TODO: ok and cancel buttons)
This commit is contained in:
@ -35,7 +35,7 @@ JoyPadWidget::JoyPadWidget( JoyPad* jp, int i, QWidget* parent )
|
||||
insertCounter ++;
|
||||
}
|
||||
insertCounter += 2;
|
||||
btnClear = new QPushButton("Clear", this);
|
||||
btnClear = new QPushButton(QIcon::fromTheme("edit-clear"), "Clear", this);
|
||||
connect(btnClear, SIGNAL(clicked()), this, SLOT(clear()));
|
||||
layoutMain->addWidget(btnClear, insertCounter / 2, insertCounter % 2);
|
||||
insertCounter++;
|
||||
|
@ -11,9 +11,9 @@ LayoutManager::LayoutManager( bool useTrayIcon, const QString &devdir, const QSt
|
||||
: devdir(devdir), settingsDir(settingsDir),
|
||||
layoutGroup(new QActionGroup(this)),
|
||||
titleAction(new QAction(this)),
|
||||
updateDevicesAction(new QAction("Update &Joystick Devices",this)),
|
||||
updateLayoutsAction(new QAction("Update &Layout List",this)),
|
||||
quitAction(new QAction("&Quit",this)),
|
||||
updateDevicesAction(new QAction(QIcon::fromTheme("view-refresh"),"Update &Joystick Devices",this)),
|
||||
updateLayoutsAction(new QAction(QIcon::fromTheme("view-refresh"),"Update &Layout List",this)),
|
||||
quitAction(new QAction(QIcon::fromTheme("application-exit"),"&Quit",this)),
|
||||
le(0) {
|
||||
//prepare the popup first.
|
||||
titleAction->setEnabled(false);
|
||||
@ -326,8 +326,13 @@ void LayoutManager::fillPopup() {
|
||||
|
||||
//make a list of joystick devices
|
||||
QString title = "Joysticks: ";
|
||||
foreach (JoyPad *joypad, available) {
|
||||
title += QString("%1 ").arg(joypad->getIndex() + 1);
|
||||
if (available.isEmpty()) {
|
||||
title += "(none)";
|
||||
}
|
||||
else {
|
||||
foreach (JoyPad *joypad, available) {
|
||||
title += QString("%1 ").arg(joypad->getIndex() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
trayMenu.setTitle(title);
|
||||
|
@ -22,16 +22,16 @@ LayoutEdit::LayoutEdit( LayoutManager* l ): QWidget(NULL) {
|
||||
g->addWidget(cmbLayouts,0,0,1,4);
|
||||
|
||||
//most of these buttons can link directly into slots in the LayoutManager
|
||||
btnAdd = new QPushButton("&Add", frame);
|
||||
btnAdd = new QPushButton(QIcon::fromTheme("list-add"), "&Add", frame);
|
||||
connect(btnAdd, SIGNAL(clicked()), lm, SLOT(saveAs()));
|
||||
g->addWidget(btnAdd,1,0);
|
||||
btnRem = new QPushButton("&Remove", frame);
|
||||
btnRem = new QPushButton(QIcon::fromTheme("list-remove"), "&Remove", frame);
|
||||
connect(btnRem, SIGNAL(clicked()), lm, SLOT(remove()));
|
||||
g->addWidget(btnRem,1,1);
|
||||
btnUpd = new QPushButton("&Save", frame);
|
||||
btnUpd = new QPushButton(QIcon::fromTheme("document-save"), "&Save", frame);
|
||||
connect(btnUpd, SIGNAL(clicked()), lm, SLOT(save()));
|
||||
g->addWidget(btnUpd,1,2);
|
||||
btnRev = new QPushButton("Re&vert", frame);
|
||||
btnRev = new QPushButton(QIcon::fromTheme("document-revert"), "Re&vert", frame);
|
||||
connect(btnRev, SIGNAL(clicked()), lm, SLOT(reload()));
|
||||
g->addWidget(btnRev,1,3);
|
||||
mainLayout->addWidget( frame );
|
||||
@ -73,10 +73,10 @@ LayoutEdit::LayoutEdit( LayoutManager* l ): QWidget(NULL) {
|
||||
QHBoxLayout* h = new QHBoxLayout(0);
|
||||
h->setMargin(0);
|
||||
h->setSpacing(5);
|
||||
QPushButton* close = new QPushButton( "-- &Close Dialog --", this );
|
||||
QPushButton* close = new QPushButton(QIcon::fromTheme("window-close"), "&Close Dialog", this );
|
||||
connect(close, SIGNAL(clicked()), this, SLOT(close()));
|
||||
h->addWidget(close);
|
||||
QPushButton* quit = new QPushButton( "-- &Quit --", this );
|
||||
QPushButton* quit = new QPushButton(QIcon::fromTheme("application-exit"), "&Quit", this );
|
||||
connect( quit, SIGNAL( clicked() ), qApp, SLOT(quit()));
|
||||
h->addWidget(quit);
|
||||
mainLayout->addLayout(h);
|
||||
|
Reference in New Issue
Block a user