Ui update

This commit is contained in:
Rafael 2016-04-14 01:59:41 +02:00
parent 485771ec59
commit f44b5bc259
6 changed files with 43 additions and 11 deletions

View file

@ -33,6 +33,7 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) :
ui(new Ui::OptionsDialog) ui(new Ui::OptionsDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->tabWidget->setCurrentIndex(0);
setupTreeWidget(); setupTreeWidget();
setupLanguageBox(); setupLanguageBox();
} }

View file

@ -94,6 +94,15 @@
</property> </property>
<item> <item>
<widget class="QTreeWidget" name="twPlayers"> <widget class="QTreeWidget" name="twPlayers">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="lineWidth">
<number>0</number>
</property>
<property name="editTriggers"> <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set> <set>QAbstractItemView::NoEditTriggers</set>
</property> </property>

View file

@ -196,14 +196,14 @@ void SavegameWidget::contextMenuEvent(QContextMenuEvent *ev)
contextMenu.addSeparator(); contextMenu.addSeparator();
if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected())); } if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected())); }
if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(savegameSelected())); } if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(savegameSelected())); }
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+S")); contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
} }
else else
{ {
contextMenu.addSeparator(); contextMenu.addSeparator();
contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected())); contextMenu.addAction(tr("&Select"), this, SLOT(savegameSelected()));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+S")); contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
} }
//ui->SavegameFrame->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); //ui->SavegameFrame->setStyleSheet(QString("QFrame#SavegameFrame{background-color: rgb(%1, %2, %3)}QLabel#labSavegameStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
contextMenu.exec(ev->globalPos()); contextMenu.exec(ev->globalPos());

View file

@ -213,14 +213,14 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev)
contextMenu.addSeparator(); contextMenu.addSeparator();
if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected())); } if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected())); }
if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(pictureSelected())); } if (ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Deselect"), this, SLOT(pictureSelected())); }
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+S")); contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D")); contextMenu.addAction(tr("&Deselect All"), this, SLOT(deselectAllWidgets()), QKeySequence::fromString("Ctrl+D"));
} }
else else
{ {
contextMenu.addSeparator(); contextMenu.addSeparator();
contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected())); contextMenu.addAction(tr("&Select"), this, SLOT(pictureSelected()));
contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+S")); contextMenu.addAction(tr("Select &All"), this, SLOT(selectAllWidgets()), QKeySequence::fromString("Ctrl+A"));
} }
//ui->SnapmaticFrame->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue()))); //ui->SnapmaticFrame->setStyleSheet(QString("QFrame#SnapmaticFrame{background-color: rgb(%1, %2, %3)}QLabel#labPicStr{color: rgb(%4, %5, %6)}").arg(QString::number(highlightBackColor.red()), QString::number(highlightBackColor.green()), QString::number(highlightBackColor.blue()), QString::number(highlightTextColor.red()), QString::number(highlightTextColor.green()), QString::number(highlightTextColor.blue())));
contextMenu.exec(ev->globalPos()); contextMenu.exec(ev->globalPos());

View file

@ -46,6 +46,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D
profileOpen = 0; profileOpen = 0;
profileUI = 0; profileUI = 0;
ui->menuProfile->setEnabled(false); ui->menuProfile->setEnabled(false);
ui->actionSelect_profile->setEnabled(false);
defaultWindowTitle = tr("gta5sync - %1"); defaultWindowTitle = tr("gta5sync - %1");
this->setWindowTitle(defaultWindowTitle.arg(tr("Select Profile"))); this->setWindowTitle(defaultWindowTitle.arg(tr("Select Profile")));
@ -173,6 +174,7 @@ void UserInterface::closeProfile()
{ {
profileOpen = false; profileOpen = false;
ui->menuProfile->setEnabled(false); ui->menuProfile->setEnabled(false);
ui->actionSelect_profile->setEnabled(false);
ui->swProfile->removeWidget(profileUI); ui->swProfile->removeWidget(profileUI);
profileUI->deleteLater(); profileUI->deleteLater();
delete profileUI; delete profileUI;
@ -219,6 +221,7 @@ void UserInterface::on_actionAbout_gta5sync_triggered()
void UserInterface::profileLoaded() void UserInterface::profileLoaded()
{ {
ui->menuProfile->setEnabled(true); ui->menuProfile->setEnabled(true);
ui->actionSelect_profile->setEnabled(true);
} }
void UserInterface::on_actionSelect_all_triggered() void UserInterface::on_actionSelect_all_triggered()

View file

@ -135,7 +135,9 @@
<property name="title"> <property name="title">
<string>&amp;File</string> <string>&amp;File</string>
</property> </property>
<addaction name="actionOpen_File"/>
<addaction name="actionSelect_profile"/> <addaction name="actionSelect_profile"/>
<addaction name="separator"/>
<addaction name="actionExit"/> <addaction name="actionExit"/>
</widget> </widget>
<widget class="QMenu" name="menuHelp"> <widget class="QMenu" name="menuHelp">
@ -171,12 +173,18 @@
<string>&amp;About gta5sync</string> <string>&amp;About gta5sync</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+A</string> <string>Ctrl+P</string>
</property> </property>
</action> </action>
<action name="actionExit"> <action name="actionExit">
<property name="icon">
<iconset theme="application-exit"/>
</property>
<property name="text"> <property name="text">
<string>&amp;Close</string> <string>&amp;Exit</string>
</property>
<property name="toolTip">
<string>Exit</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+Q</string> <string>Ctrl+Q</string>
@ -184,10 +192,10 @@
</action> </action>
<action name="actionSelect_profile"> <action name="actionSelect_profile">
<property name="text"> <property name="text">
<string>Select &amp;Profile</string> <string>Close &amp;Profile</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+P</string> <string>Ctrl+End</string>
</property> </property>
</action> </action>
<action name="actionOptions"> <action name="actionOptions">
@ -195,7 +203,7 @@
<string>&amp;Settings</string> <string>&amp;Settings</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+O</string> <string>Ctrl+S</string>
</property> </property>
</action> </action>
<action name="actionSelect_all"> <action name="actionSelect_all">
@ -203,7 +211,7 @@
<string>Select &amp;All</string> <string>Select &amp;All</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+S</string> <string>Ctrl+A</string>
</property> </property>
</action> </action>
<action name="actionDeselect_all"> <action name="actionDeselect_all">
@ -227,7 +235,7 @@
<string>&amp;Remove selected</string> <string>&amp;Remove selected</string>
</property> </property>
<property name="shortcut"> <property name="shortcut">
<string>Ctrl+R</string> <string>Ctrl+Del</string>
</property> </property>
</action> </action>
<action name="action_Import"> <action name="action_Import">
@ -238,6 +246,17 @@
<string>Ctrl+I</string> <string>Ctrl+I</string>
</property> </property>
</action> </action>
<action name="actionOpen_File">
<property name="icon">
<iconset theme="document-open"/>
</property>
<property name="text">
<string>&amp;Open File...</string>
</property>
<property name="shortcut">
<string>Ctrl+O</string>
</property>
</action>
</widget> </widget>
<resources/> <resources/>
<connections> <connections>