Commit bf17fe5d authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen

Added close project menu item

parent d989f231
...@@ -458,6 +458,11 @@ void MainWindow::projectChanged( const QString& projectName, bool savedStatus ...@@ -458,6 +458,11 @@ void MainWindow::projectChanged( const QString& projectName, bool savedStatus
setWindowTitle( title ); setWindowTitle( title );
} }
void MainWindow::on_actionClose_Project_triggered()
{
ProjectManager::getInstance()->closeProject();
}
#define INIT_SHORTCUT( instName, shortcutName, actionInstance ) \ #define INIT_SHORTCUT( instName, shortcutName, actionInstance ) \
const SettingValue* instName = SettingsManager::getInstance()->getValue( "keyboard_shortcut", shortcutName );\ const SettingValue* instName = SettingsManager::getInstance()->getValue( "keyboard_shortcut", shortcutName );\
KeyboardShortcutHelper* helper##instName = new KeyboardShortcutHelper( shortcutName, this, true ); \ KeyboardShortcutHelper* helper##instName = new KeyboardShortcutHelper( shortcutName, this, true ); \
......
...@@ -94,6 +94,7 @@ private slots: ...@@ -94,6 +94,7 @@ private slots:
void on_actionImport_triggered(); void on_actionImport_triggered();
void on_actionHelp_triggered(); void on_actionHelp_triggered();
void on_actionProject_Preferences_triggered(); void on_actionProject_Preferences_triggered();
void on_actionClose_Project_triggered();
void toolButtonClicked( int id ); void toolButtonClicked( int id );
void projectChanged( const QString& projectName, bool savedStatus ); void projectChanged( const QString& projectName, bool savedStatus );
void keyboardShortcutChanged( const QString&, const QString& ); void keyboardShortcutChanged( const QString&, const QString& );
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>800</width> <width>800</width>
<height>24</height> <height>22</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
</property> </property>
<addaction name="actionNew_Project"/> <addaction name="actionNew_Project"/>
<addaction name="actionLoad_Project"/> <addaction name="actionLoad_Project"/>
<addaction name="actionClose_Project"/>
<addaction name="actionSave"/> <addaction name="actionSave"/>
<addaction name="actionSave_As"/> <addaction name="actionSave_As"/>
<addaction name="actionImport"/> <addaction name="actionImport"/>
...@@ -203,6 +204,11 @@ ...@@ -203,6 +204,11 @@
<string>Save As</string> <string>Save As</string>
</property> </property>
</action> </action>
<action name="actionClose_Project">
<property name="text">
<string>Close Project</string>
</property>
</action>
</widget> </widget>
<resources> <resources>
<include location="../../../ressources.qrc"/> <include location="../../../ressources.qrc"/>
......
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