-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Split UI into ShapePopulationQT and ShapePopulationMainWindowQT
See #127
- Loading branch information
Showing
8 changed files
with
216 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
#include "ShapePopulationMainWindowQT.h" | ||
#include "ShapePopulationQT.h" | ||
|
||
ShapePopulationMainWindowQT::ShapePopulationMainWindowQT() | ||
{ | ||
this->setupUi(this); | ||
|
||
this->menuFile->addAction(this->shapePopulation()->actionOpen_Directory); | ||
this->menuFile->addAction(this->shapePopulation()->actionOpen_VTK_Files); | ||
this->menuFile->addAction(this->shapePopulation()->actionLoad_CSV); | ||
this->menuFile->addSeparator(); | ||
this->menuFile->addMenu(this->menuExport); | ||
this->menuFile->addSeparator(); | ||
this->menuFile->addAction(this->shapePopulation()->actionDelete); | ||
this->menuFile->addAction(this->shapePopulation()->actionDelete_All); | ||
this->menuFile->addSeparator(); | ||
this->menuFile->addAction(this->actionExit); | ||
|
||
this->menuExport->addAction(this->shapePopulation()->actionTo_PDF); | ||
this->menuExport->addAction(this->shapePopulation()->actionTo_PS); | ||
this->menuExport->addAction(this->shapePopulation()->actionTo_EPS); | ||
this->menuExport->addAction(this->shapePopulation()->actionTo_TEX); | ||
this->menuExport->addAction(this->shapePopulation()->actionTo_SVG); | ||
|
||
this->menuOptions->addAction(this->shapePopulation()->actionCameraConfig); | ||
this->menuOptions->addAction(this->shapePopulation()->actionBackgroundConfig); | ||
this->menuOptions->addSeparator(); | ||
this->menuOptions->addAction(this->shapePopulation()->actionLoad_Colorbar); | ||
this->menuOptions->addAction(this->shapePopulation()->actionSave_Colorbar); | ||
|
||
// Menu signals | ||
connect(this->actionExit, SIGNAL(triggered()), qApp, SLOT(quit())); | ||
|
||
#if defined(Q_OS_UNIX) | ||
Ui_ShapePopulationMainWindowQT::menuBar->setNativeMenuBar(false); | ||
#endif | ||
} | ||
|
||
ShapePopulationMainWindowQT::~ShapePopulationMainWindowQT() | ||
{ | ||
} | ||
|
||
ShapePopulationQT* ShapePopulationMainWindowQT::shapePopulation() | ||
{ | ||
return qobject_cast<ShapePopulationQT*>(this->centralWidget()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef SHAPEPOPULATIONMAINWINDOWQT_H | ||
#define SHAPEPOPULATIONMAINWINDOWQT_H | ||
|
||
#include "ui_ShapePopulationMainWindowQT.h" | ||
|
||
class ShapePopulationQT; | ||
|
||
class ShapePopulationMainWindowQT : public QMainWindow, public Ui::ShapePopulationMainWindowQT | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
ShapePopulationMainWindowQT(); | ||
~ShapePopulationMainWindowQT(); | ||
|
||
ShapePopulationQT* shapePopulation(); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ui version="4.0"> | ||
<class>ShapePopulationMainWindowQT</class> | ||
<widget class="QMainWindow" name="ShapePopulationMainWindowQT"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>1250</width> | ||
<height>836</height> | ||
</rect> | ||
</property> | ||
<property name="sizePolicy"> | ||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
<horstretch>0</horstretch> | ||
<verstretch>0</verstretch> | ||
</sizepolicy> | ||
</property> | ||
<property name="minimumSize"> | ||
<size> | ||
<width>0</width> | ||
<height>0</height> | ||
</size> | ||
</property> | ||
<property name="acceptDrops"> | ||
<bool>true</bool> | ||
</property> | ||
<property name="windowTitle"> | ||
<string>ShapePopulationViewer 1.4.0</string> | ||
</property> | ||
<property name="windowIcon"> | ||
<iconset resource="ShapePopulationViewer.qrc"> | ||
<normaloff>:/resources/logo.png</normaloff>:/resources/logo.png</iconset> | ||
</property> | ||
<widget class="ShapePopulationQT" name="centralwidget" native="true"> | ||
<property name="acceptDrops"> | ||
<bool>false</bool> | ||
</property> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>1100</width> | ||
<height>700</height> | ||
</rect> | ||
</property> | ||
</widget> | ||
<widget class="QMenuBar" name="menuBar"> | ||
<property name="geometry"> | ||
<rect> | ||
<x>0</x> | ||
<y>0</y> | ||
<width>1250</width> | ||
<height>22</height> | ||
</rect> | ||
</property> | ||
<widget class="QMenu" name="menuFile"> | ||
<property name="title"> | ||
<string>File</string> | ||
</property> | ||
<widget class="QMenu" name="menuExport"> | ||
<property name="title"> | ||
<string>Export Selection</string> | ||
</property> | ||
</widget> | ||
<addaction name="separator"/> | ||
</widget> | ||
<widget class="QMenu" name="menuOptions"> | ||
<property name="title"> | ||
<string>Options</string> | ||
</property> | ||
</widget> | ||
<addaction name="menuFile"/> | ||
<addaction name="menuOptions"/> | ||
<action name="actionExit"> | ||
<property name="text"> | ||
<string>Exit</string> | ||
</property> | ||
</action> | ||
</widget> | ||
</widget> | ||
<customwidgets> | ||
<customwidget> | ||
<class>ShapePopulationQT</class> | ||
<extends>QWidget</extends> | ||
<header>ShapePopulationQT.h</header> | ||
<container>1</container> | ||
</customwidget> | ||
</customwidgets> | ||
<resources> | ||
<include location="ShapePopulationViewer.qrc"/> | ||
</resources> | ||
<connections/> | ||
</ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.