diff --git a/data/themes/default/folder-64.png b/data/themes/default/folder-64.png new file mode 100644 index 000000000..6a93840b0 Binary files /dev/null and b/data/themes/default/folder-64.png differ diff --git a/data/themes/default/preferences-desktop-sound.png b/data/themes/default/preferences-desktop-sound.png new file mode 100644 index 000000000..efdedd742 Binary files /dev/null and b/data/themes/default/preferences-desktop-sound.png differ diff --git a/data/themes/default/preferences-system.png b/data/themes/default/preferences-system.png new file mode 100644 index 000000000..9ea5cec44 Binary files /dev/null and b/data/themes/default/preferences-system.png differ diff --git a/data/themes/default/setup-midi.png b/data/themes/default/setup-midi.png new file mode 100755 index 000000000..ec43e3f66 Binary files /dev/null and b/data/themes/default/setup-midi.png differ diff --git a/data/themes/default/setup-plugins.png b/data/themes/default/setup-plugins.png new file mode 100644 index 000000000..81891c373 Binary files /dev/null and b/data/themes/default/setup-plugins.png differ diff --git a/data/themes/default/style.css b/data/themes/default/style.css index 1df96fa90..ec41b9f18 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -12,6 +12,17 @@ automationEditor { background-color: rgb(0, 0, 0); } +#PreferencesDialog QListView::item:selected { + background: qlineargradient(x1: 0, y1:0, x2:0,y2:1, stop:0 rgb(84,87,96), stop:1 rgb(54,57,66)); + border-radius: 8px; + color: white; +} + +#PreferencesDialog QListView::item:hover:!selected { + background: qlineargradient(x1: 0, y1:0, x2:0,y2:1, stop:0 rgb(104,107,116), stop:1 rgb(94,97,106)); + border-radius: 8px; +} + #WelcomeFrame { border: 2px solid rgb(32,32,32); border-radius: 8px; diff --git a/include/MainWindow.h b/include/MainWindow.h index 5916893fc..80357e8d5 100644 --- a/include/MainWindow.h +++ b/include/MainWindow.h @@ -125,6 +125,7 @@ public slots: bool saveProject(); bool saveProjectAs(); void showSettingsDialog(); + void showPreferencesDialog(); void aboutLMMS(); void help(); void toggleAutomationEditorWin(); diff --git a/include/PreferencesDialog.h b/include/PreferencesDialog.h new file mode 100644 index 000000000..67c739484 --- /dev/null +++ b/include/PreferencesDialog.h @@ -0,0 +1,43 @@ +/* + * PreferencesDialog.h - declaration of class PreferencesDialog + * + * Copyright (c) 2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + +#ifndef _PREFERENCES_DIALOG_H +#define _PREFERENCES_DIALOG_H + +#include + +namespace Ui { class PreferencesDialog; } + +class PreferencesDialog : public QDialog +{ +public: + PreferencesDialog(); + +private: + Ui::PreferencesDialog * ui; + +} ; + +#endif + diff --git a/src/gui/Forms/PreferencesDialog.ui b/src/gui/Forms/PreferencesDialog.ui new file mode 100644 index 000000000..f9df36a99 --- /dev/null +++ b/src/gui/Forms/PreferencesDialog.ui @@ -0,0 +1,776 @@ + + + PreferencesDialog + + + + 0 + 0 + 577 + 478 + + + + Preferences + + + + + + + + + + 0 + 0 + + + + + 101 + 470 + + + + + 101 + 16777215 + + + + ::item { width:87; } + + + + Qt::ScrollBarAlwaysOff + + + Qt::ScrollBarAlwaysOff + + + + 64 + 64 + + + + 4 + + + QListView::IconMode + + + -1 + + + + General + + + ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled + + + + + Directories + + + ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled + + + + + Audio + + + ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled + + + + + MIDI + + + ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled + + + + + Plugins + + + ItemIsSelectable|ItemIsUserCheckable|ItemIsEnabled + + + + + + + + 0 + + + + + 16 + + + + + + 14 + 75 + true + + + + General settings + + + + + + + User interface + + + + + + Enable tooltips + + + + + + + Show volume as dbV + + + + + + + Show welcome screen + + + + + + + + + + Online resources + + + + 10 + + + + + Enable online resources + + + + + + + Enable uploads + + + + + + + Username + + + + + + + false + + + + + + + Password + + + + + + + false + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + 16 + + + + + + 14 + 75 + true + + + + Audio settings + + + + + + + General + + + + 10 + + + 10 + + + + + Buffer size + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Sample rate + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 44100 Hz + + + + + 48000 Hz + + + + + 88200 Hz + + + + + 96000 Hz + + + + + + + + + 0 + 0 + + + + 3 + + + + 32 + + + + + 64 + + + + + 128 + + + + + 256 (default) + + + + + 512 + + + + + 1024 + + + + + 2048 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + + Audio engine + + + + 10 + + + 10 + + + + + Audio engine + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Device + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + + Qt::Vertical + + + + 0 + 0 + + + + + + + + + + 16 + + + + + + 14 + 75 + true + + + + MIDI settings + + + + + + + MIDI engine + + + + 10 + + + 10 + + + + + MIDI engine + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Device + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + + + + + 0 + 100 + + + + MIDI remote control + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + 16 + + + + + + 14 + 75 + true + + + + Plugins settings + + + + + + + + 24 + 24 + + + + + + + + + + + + + + + + + + Qt::Horizontal + + + + 0 + 0 + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + PreferencesDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PreferencesDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + enableUploadsCheckBox + toggled(bool) + usernameEdit + setEnabled(bool) + + + 299 + 253 + + + 336 + 283 + + + + + enableUploadsCheckBox + toggled(bool) + passwordEdit + setEnabled(bool) + + + 299 + 253 + + + 336 + 317 + + + + + enableOnlineResourcesCheckBox + toggled(bool) + enableUploadsCheckBox + setEnabled(bool) + + + 299 + 226 + + + 299 + 253 + + + + + configPageSelector + currentRowChanged(int) + configPages + setCurrentIndex(int) + + + 54 + 238 + + + 340 + 224 + + + + + diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index dfb101be6..453193dbd 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -51,6 +51,7 @@ #include "engine.h" #include "FxMixerView.h" #include "AboutDialog.h" +#include "PreferencesDialog.h" #include "ControllerRackView.h" #include "plugin_browser.h" #include "SideBar.h" @@ -257,6 +258,10 @@ void MainWindow::finalize() edit_menu->addAction( embed::getIconPixmap( "setup_general" ), tr( "Settings" ), this, SLOT( showSettingsDialog() ) ); + edit_menu->addSeparator(); + edit_menu->addAction( embed::getIconPixmap( "setup_general" ), + tr( "Preferences (premature dialog)" ), + this, SLOT( showPreferencesDialog() ) ); m_toolsMenu = new QMenu( this ); @@ -1050,6 +1055,14 @@ void MainWindow::showSettingsDialog() +void MainWindow::showPreferencesDialog() +{ + PreferencesDialog().exec(); +} + + + + void MainWindow::aboutLMMS() { AboutDialog().exec(); diff --git a/src/gui/PreferencesDialog.cpp b/src/gui/PreferencesDialog.cpp new file mode 100644 index 000000000..6214051f8 --- /dev/null +++ b/src/gui/PreferencesDialog.cpp @@ -0,0 +1,55 @@ +/* + * PreferencesDialog.cpp - implementation of PreferencesDialog + * + * Copyright (c) 2009 Tobias Doerffel + * + * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program (see COPYING); if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301 USA. + * + */ + +#include "PreferencesDialog.h" +#include "embed.h" +#include "engine.h" +#include "MainWindow.h" +#include "ui_PreferencesDialog.h" + + +PreferencesDialog::PreferencesDialog() : + QDialog( engine::mainWindow() ), + ui( new Ui::PreferencesDialog ) +{ + ui->setupUi( this ); + + // set up icons in page selector view on the left side + static const char * icons[] = { + "preferences-system", + "folder-64", + "preferences-desktop-sound", + "setup-midi", + "setup-plugins" + } ; + for( int i = 0; i < qMin( sizeof( icons ), + ui->configPageSelector->count() ); ++i ) + { + ui->configPageSelector->item( i )->setIcon( + embed::getIconPixmap( icons[i] ) ); + } +} + + +