diff --git a/src/app/mainwindow.cpp b/src/app/mainwindow.cpp index 27bdaa634..5285da6ce 100644 --- a/src/app/mainwindow.cpp +++ b/src/app/mainwindow.cpp @@ -78,7 +78,8 @@ MainWindow::MainWindow(QWidget *parent) mouseCoordinate(nullptr), helpLabel(nullptr), isInitialized(false), dialogTable(nullptr), dialogTool(nullptr), dialogHistory(nullptr), comboBoxDraws(nullptr), mode(Draw::Calculation), currentDrawIndex(0), currentToolBoxIndex(0), drawMode(true), recentFileActs(), - separatorAct(nullptr), autoSaveTimer(nullptr), guiEnabled(true), gradationHeights(nullptr), + separatorAct(nullptr), + leftGoToStage(nullptr), rightGoToStage(nullptr), autoSaveTimer(nullptr), guiEnabled(true), gradationHeights(nullptr), gradationSizes(nullptr), #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0) toolOptions(nullptr), lock(nullptr) @@ -94,6 +95,7 @@ MainWindow::MainWindow(QWidget *parent) CreateActions(); CreateMenus(); ToolBarDraws(); + ToolBarStages(); InitToolButtons(); InitScenes(); @@ -973,6 +975,18 @@ void MainWindow::SetDefaultSize(int value) } } +//--------------------------------------------------------------------------------------------------------------------- +void MainWindow::ToolBarStages() +{ + leftGoToStage = new QLabel(this); + leftGoToStage->setPixmap(QPixmap("://icon/24x24/fast_forward_left_to_right_arrow.png")); + ui->toolBarStages->insertWidget(ui->actionDetails, leftGoToStage); + + rightGoToStage = new QLabel(this); + rightGoToStage->setPixmap(QPixmap("://icon/24x24/left_to_right_arrow.png")); + ui->toolBarStages->insertWidget(ui->actionLayout, rightGoToStage); +} + //--------------------------------------------------------------------------------------------------------------------- /** * @brief ToolBarDraws enable draw toolbar. @@ -1294,6 +1308,10 @@ void MainWindow::ActionDraw(bool checked) if (checked) { qCDebug(vMainWindow, "Show draw scene"); + + leftGoToStage->setPixmap(QPixmap("://icon/24x24/fast_forward_left_to_right_arrow.png")); + rightGoToStage->setPixmap(QPixmap("://icon/24x24/left_to_right_arrow.png")); + ui->actionDetails->setChecked(false); ui->actionLayout->setChecked(false); SaveCurrentScene(); @@ -1366,6 +1384,10 @@ void MainWindow::ActionDetails(bool checked) } qCDebug(vMainWindow, "Show details scene"); + + leftGoToStage->setPixmap(QPixmap("://icon/24x24/right_to_left_arrow.png")); + rightGoToStage->setPixmap(QPixmap("://icon/24x24/left_to_right_arrow.png")); + ui->actionDraw->setChecked(false); ui->actionLayout->setChecked(false); SaveCurrentScene(); @@ -1444,6 +1466,10 @@ void MainWindow::ActionLayout(bool checked) } qCDebug(vMainWindow, "Show layout scene"); + + leftGoToStage->setPixmap(QPixmap("://icon/24x24/right_to_left_arrow.png")); + rightGoToStage->setPixmap(QPixmap("://icon/24x24/fast_forward_right_to_left_arrow.png")); + ui->actionDraw->setChecked(false); ui->actionDetails->setChecked(false); SaveCurrentScene(); diff --git a/src/app/mainwindow.h b/src/app/mainwindow.h index 9035ae906..b0db7bda5 100644 --- a/src/app/mainwindow.h +++ b/src/app/mainwindow.h @@ -206,6 +206,8 @@ private: enum { MaxRecentFiles = 5 }; QAction *recentFileActs[MaxRecentFiles]; QAction *separatorAct; + QLabel *leftGoToStage; + QLabel *rightGoToStage; QTimer *autoSaveTimer; bool guiEnabled; QComboBox *gradationHeights; @@ -216,6 +218,7 @@ private: #endif void ToolBarOption(); + void ToolBarStages(); void ToolBarDraws(); void ToolBarTools(); void InitToolButtons(); diff --git a/src/app/share/resources/icon.qrc b/src/app/share/resources/icon.qrc index fc72ccef5..f7a9d9a76 100644 --- a/src/app/share/resources/icon.qrc +++ b/src/app/share/resources/icon.qrc @@ -46,5 +46,9 @@ icon/16x16/toolsectiondetail.png icon/16x16/toolsectionlayout.png toolicon/32x32/true_darts.png + icon/24x24/fast_forward_left_to_right_arrow.png + icon/24x24/fast_forward_right_to_left_arrow.png + icon/24x24/left_to_right_arrow.png + icon/24x24/right_to_left_arrow.png diff --git a/src/app/share/resources/icon/24x24/fast_forward_left_to_right_arrow.png b/src/app/share/resources/icon/24x24/fast_forward_left_to_right_arrow.png new file mode 100644 index 000000000..93b06b6f5 Binary files /dev/null and b/src/app/share/resources/icon/24x24/fast_forward_left_to_right_arrow.png differ diff --git a/src/app/share/resources/icon/24x24/fast_forward_right_to_left_arrow.png b/src/app/share/resources/icon/24x24/fast_forward_right_to_left_arrow.png new file mode 100644 index 000000000..c220e1472 Binary files /dev/null and b/src/app/share/resources/icon/24x24/fast_forward_right_to_left_arrow.png differ diff --git a/src/app/share/resources/icon/24x24/left_to_right_arrow.png b/src/app/share/resources/icon/24x24/left_to_right_arrow.png new file mode 100644 index 000000000..54dd6c5fc Binary files /dev/null and b/src/app/share/resources/icon/24x24/left_to_right_arrow.png differ diff --git a/src/app/share/resources/icon/24x24/right_to_left_arrow.png b/src/app/share/resources/icon/24x24/right_to_left_arrow.png new file mode 100644 index 000000000..5608720a2 Binary files /dev/null and b/src/app/share/resources/icon/24x24/right_to_left_arrow.png differ