diff --git a/app/src/MainWindow.cpp b/app/src/MainWindow.cpp index 05bcb42..f0eab1a 100644 --- a/app/src/MainWindow.cpp +++ b/app/src/MainWindow.cpp @@ -44,13 +44,19 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_Ui(new Ui::Main { m_Ui->setupUi(this); - QToolBar *actionToolbar = new QToolBar(this); - actionToolbar->setOrientation(Qt::Vertical); - actionToolbar->addAction("ACTION"); - actionToolbar->addAction("ACTION 2"); - actionToolbar->addAction("ACTION 3"); - m_Ui->leftInspectorSidePane->layout()->addWidget(actionToolbar); + auto leftSidePane = m_Ui->leftInspectorSidePane->sidePane(); + leftSidePane->addAction("ACTION L1"); + leftSidePane->addAction("ACTION L2"); + leftSidePane->addAction("ACTION L3"); + auto rightSidePane = m_Ui->rightInspectorSidePane->sidePane(); + rightSidePane->addAction("ACTION R1"); + rightSidePane->addAction("ACTION R2"); + rightSidePane->addAction("ACTION R3"); + + this->menuBar()->addAction("File"); + auto mainToolBar = this->addToolBar("MainToolBar"); + mainToolBar->addAction("A1"); /* QLopGUI::registerMenuBar(menuBar()); this->setWindowIcon(QIcon(":/sciqlopLOGO.svg")); this->m_progressWidget = new QWidget(); diff --git a/app/ui/MainWindow.ui b/app/ui/MainWindow.ui index 0928ad6..7aab4f3 100644 --- a/app/ui/MainWindow.ui +++ b/app/ui/MainWindow.ui @@ -33,12 +33,57 @@ + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + @@ -52,18 +97,82 @@ - - + + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + - + - + + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 3 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + @@ -78,13 +187,22 @@ - - - Index Viewer - - + + + VisualizationWidget + QWidget +
visualization/VisualizationWidget.h
+ 1 +
+ + SqpSidePane + QWidget +
sidepane/SqpSidePane.h
+ 1 +
+
diff --git a/gui/include/sidepane/SqpSidePane.h b/gui/include/sidepane/SqpSidePane.h new file mode 100644 index 0000000..9e0b6fb --- /dev/null +++ b/gui/include/sidepane/SqpSidePane.h @@ -0,0 +1,27 @@ +#ifndef SCIQLOP_SQPSIDEPANE_H +#define SCIQLOP_SQPSIDEPANE_H + +#include + +namespace Ui { +class SqpSidePane; +} // Ui + +class QToolBar; + +class SqpSidePane : public QWidget { + Q_OBJECT + +public: + explicit SqpSidePane(QWidget *parent = 0); + virtual ~SqpSidePane(); + + QToolBar *sidePane(); + +private: + Ui::SqpSidePane *ui; + + QToolBar *m_SidePaneToolbar; +}; + +#endif // SCIQLOP_ SQPSIDEPANE_H diff --git a/gui/src/sidepane/SqpSidePane.cpp b/gui/src/sidepane/SqpSidePane.cpp new file mode 100644 index 0000000..9214834 --- /dev/null +++ b/gui/src/sidepane/SqpSidePane.cpp @@ -0,0 +1,47 @@ +#include "sidepane/SqpSidePane.h" +#include "ui_SqpSidePane.h" + +#include +#include +#include + +namespace { +static const QString SQPSIDEPANESTYLESHEET + = "QToolBar {" + " background: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0," + " stop: 0.0 #5a5a5a," + " stop: 1.0 #414141);" + " border: none;" + " border-left: 1px solid #424242;" + "border-right: 1px solid #393939;" + " }" + + " QToolButton {" + "background: none;" + "border: none;" + " }"; +} + +SqpSidePane::SqpSidePane(QWidget *parent) : QWidget(parent), ui(new Ui::SqpSidePane) +{ + QVBoxLayout *sidePaneLayout = new QVBoxLayout(this); + sidePaneLayout->setContentsMargins(0, 0, 0, 0); + this->setLayout(sidePaneLayout); + + ui->setupUi(this); + m_SidePaneToolbar = new QToolBar(this); + m_SidePaneToolbar->setOrientation(Qt::Vertical); + sidePaneLayout->addWidget(m_SidePaneToolbar); + + m_SidePaneToolbar->setStyleSheet(SQPSIDEPANESTYLESHEET); +} + +SqpSidePane::~SqpSidePane() +{ + delete ui; +} + +QToolBar *SqpSidePane::sidePane() +{ + return m_SidePaneToolbar; +} diff --git a/gui/ui/sidepane/SqpSidePane.ui b/gui/ui/sidepane/SqpSidePane.ui new file mode 100644 index 0000000..1213ccc --- /dev/null +++ b/gui/ui/sidepane/SqpSidePane.ui @@ -0,0 +1,21 @@ + + + + + SqpSidePane + + + + 0 + 0 + 400 + 300 + + + + Form + + + + +