Skip to content
Snippets Groups Projects
Commit b8da3efc authored by Pospelov, Gennady's avatar Pospelov, Gennady
Browse files

Merge branch 'IconSet'

parents a71fef0f c178d871
No related branches found
No related tags found
No related merge requests found
Showing
with 102 additions and 35 deletions
......@@ -4,6 +4,7 @@
#include <QToolButton>
#include <QToolBar>
#include <QStyle>
#include <QLabel>
#include <iostream>
#include "styledbar.h"
......@@ -11,6 +12,12 @@
//! main tool bar on top of SampleView window
OutputDataToolBar::OutputDataToolBar(QWidget *parent)
: QToolBar(parent)
, m_togglePropertyPanelButton(0)
, m_toggleProjectionsButton(0)
, m_resetViewButton(0)
, m_savePlotButton(0)
{
setMovable(false);
......@@ -20,33 +27,59 @@ OutputDataToolBar::OutputDataToolBar(QWidget *parent)
setContentsMargins(0,0,0,0);
// plot properties button
m_togglePropertyPanelButton = new QToolButton;
m_togglePropertyPanelButton->setText("Plot Properties");
m_togglePropertyPanelButton->setIcon(QIcon(":/images/toolbar_propertypanel.png"));
m_togglePropertyPanelButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_togglePropertyPanelButton->setToolTip("Toggle Property Panel, Ctrl+P");
m_togglePropertyPanelButton->setShortcut(Qt::CTRL + Qt::Key_P);
connect(m_togglePropertyPanelButton, SIGNAL(clicked()), this, SIGNAL(togglePropertyPanel()));
addWidget(m_togglePropertyPanelButton);
m_togglePropertyPanelAction = new QAction(QIcon(":/SampleDesigner/images/sidebar.png"), tr("Toogle Property Panel, Ctrl+P"), this);
m_togglePropertyPanelAction->setShortcut(Qt::CTRL + Qt::Key_P);
this->connect(m_togglePropertyPanelAction, SIGNAL(triggered()), this, SIGNAL(togglePropertyPanel()));
this->addAction(m_togglePropertyPanelAction);
m_toggleProjectionsAction = new QAction(QIcon(":/SampleDesigner/images/application-resize-full.png"), tr("Toogle Projections, Ctrl+O"), this);
m_toggleProjectionsAction->setShortcut(Qt::CTRL + Qt::Key_O);
this->connect(m_toggleProjectionsAction, SIGNAL(triggered()), this, SIGNAL(toggleProjections()));
this->addAction(m_toggleProjectionsAction);
//this->addWidget(new Manhattan::StyledSeparator());
addWidget(new QLabel(" "));
addSeparator();
addWidget(new QLabel(" "));
m_resetViewAction = new QAction(QIcon(":/SampleDesigner/images/refresh.png"), tr("Reset View, Ctrl+R"), this);
m_resetViewAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_R));
this->connect(m_resetViewAction, SIGNAL(triggered()), this, SIGNAL(resetView()));
this->addAction(m_resetViewAction);
// projections button
m_toggleProjectionsButton = new QToolButton;
m_toggleProjectionsButton->setText("Projections");
m_toggleProjectionsButton->setIcon(QIcon(":/images/toolbar_projections.png"));
m_toggleProjectionsButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_toggleProjectionsButton->setToolTip("Toggle Projections, Ctrl+O");
m_toggleProjectionsButton->setShortcut(Qt::CTRL + Qt::Key_O);
connect(m_toggleProjectionsButton, SIGNAL(clicked()), this, SIGNAL(toggleProjections()));
addWidget(m_toggleProjectionsButton);
m_savePlotAction = new QAction(QIcon(":/SampleDesigner/images/filesave.png"), tr("Save, Ctrl+S"), this);
m_savePlotAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_S));
this->connect(m_savePlotAction, SIGNAL(triggered()), this, SIGNAL(savePlot()));
this->addAction(m_savePlotAction);
addWidget(new QLabel(" "));
addSeparator();
addWidget(new QLabel(" "));
// reset view button
m_resetViewButton = new QToolButton;
m_resetViewButton->setText("Reset View");
m_resetViewButton->setIcon(QIcon(":/images/toolbar_refresh.png"));
m_resetViewButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_resetViewButton->setToolTip("TReset View, Ctrl+R");
m_resetViewButton->setShortcut(Qt::CTRL + Qt::Key_R);
connect(m_resetViewButton, SIGNAL(clicked()), this, SIGNAL(resetView()));
addWidget(m_resetViewButton);
// insertSeparator(m_clearAllAction);
// Manhattan::StyledSeparator *sep = new Manhattan::StyledSeparator(this);
// addWidget(new Manhattan::StyledSeparator());
addWidget(new QLabel(" "));
addSeparator();
addWidget(new QLabel(" "));
// save plot button
m_savePlotButton = new QToolButton;
m_savePlotButton->setText("Save Plot");
m_savePlotButton->setIcon(QIcon(":/images/toolbar_save.png"));
m_savePlotButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_savePlotButton->setToolTip("Save Plot, Ctrl+S");
m_savePlotButton->setShortcut(Qt::CTRL + Qt::Key_S);
connect(m_savePlotButton, SIGNAL(clicked()), this, SIGNAL(savePlot()));
addWidget(m_savePlotButton);
addWidget(new QLabel(" "));
addSeparator();
addWidget(new QLabel(" "));
}
......@@ -7,7 +7,7 @@ class QAction;
class QToolButton;
class QToolBar;
//! main tool bar on top of SampleView window
//! main tool bar of OutputDataWidget
class OutputDataToolBar : public QToolBar
{
Q_OBJECT
......@@ -21,14 +21,12 @@ signals:
void resetView();
void savePlot();
private:
QToolButton *m_togglePropertyPanelButton;
QToolButton *m_toggleProjectionsButton;
QToolButton *m_resetViewButton;
QToolButton *m_savePlotButton;
QAction *m_togglePropertyPanelAction;
QAction *m_toggleProjectionsAction;
QAction *m_resetViewAction;
QAction *m_savePlotAction;
};
......
......@@ -61,5 +61,6 @@
<file>images/toolbar_redo.png</file>
<file>images/toolbar_unddo.png</file>
<file>images/toolbar_align.png</file>
<file>images/toolbar_recycle_dark.png</file>
</qresource>
</RCC>
GUI/coregui/Views/Components/SampleDesigner/images/toolbar_recycle_dark.png

713 B

GUI/coregui/Views/Components/widgetbox/images/Lattice2D.png

1.8 KiB

GUI/coregui/Views/Components/widgetbox/images/Transformation.png

33.1 KiB

......@@ -31,5 +31,7 @@
<file>images/ParaCrystal1D.png</file>
<file>images/ParticleLayout.png</file>
<file>images/ParticleCoreShell.png</file>
<file>images/Lattice2D.png</file>
<file>images/Transformation.png</file>
</qresource>
</RCC>
......@@ -54,7 +54,7 @@
</widget>
</categoryentry>
<categoryentry name="2D lattice" icon="images/ParaCrystal2D.png">
<categoryentry name="2D lattice" icon="images/Lattice2D.png">
<widget class="InterferenceFunction2DLattice">
<property name="objectName">
<string notr="true">somestring</string>
......@@ -231,7 +231,7 @@
<category name="Standard samples">
<categoryentry name="Example #1 (no interference)" icon="images/sample_layers2.png">
<categoryentry name="Example #1 (no interference)" icon="images/Transformation.png">
<widget class="example01">
<property name="objectName">
<string notr="true">somestring</string>
......
......@@ -25,6 +25,8 @@ InstrumentView::InstrumentView(InstrumentModel *model, QWidget *parent)
, m_stackWidget(new QStackedWidget)
, m_addInstrumentAction(0)
, m_removeInstrumentAction(0)
, m_addInstrumentButton(0)
, m_removeInstrumentButton(0)
{
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->setMargin(0);
......@@ -151,13 +153,35 @@ void InstrumentView::onRowsAboutToBeRemoved(QModelIndex parent, int first, int /
void InstrumentView::createActions()
{
m_addInstrumentAction = new QAction(QIcon(":/images/append.png"), tr("Add new instrument"), this);
m_addInstrumentButton = new QToolButton;
m_addInstrumentButton->setText("Add instrument");
m_addInstrumentButton->setIcon(QIcon(":/images/toolbar_newitem.png"));
m_addInstrumentButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_addInstrumentButton->setToolTip("Add new instrument");
connect(m_addInstrumentButton, SIGNAL(clicked()), this, SLOT(onAddInstrument()));
m_toolBar->addWidget(m_addInstrumentButton);
m_toolBar->addWidget(new QLabel(" "));
m_toolBar->addSeparator();
m_toolBar->addWidget(new QLabel(" "));
m_removeInstrumentButton = new QToolButton;
m_removeInstrumentButton->setText("Remove instrument");
m_removeInstrumentButton->setIcon(QIcon(":/SampleDesigner/images/toolbar_recycle.png"));
m_removeInstrumentButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_removeInstrumentButton->setToolTip("Remove currently selected instrument");
connect(m_removeInstrumentButton, SIGNAL(clicked()), this, SLOT(onRemoveInstrument()));
m_toolBar->addWidget(m_removeInstrumentButton);
m_toolBar->addWidget(new QLabel(" "));
m_toolBar->addSeparator();
m_toolBar->addWidget(new QLabel(" "));
m_addInstrumentAction = new QAction(QIcon(":/images/toolbar_newitem_dark.png"), tr("Add new instrument"), this);
connect(m_addInstrumentAction, SIGNAL(triggered()), this, SLOT(onAddInstrument()));
m_toolBar->addAction(m_addInstrumentAction);
m_removeInstrumentAction = new QAction(QIcon(":/images/remove.png"), tr("Remove currently selected instrument"), this);
m_removeInstrumentAction = new QAction(QIcon(":/SampleDesigner/images/toolbar_recycle_dark.png"), tr("Remove currently selected instrument"), this);
connect(m_removeInstrumentAction, SIGNAL(triggered()), this, SLOT(onRemoveInstrument()));
m_toolBar->addAction(m_removeInstrumentAction);
Q_ASSERT(m_instrumentSelector->getListView());
m_instrumentSelector->getListView()->setContextMenuPolicy(Qt::ActionsContextMenu);
......
......@@ -14,6 +14,7 @@ class QAction;
class QItemSelection;
class ParameterizedItem;
class QToolBar;
class QToolButton;
namespace Manhattan{
class StyledBar;
......@@ -46,6 +47,8 @@ private:
QMap<ParameterizedItem *, InstrumentEditorWidget *> m_instrumentToEditor;
QAction *m_addInstrumentAction;
QAction *m_removeInstrumentAction;
QToolButton *m_addInstrumentButton;
QToolButton *m_removeInstrumentButton;
QMap<QString, int> m_name_to_copy;
};
......
......@@ -30,5 +30,11 @@
<file>images/treeview-branch-more.png</file>
<file>images/treeview-branch-open.png</file>
<file>images/treeview-vline.png</file>
<file>images/toolbar_newitem.png</file>
<file>images/toolbar_newitem_dark.png</file>
<file>images/toolbar_propertypanel.png</file>
<file>images/toolbar_projections.png</file>
<file>images/toolbar_save.png</file>
<file>images/toolbar_refresh.png</file>
</qresource>
</RCC>
GUI/coregui/images/toolbar_newitem.png

613 B

GUI/coregui/images/toolbar_newitem_dark.png

708 B

GUI/coregui/images/toolbar_projections.png

510 B

GUI/coregui/images/toolbar_propertypanel.png

432 B

GUI/coregui/images/toolbar_refresh.png

720 B

GUI/coregui/images/toolbar_save.png

598 B

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment