From f44b5bc2595da5206e4aeb5145a61c48dea1585e Mon Sep 17 00:00:00 2001 From: Rafael Date: Thu, 14 Apr 2016 01:59:41 +0200 Subject: [PATCH] Ui update --- OptionsDialog.cpp | 1 + OptionsDialog.ui | 9 +++++++++ SavegameWidget.cpp | 4 ++-- SnapmaticWidget.cpp | 4 ++-- UserInterface.cpp | 3 +++ UserInterface.ui | 33 ++++++++++++++++++++++++++------- 6 files changed, 43 insertions(+), 11 deletions(-) diff --git a/OptionsDialog.cpp b/OptionsDialog.cpp index bde5f52..c233953 100755 --- a/OptionsDialog.cpp +++ b/OptionsDialog.cpp @@ -33,6 +33,7 @@ OptionsDialog::OptionsDialog(ProfileDatabase *profileDB, QWidget *parent) : ui(new Ui::OptionsDialog) { ui->setupUi(this); + ui->tabWidget->setCurrentIndex(0); setupTreeWidget(); setupLanguageBox(); } diff --git a/OptionsDialog.ui b/OptionsDialog.ui index e0522fb..c552f87 100755 --- a/OptionsDialog.ui +++ b/OptionsDialog.ui @@ -94,6 +94,15 @@ + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + QAbstractItemView::NoEditTriggers diff --git a/SavegameWidget.cpp b/SavegameWidget.cpp index 7e43436..5e4edc8 100755 --- a/SavegameWidget.cpp +++ b/SavegameWidget.cpp @@ -196,14 +196,14 @@ void SavegameWidget::contextMenuEvent(QContextMenuEvent *ev) contextMenu.addSeparator(); if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), 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")); } else { contextMenu.addSeparator(); 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()))); contextMenu.exec(ev->globalPos()); diff --git a/SnapmaticWidget.cpp b/SnapmaticWidget.cpp index e6f146f..93a5f3b 100755 --- a/SnapmaticWidget.cpp +++ b/SnapmaticWidget.cpp @@ -213,14 +213,14 @@ void SnapmaticWidget::contextMenuEvent(QContextMenuEvent *ev) contextMenu.addSeparator(); if (!ui->cbSelected->isChecked()) { contextMenu.addAction(tr("&Select"), 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")); } else { contextMenu.addSeparator(); 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()))); contextMenu.exec(ev->globalPos()); diff --git a/UserInterface.cpp b/UserInterface.cpp index 0b51dbe..d248b36 100755 --- a/UserInterface.cpp +++ b/UserInterface.cpp @@ -46,6 +46,7 @@ UserInterface::UserInterface(ProfileDatabase *profileDB, CrewDatabase *crewDB, D profileOpen = 0; profileUI = 0; ui->menuProfile->setEnabled(false); + ui->actionSelect_profile->setEnabled(false); defaultWindowTitle = tr("gta5sync - %1"); this->setWindowTitle(defaultWindowTitle.arg(tr("Select Profile"))); @@ -173,6 +174,7 @@ void UserInterface::closeProfile() { profileOpen = false; ui->menuProfile->setEnabled(false); + ui->actionSelect_profile->setEnabled(false); ui->swProfile->removeWidget(profileUI); profileUI->deleteLater(); delete profileUI; @@ -219,6 +221,7 @@ void UserInterface::on_actionAbout_gta5sync_triggered() void UserInterface::profileLoaded() { ui->menuProfile->setEnabled(true); + ui->actionSelect_profile->setEnabled(true); } void UserInterface::on_actionSelect_all_triggered() diff --git a/UserInterface.ui b/UserInterface.ui index 70f7062..c95c803 100755 --- a/UserInterface.ui +++ b/UserInterface.ui @@ -135,7 +135,9 @@ &File + + @@ -171,12 +173,18 @@ &About gta5sync - Ctrl+A + Ctrl+P + + + - &Close + &Exit + + + Exit Ctrl+Q @@ -184,10 +192,10 @@ - Select &Profile + Close &Profile - Ctrl+P + Ctrl+End @@ -195,7 +203,7 @@ &Settings - Ctrl+O + Ctrl+S @@ -203,7 +211,7 @@ Select &All - Ctrl+S + Ctrl+A @@ -227,7 +235,7 @@ &Remove selected - Ctrl+R + Ctrl+Del @@ -238,6 +246,17 @@ Ctrl+I + + + + + + &Open File... + + + Ctrl+O + +