Commit eb2ad5f7 authored by Jean-Loup Haberbusch's avatar Jean-Loup Haberbusch

Merge branch 'fix-cleanup-code' into 'develop'

FIX Code cleanning

See merge request !129
parents 2dee1799 c1cab6ea
......@@ -61,6 +61,8 @@ ImpMainWindow::ImpMainWindow() : MainWindow("imp") {
// set the specific actions state machine icon
setWindowIcon(QPixmap(":/applicationIcon"));
fileOpenDataDirectoryMenu = nullptr;
// init all other GUI
initActions();
initMenuBar();
......@@ -229,11 +231,6 @@ void ImpMainWindow::initMenuBar() {
openDataDirectoryMenuBuilder(fileMenu);
// fileOpenDataDirectoryMenu = new QMenu(tr("Open &Data Directory..."));
// fileOpenDataDirectoryMenu->setIcon(QPixmap(":/fileOpen"));
// fileOpenDataDirectoryMenu->setEnabled(false);
// fileMenu->addMenu(fileOpenDataDirectoryMenu);
fileMenu->addAction(fileClose);
fileMenu->addAction(fileCloseAll);
fileMenu->addSeparator();
......@@ -424,7 +421,7 @@ void ImpMainWindow::resetWindows() {
}
// ------------- openDataDirectory -----------------
void ImpMainWindow::openDicomDirectory(QString plugin) {
void ImpMainWindow::openDataDirectory(QString plugin) {
QString pluginName = plugin;
statusBar()->showMessage(tr(QString("Opening " + pluginName + " directory...").toStdString().c_str()));
......@@ -618,7 +615,7 @@ void ImpMainWindow::openDataDirectoryMenuBuilder(QMenu * fm) {
QAction* openDirectory = new QAction(dirExtName, this);
openDirectory->setStatusTip(tr(QString("Opens data directory for " + dirExtName).toStdString().c_str()));
openDirectory->setWhatsThis(tr(QString("Opens data directory for " + dirExtName).toStdString().c_str()));
connect(openDirectory, &QAction::triggered, this, [=]() {this->openDicomDirectory(dirExtName);});
connect(openDirectory, &QAction::triggered, this, [=]() {this->openDataDirectory(dirExtName);});
fileOpenDataDirectoryMenu->addAction(openDirectory);
......@@ -647,7 +644,7 @@ void ImpMainWindow::openDataDirectoryMenuBuilder(QMenu * fm) {
openDirectoryAct->setStatusTip(tr(QString("Opens data directory for " + dirExtName).toStdString().c_str()));
openDirectoryAct->setWhatsThis(tr(QString("Opens data directory for " + dirExtName).toStdString().c_str()));
connect(openDirectoryAct, &QAction::triggered, this, [=]() {this->openDicomDirectory(dirExtName);});
connect(openDirectoryAct, &QAction::triggered, this, [=]() {this->openDataDirectory(dirExtName);});
openDirectoryAct->setIcon(QPixmap(":/fileOpen"));
} else {
......
......@@ -80,7 +80,7 @@ public slots:
/// @name file menu slot
///@{
/// open a data directory, "called" from the fileOpenDataDirectoryMenu
void openDicomDirectory(QString plugin);
void openDataDirectory(QString plugin);
///@}
/// @name viewers' slot
......@@ -165,7 +165,7 @@ private:
///@{
/** file_menu contains all items of the menubar entry "File" */
QMenu* fileMenu;
QMenu* fileOpenDataDirectoryMenu = nullptr;
QMenu* fileOpenDataDirectoryMenu;
QAction* fileOpen;
QAction* fileClose;
QAction* fileCloseAll;
......
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