Commit 7b84e689 authored by Locatelli's avatar Locatelli
Browse files

Add dist install of the icons

parent 6c68fbbe
......@@ -12,4 +12,23 @@ proto:
protoc -I=$(NOMADSERVER_PROTO_PATH) --cpp_out=$(PROTO_GEN_PATH) $(NOMADSERVER_PROTO_PATH)/NotificationMessages.proto
protoc -I=$(NOMADSERVER_PROTO_PATH) --cpp_out=$(PROTO_GEN_PATH) $(NOMADSERVER_PROTO_PATH)/DataPlotMessages.proto
protoc -I=$(PROTO_SRC_PATH) --cpp_out=$(PROTO_GEN_PATH) $(PROTO_SRC_PATH)/AcquisitionSerializer.proto
dist_icons_DATA = \
icons/plot.png
icons/home.png \
icons/back.png \
icons/move.png \
icons/zoom_to_rect.png \
icons/grid.png \
icons/log.png \
icons/aspect_ratio.png \
icons/roi.png \
icons/statistics.png \
icons/gaussian.png \
icons/multigaussian.png \
icons/centerofmass.png \
icons/cut.png \
icons/filesave.png
\ No newline at end of file
apt install python3-pip python3-tk:amd64
pip3 intall matplotlib
\ No newline at end of file
......@@ -49,6 +49,9 @@ AC_SUBST(scriptdir)
top_srcdir=.
iconsdir=$HOME/.config/ploty2/icons
AC_SUBST(iconsdir)
AC_CONFIG_FILES([
Makefile
src/Makefile
......
icons/multigaussian.png

573 Bytes | W: | H:

icons/multigaussian.png

548 Bytes | W: | H:

icons/multigaussian.png
icons/multigaussian.png
icons/multigaussian.png
icons/multigaussian.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -222,4 +222,4 @@ test3_LDADD = $(LIBS) $(RM_LIBS) \
$(BOOST_FILESYSTEM_LIB) \
$(BOOST_THREAD_LIB) \
-lm
\ No newline at end of file
\ No newline at end of file
......@@ -41,26 +41,29 @@ QtToolBar::QtToolBar(QtWindow& qtwindow) :
// Give a name for saving settings
setObjectName("ToolBar");
QString iconspath(getenv("HOME"));
iconspath.append("/.config/ploty2/icons/");
// Home button
QIcon homeIcon("/users/locatelli/nomad/ploty2/icons/home.png");
QIcon homeIcon(iconspath + "home");
m_HomeAction.reset(addAction(homeIcon, "Reset original view"));
connect(m_HomeAction.get(), &QAction::triggered, this, &QtToolBar::home);
// Back button
QIcon backIcon("/users/locatelli/nomad/ploty2/icons/back.png");
QIcon backIcon(iconspath + "back.png");
m_BackAction.reset(addAction(backIcon, "Back to previous view"));
connect(m_BackAction.get(), &QAction::triggered, this, &QtToolBar::back);
addSeparator();
// Pan button
QIcon panIcon("/users/locatelli/nomad/ploty2/icons/move.png");
QIcon panIcon(iconspath + "move.png");
m_PanAction.reset(addAction(panIcon, "Pan axes with left mouse, zoom with right"));
m_PanAction->setCheckable(true);
connect(m_PanAction.get(), &QAction::triggered, this, &QtToolBar::pan);
// Zoom button
QIcon zoomIcon("/users/locatelli/nomad/ploty2/icons/zoom_to_rect.png");
QIcon zoomIcon(iconspath + "zoom_to_rect.png");
m_ZoomAction.reset(addAction(zoomIcon, "Zoom to rectangle"));
m_ZoomAction->setCheckable(true);
connect(m_ZoomAction.get(), &QAction::triggered, this, &QtToolBar::zoom);
......@@ -68,58 +71,58 @@ QtToolBar::QtToolBar(QtWindow& qtwindow) :
addSeparator();
// Grid button
QIcon gridIcon("/users/locatelli/nomad/ploty2/icons/grid.png");
QIcon gridIcon(iconspath + "grid.png");
m_GridAction.reset(addAction(gridIcon, "Show the plot grid"));
m_GridAction->setCheckable(true);
connect(m_GridAction.get(), &QAction::triggered, this, &QtToolBar::grid);
// Back button
QIcon logIcon("/users/locatelli/nomad/ploty2/icons/log.png");
QIcon logIcon(iconspath + "log.png");
m_LogAction.reset(addAction(logIcon, "Log data"));
m_LogAction->setCheckable(true);
connect(m_LogAction.get(), &QAction::triggered, this, &QtToolBar::log);
// Ratio button
QIcon ratioIcon("/users/locatelli/nomad/ploty2/icons/aspect_ratio.png");
QIcon ratioIcon(iconspath + "aspect_ratio.png");
m_RatioAction.reset(addAction(ratioIcon, "Show plot in aspect ratio"));
m_RatioAction->setCheckable(true);
connect(m_RatioAction.get(), &QAction::triggered, this, &QtToolBar::ratio);
addSeparator();
QIcon newroiIcon("/users/locatelli/nomad/ploty2/icons/roi.png");
QIcon newroiIcon(iconspath + "roi.png");
m_NewRoiAction.reset(addAction(newroiIcon, "Create new ROI"));
m_NewRoiAction->setVisible(false);
connect(m_NewRoiAction.get(), &QAction::triggered, this, &QtToolBar::newRoi);
QIcon statsIcon("/users/locatelli/nomad/ploty2/icons/statistics.png");
QIcon statsIcon(iconspath + "statistics.png");
m_StatisticAction.reset(addAction(statsIcon, "Select statistics"));
m_StatisticAction->setCheckable(true);
connect(m_StatisticAction.get(), &QAction::triggered, this, &QtToolBar::statistic);
QIcon gaussianFitIcon("/users/locatelli/nomad/ploty2/icons/fit.png");
QIcon gaussianFitIcon(iconspath + "gaussian.png");
m_GaussianFitAction.reset(addAction(gaussianFitIcon, "Gaussian fit"));
m_GaussianFitAction->setCheckable(true);
connect(m_GaussianFitAction.get(), &QAction::triggered, this, &QtToolBar::gaussianFit);
QIcon multigaussianFitIcon("/users/locatelli/nomad/ploty2/icons/multigaussian.png");
QIcon multigaussianFitIcon(iconspath + "multigaussian.png");
m_MultiGaussianFitAction.reset(addAction(multigaussianFitIcon, "Multi Gaussian fit"));
m_MultiGaussianFitAction->setCheckable(true);
connect(m_MultiGaussianFitAction.get(), &QAction::triggered, this, &QtToolBar::multiGaussianFit);
QIcon centerOfMassIcon("/users/locatelli/nomad/ploty2/icons/fit.png");
QIcon centerOfMassIcon(iconspath + "centerofmass.png");
m_CenterOfMassAction.reset(addAction(centerOfMassIcon, "Center Of Mass"));
m_CenterOfMassAction->setCheckable(true);
connect(m_CenterOfMassAction.get(), &QAction::triggered, this, &QtToolBar::centerOfMass);
QIcon cutIcon("/users/locatelli/nomad/ploty2/icons/cut.png");
QIcon cutIcon(iconspath + "cut.png");
m_CutAction.reset(addAction(cutIcon, "Cut"));
m_CutAction->setCheckable(true);
connect(m_CutAction.get(), &QAction::triggered, this, &QtToolBar::cut);
addSeparator();
QIcon filesaveIcon("/users/locatelli/nomad/ploty2/icons/filesave.png");
QIcon filesaveIcon(iconspath + "filesave.png");
m_FileSaveAction.reset(addAction(filesaveIcon, "Save the figure"));
connect(m_FileSaveAction.get(), &QAction::triggered, this, &QtToolBar::filesave);
......
......@@ -57,8 +57,11 @@ QtWindow::QtWindow(uint32 plotid, QWidget* plotcanvas, QApplication& app, std::s
QWidget* widget = new QWidget();
setCentralWidget(widget);
QString iconspath(getenv("HOME"));
iconspath.append("/.config/ploty2/icons/");
// Set window icon
QIcon plotIcon("/usr/share/icons/Ploty2/plot.png");
QIcon plotIcon(iconspath + "plot.png");
setWindowIcon(plotIcon);
// Create Toolbar
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment