mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 06:53:53 +00:00
cleaned up opening the settings dialogue from a view
This commit is contained in:
parent
efdf2961f0
commit
cae5eb424d
5 changed files with 7 additions and 10 deletions
|
@ -14,6 +14,7 @@ CS::Editor::Editor() : mViewManager (mDocumentManager)
|
|||
|
||||
connect (&mViewManager, SIGNAL (newDocumentRequest ()), this, SLOT (createDocument ()));
|
||||
connect (&mViewManager, SIGNAL (loadDocumentRequest ()), this, SLOT (loadDocument ()));
|
||||
connect (&mViewManager, SIGNAL (editSettingsRequest()), this, SLOT (showSettings ()));
|
||||
|
||||
connect (&mStartup, SIGNAL (createGame()), this, SLOT (createDocument ())); /// \todo split
|
||||
connect (&mStartup, SIGNAL (createAddon()), this, SLOT (createDocument ()));
|
||||
|
|
|
@ -67,7 +67,7 @@ void CSVDoc::View::setupEditMenu()
|
|||
edit->addAction (mRedo);
|
||||
|
||||
QAction *userSettings = new QAction (tr ("&Preferences"), this);
|
||||
connect (userSettings, SIGNAL (triggered()), this, SLOT (showUserSettings()));
|
||||
connect (userSettings, SIGNAL (triggered()), this, SIGNAL (editSettingsRequest()));
|
||||
edit->addAction (userSettings);
|
||||
}
|
||||
|
||||
|
@ -415,13 +415,6 @@ void CSVDoc::View::exit()
|
|||
emit exitApplicationRequest (this);
|
||||
}
|
||||
|
||||
void CSVDoc::View::showUserSettings()
|
||||
{
|
||||
CSVSettings::UserSettingsDialog *settingsDialog = new CSVSettings::UserSettingsDialog(this);
|
||||
|
||||
settingsDialog->show();
|
||||
}
|
||||
|
||||
void CSVDoc::View::resizeViewWidth (int width)
|
||||
{
|
||||
if (width >= 0)
|
||||
|
|
|
@ -112,6 +112,8 @@ namespace CSVDoc
|
|||
|
||||
void exitApplicationRequest (CSVDoc::View *view);
|
||||
|
||||
void editSettingsRequest();
|
||||
|
||||
public slots:
|
||||
|
||||
void addSubView (const CSMWorld::UniversalId& id);
|
||||
|
@ -160,8 +162,6 @@ namespace CSVDoc
|
|||
|
||||
void addFiltersSubView();
|
||||
|
||||
void showUserSettings();
|
||||
|
||||
void toggleShowStatusBar (bool show);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -114,6 +114,7 @@ CSVDoc::View *CSVDoc::ViewManager::addView (CSMDoc::Document *document)
|
|||
|
||||
connect (view, SIGNAL (newDocumentRequest ()), this, SIGNAL (newDocumentRequest()));
|
||||
connect (view, SIGNAL (loadDocumentRequest ()), this, SIGNAL (loadDocumentRequest()));
|
||||
connect (view, SIGNAL (editSettingsRequest()), this, SIGNAL (editSettingsRequest()));
|
||||
|
||||
updateIndices();
|
||||
|
||||
|
|
|
@ -61,6 +61,8 @@ namespace CSVDoc
|
|||
|
||||
void closeMessageBox();
|
||||
|
||||
void editSettingsRequest();
|
||||
|
||||
public slots:
|
||||
|
||||
void exitApplication (CSVDoc::View *view);
|
||||
|
|
Loading…
Reference in a new issue