CHANGED: #1471 Enabled the new and save actions in the file menu. (They are not implemented yet)

This commit is contained in:
dfighter1985 2012-08-08 07:24:32 +02:00
parent ecacd1ec12
commit 4159878d22
5 changed files with 28 additions and 2 deletions

View file

@ -61,6 +61,10 @@ public:
virtual QUndoStack *undoStack() = 0;
virtual void open() = 0;
virtual void save(){}
virtual void newDocument(){}
};
} // namespace Core

View file

@ -159,10 +159,12 @@ void MainWindow::open()
void MainWindow::newFile()
{
m_contextManager->currentContext()->newDocument();
}
void MainWindow::save()
{
m_contextManager->currentContext()->save();
}
void MainWindow::saveAs()

View file

@ -37,6 +37,14 @@ namespace GUIEditor
m_guiEditorWindow->open();
}
void GUIEditorContext::newDocument()
{
}
void GUIEditorContext::save()
{
}
QWidget *GUIEditorContext::widget()
{
return m_guiEditorWindow;

View file

@ -42,7 +42,11 @@ namespace GUIEditor
virtual QIcon icon() const{ return QIcon(); }
virtual void open();
void open();
void newDocument();
void save();
virtual QUndoStack *undoStack();

View file

@ -188,6 +188,14 @@ namespace GUIEditor
void GUIEditorWindow::createMenus()
{
Core::MenuManager *mm = Core::ICore::instance()->menuManager();
//QAction *newAction = mm->action( Core::Constants::NEW );
QAction *saveAction = mm->action( Core::Constants::SAVE );
//if( newAction != NULL )
// newAction->setEnabled( true );
if( saveAction != NULL )
saveAction->setEnabled( true );
QMenu *menu = mm->menu( Core::Constants::M_TOOLS );
if( menu != NULL )
{