Added more button icons to Qt gui game pad and palette config windows.

This commit is contained in:
mjbudd77 2020-12-13 17:48:51 -05:00
parent 380fc72917
commit 6f78a086d2
2 changed files with 15 additions and 0 deletions

View File

@ -81,9 +81,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
QPushButton *closebutton; QPushButton *closebutton;
QPushButton *clearButton[GAMEPAD_NUM_BUTTONS]; QPushButton *clearButton[GAMEPAD_NUM_BUTTONS];
QScrollArea *scroll; QScrollArea *scroll;
QStyle *style;
std::string prefix; std::string prefix;
char stmp[256]; char stmp[256];
style = this->style();
gamePadConfWin = this; gamePadConfWin = this;
// Ensure that joysticks are enabled, no harm calling init again. // Ensure that joysticks are enabled, no harm calling init again.
@ -174,10 +177,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
applyProfileButton = new QPushButton( tr("Load") ); applyProfileButton = new QPushButton( tr("Load") );
applyProfileButton->setWhatsThis(tr("Sets Current Active Map to the Selected Profile")); applyProfileButton->setWhatsThis(tr("Sets Current Active Map to the Selected Profile"));
applyProfileButton->setIcon( style->standardIcon( QStyle::SP_DialogApplyButton ) );
hbox->addWidget( applyProfileButton ); hbox->addWidget( applyProfileButton );
saveProfileButton = new QPushButton( tr("Save") ); saveProfileButton = new QPushButton( tr("Save") );
saveProfileButton->setWhatsThis(tr("Stores Current Active Map to the Selected Profile")); saveProfileButton->setWhatsThis(tr("Stores Current Active Map to the Selected Profile"));
saveProfileButton->setIcon( style->standardIcon( QStyle::SP_DialogSaveButton ) );
hbox->addWidget( saveProfileButton ); hbox->addWidget( saveProfileButton );
hbox = new QHBoxLayout(); hbox = new QHBoxLayout();
@ -185,10 +190,12 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
newProfileButton = new QPushButton( tr("New") ); newProfileButton = new QPushButton( tr("New") );
newProfileButton->setWhatsThis(tr("Create a New Map Profile")); newProfileButton->setWhatsThis(tr("Create a New Map Profile"));
newProfileButton->setIcon( style->standardIcon( QStyle::SP_FileIcon ) );
hbox->addWidget( newProfileButton ); hbox->addWidget( newProfileButton );
removeProfileButton = new QPushButton( tr("Delete") ); removeProfileButton = new QPushButton( tr("Delete") );
removeProfileButton->setWhatsThis(tr("Deletes the Selected Map Profile")); removeProfileButton->setWhatsThis(tr("Deletes the Selected Map Profile"));
removeProfileButton->setIcon( style->standardIcon( QStyle::SP_TrashIcon ) );
hbox->addWidget( removeProfileButton ); hbox->addWidget( removeProfileButton );
mapMsg = new QLabel(); mapMsg = new QLabel();
@ -242,6 +249,9 @@ GamePadConfDialog_t::GamePadConfDialog_t(QWidget *parent)
clearAllButton = new QPushButton(tr("Clear All")); clearAllButton = new QPushButton(tr("Clear All"));
closebutton = new QPushButton(tr("Close")); closebutton = new QPushButton(tr("Close"));
clearAllButton->setIcon( style->standardIcon( QStyle::SP_LineEditClearButton ) );
closebutton->setIcon( style->standardIcon( QStyle::SP_DialogCloseButton ) );
hbox4->addWidget( clearAllButton ); hbox4->addWidget( clearAllButton );
hbox4->addWidget( closebutton ); hbox4->addWidget( closebutton );

View File

@ -32,10 +32,13 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
//QPushButton *closebutton; //QPushButton *closebutton;
QPushButton *button; QPushButton *button;
QTextEdit *comments; QTextEdit *comments;
QStyle *style;
int hue, tint; int hue, tint;
char stmp[64]; char stmp[64];
std::string paletteFile; std::string paletteFile;
style = this->style();
resize( 512, 600 ); resize( 512, 600 );
// sync with config // sync with config
@ -63,6 +66,7 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
connect(deemphSwap, SIGNAL(stateChanged(int)), this, SLOT(deemphswap_Changed(int)) ); connect(deemphSwap, SIGNAL(stateChanged(int)), this, SLOT(deemphswap_Changed(int)) );
button = new QPushButton( tr("Open Palette") ); button = new QPushButton( tr("Open Palette") );
button->setIcon( style->standardIcon( QStyle::SP_FileDialogStart ) );
hbox1->addWidget( button ); hbox1->addWidget( button );
connect( button, SIGNAL(clicked(void)), this, SLOT(openPaletteFile(void)) ); connect( button, SIGNAL(clicked(void)), this, SLOT(openPaletteFile(void)) );
@ -81,6 +85,7 @@ PaletteConfDialog_t::PaletteConfDialog_t(QWidget *parent)
button = new QPushButton( tr("Clear") ); button = new QPushButton( tr("Clear") );
button->setIcon( style->standardIcon( QStyle::SP_LineEditClearButton ) );
hbox1->addWidget( button ); hbox1->addWidget( button );
connect( button, SIGNAL(clicked(void)), this, SLOT(clearPalette(void)) ); connect( button, SIGNAL(clicked(void)), this, SLOT(clearPalette(void)) );