mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 00:18:43 +00:00
Renamed the studio startup settings dialog to avoid name conflict with the core plugin's settings dialog.
This commit is contained in:
parent
33d658a444
commit
53e8f8ed94
6 changed files with 34 additions and 34 deletions
|
@ -11,7 +11,7 @@ FILE(GLOB STUDIO_SRC extension_system/*.h
|
|||
|
||||
SET(STUDIO_HDR extension_system/iplugin_manager.h
|
||||
extension_system/plugin_manager.h
|
||||
settings_dialog.h
|
||||
startup_settings_dlg.h
|
||||
splash_screen.h
|
||||
pm_watcher.h )
|
||||
|
||||
|
@ -22,7 +22,7 @@ SET(STUDIO_TS translations/object_viewer_qt_en.ts
|
|||
translations/object_viewer_qt_de.ts
|
||||
translations/object_viewer_qt_ru.ts)
|
||||
|
||||
SET(STUDIO_PLUGIN_UIS settings_dialog.ui )
|
||||
SET(STUDIO_PLUGIN_UIS startup_settings_dlg.ui )
|
||||
|
||||
SET(QT_USE_QTGUI TRUE)
|
||||
SET(QT_USE_QTOPENGL TRUE)
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <QtGui/QFileDialog>
|
||||
#include <QtGui/QInputDialog>
|
||||
|
||||
#include "settings_dialog.h"
|
||||
#include "startup_settings_dlg.h"
|
||||
#include "splash_screen.h"
|
||||
#include "pm_watcher.h"
|
||||
|
||||
|
@ -160,7 +160,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
settings->setValue( "FirstRun", false );
|
||||
|
||||
SettingsDialog sd;
|
||||
StartupSettingsDlg sd;
|
||||
sd.setSettings( settings );
|
||||
sd.load();
|
||||
sd.exec();
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#ifndef SETTINGS_DIALOG_H
|
||||
#define SETTINGS_DIALOG_H
|
||||
|
||||
#include "../core/ui_settings_dialog.h"
|
||||
#include "ui_settings_dialog.h"
|
||||
|
||||
// Qt includes
|
||||
#include <QtCore/QList>
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include "settings_dialog.h"
|
||||
#include "startup_settings_dlg.h"
|
||||
#include <QFileDialog>
|
||||
#include <QSettings>
|
||||
#include <QStringList>
|
||||
|
@ -32,7 +32,7 @@ int findListItem( QListWidget *l, const QString &s )
|
|||
return -1;
|
||||
}
|
||||
|
||||
SettingsDialog::SettingsDialog( QDialog *parent ) :
|
||||
StartupSettingsDlg::StartupSettingsDlg( QDialog *parent ) :
|
||||
QDialog( parent )
|
||||
{
|
||||
setupUi( this );
|
||||
|
@ -40,11 +40,11 @@ QDialog( parent )
|
|||
settings = NULL;
|
||||
}
|
||||
|
||||
SettingsDialog::~SettingsDialog()
|
||||
StartupSettingsDlg::~StartupSettingsDlg()
|
||||
{
|
||||
}
|
||||
|
||||
void SettingsDialog::load()
|
||||
void StartupSettingsDlg::load()
|
||||
{
|
||||
pluginsLE->setText( settings->value( "PluginPath" ).toString() );
|
||||
|
||||
|
@ -82,7 +82,7 @@ void SettingsDialog::load()
|
|||
settings->endGroup();
|
||||
}
|
||||
|
||||
void SettingsDialog::saveSearchPaths()
|
||||
void StartupSettingsDlg::saveSearchPaths()
|
||||
{
|
||||
QStringList l;
|
||||
for( int i = 0; i < searchLW->count(); i++ )
|
||||
|
@ -93,7 +93,7 @@ void SettingsDialog::saveSearchPaths()
|
|||
settings->setValue( "SearchPaths", l );
|
||||
}
|
||||
|
||||
void SettingsDialog::saveRecursivePaths()
|
||||
void StartupSettingsDlg::saveRecursivePaths()
|
||||
{
|
||||
QStringList l;
|
||||
for( int i = 0; i < recursiveLW->count(); i++ )
|
||||
|
@ -104,7 +104,7 @@ void SettingsDialog::saveRecursivePaths()
|
|||
settings->setValue( "RecursiveSearchPathes", l );
|
||||
}
|
||||
|
||||
void SettingsDialog::save()
|
||||
void StartupSettingsDlg::save()
|
||||
{
|
||||
settings->setValue( "PluginPath", pluginsLE->text() );
|
||||
|
||||
|
@ -123,59 +123,59 @@ void SettingsDialog::save()
|
|||
settings->sync();
|
||||
}
|
||||
|
||||
void SettingsDialog::accept()
|
||||
void StartupSettingsDlg::accept()
|
||||
{
|
||||
save();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void SettingsDialog::reject()
|
||||
void StartupSettingsDlg::reject()
|
||||
{
|
||||
QDialog::reject();
|
||||
}
|
||||
|
||||
void SettingsDialog::onOKClicked()
|
||||
void StartupSettingsDlg::onOKClicked()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
|
||||
void SettingsDialog::onCancelClicked()
|
||||
void StartupSettingsDlg::onCancelClicked()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
void SettingsDialog::onPluginBClicked()
|
||||
void StartupSettingsDlg::onPluginBClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Plugins directory" ), "" );
|
||||
pluginsLE->setText( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onSheetsBClicked()
|
||||
void StartupSettingsDlg::onSheetsBClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Sheets directory" ), "" );
|
||||
sheetsLE->setText( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onAssetsBClicked()
|
||||
void StartupSettingsDlg::onAssetsBClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Assets directory" ), "" );
|
||||
assetsLE->setText( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onPrimitivesBClicked()
|
||||
void StartupSettingsDlg::onPrimitivesBClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Primitives directory" ), "" );
|
||||
primitivesLE->setText( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onLigoBClicked()
|
||||
void StartupSettingsDlg::onLigoBClicked()
|
||||
{
|
||||
QString p;
|
||||
p = QFileDialog::getOpenFileName( this, tr( "LIGO config file" ), "" );
|
||||
ligoLE->setText( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onPathAddClicked()
|
||||
void StartupSettingsDlg::onPathAddClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Search path" ), "" );
|
||||
if( p.isEmpty() )
|
||||
|
@ -187,7 +187,7 @@ void SettingsDialog::onPathAddClicked()
|
|||
searchLW->addItem( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onPathRemoveClicked()
|
||||
void StartupSettingsDlg::onPathRemoveClicked()
|
||||
{
|
||||
QListWidgetItem *i = searchLW->currentItem();
|
||||
if( i == NULL )
|
||||
|
@ -196,7 +196,7 @@ void SettingsDialog::onPathRemoveClicked()
|
|||
delete i;
|
||||
}
|
||||
|
||||
void SettingsDialog::onRecursiveAddClicked()
|
||||
void StartupSettingsDlg::onRecursiveAddClicked()
|
||||
{
|
||||
QString p = QFileDialog::getExistingDirectory( this, tr( "Recursive search path" ), "" );
|
||||
if( p.isEmpty() )
|
||||
|
@ -208,7 +208,7 @@ void SettingsDialog::onRecursiveAddClicked()
|
|||
recursiveLW->addItem( p );
|
||||
}
|
||||
|
||||
void SettingsDialog::onRecursiveRemoveClicked()
|
||||
void StartupSettingsDlg::onRecursiveRemoveClicked()
|
||||
{
|
||||
QListWidgetItem *i = recursiveLW->currentItem();
|
||||
if( i == NULL )
|
||||
|
@ -218,7 +218,7 @@ void SettingsDialog::onRecursiveRemoveClicked()
|
|||
}
|
||||
|
||||
|
||||
void SettingsDialog::setupConnections()
|
||||
void StartupSettingsDlg::setupConnections()
|
||||
{
|
||||
connect( bb, SIGNAL( accepted() ), this, SLOT( onOKClicked() ) );
|
||||
connect( bb, SIGNAL( rejected() ), this, SLOT( onCancelClicked() ) );
|
|
@ -14,19 +14,19 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef SETTINGS_DIALOG_H
|
||||
#define SETTINGS_DIALOG_H
|
||||
#ifndef STARTUP_SETTINGS_DIALOG_H
|
||||
#define STARTUP_SETTINGS_DIALOG_H
|
||||
|
||||
#include "ui_settings_dialog.h"
|
||||
#include "ui_startup_settings_dlg.h"
|
||||
|
||||
class QSettings;
|
||||
|
||||
class SettingsDialog : public QDialog, public Ui::SettingsDialog
|
||||
class StartupSettingsDlg : public QDialog, public Ui::StartupSettingsDlg
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SettingsDialog( QDialog *parent = NULL );
|
||||
~SettingsDialog();
|
||||
StartupSettingsDlg( QDialog *parent = NULL );
|
||||
~StartupSettingsDlg();
|
||||
|
||||
void setSettings( QSettings *s ){ settings = s; }
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SettingsDialog</class>
|
||||
<widget class="QDialog" name="SettingsDialog">
|
||||
<class>StartupSettingsDlg</class>
|
||||
<widget class="QDialog" name="StartupSettingsDlg">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
Loading…
Reference in a new issue