mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-14 11:19:07 +00:00
CHANGED: #1471 Enabled the new and save actions in the file menu. (They are not implemented yet)
This commit is contained in:
parent
ecacd1ec12
commit
4159878d22
5 changed files with 28 additions and 2 deletions
|
@ -61,6 +61,10 @@ public:
|
|||
virtual QUndoStack *undoStack() = 0;
|
||||
|
||||
virtual void open() = 0;
|
||||
|
||||
virtual void save(){}
|
||||
|
||||
virtual void newDocument(){}
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
|
|
@ -159,10 +159,12 @@ void MainWindow::open()
|
|||
|
||||
void MainWindow::newFile()
|
||||
{
|
||||
m_contextManager->currentContext()->newDocument();
|
||||
}
|
||||
|
||||
void MainWindow::save()
|
||||
{
|
||||
m_contextManager->currentContext()->save();
|
||||
}
|
||||
|
||||
void MainWindow::saveAs()
|
||||
|
|
|
@ -37,6 +37,14 @@ namespace GUIEditor
|
|||
m_guiEditorWindow->open();
|
||||
}
|
||||
|
||||
void GUIEditorContext::newDocument()
|
||||
{
|
||||
}
|
||||
|
||||
void GUIEditorContext::save()
|
||||
{
|
||||
}
|
||||
|
||||
QWidget *GUIEditorContext::widget()
|
||||
{
|
||||
return m_guiEditorWindow;
|
||||
|
|
|
@ -42,7 +42,11 @@ namespace GUIEditor
|
|||
|
||||
virtual QIcon icon() const{ return QIcon(); }
|
||||
|
||||
virtual void open();
|
||||
void open();
|
||||
|
||||
void newDocument();
|
||||
|
||||
void save();
|
||||
|
||||
virtual QUndoStack *undoStack();
|
||||
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue