aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-06-16 19:10:42 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2015-06-16 19:10:42 +0000
commit5fe7e5d6ec417c44d39431d5839dd50a6d270bd6 (patch)
treea69d3f50e88a8fcf209d0d835c1be1be376a5153 /src
parentf5ddb47dd05f020bf91582b5654d51f6f8ec5098 (diff)
downloadqmmp-5fe7e5d6ec417c44d39431d5839dd50a6d270bd6.tar.gz
qmmp-5fe7e5d6ec417c44d39431d5839dd50a6d270bd6.tar.bz2
qmmp-5fe7e5d6ec417c44d39431d5839dd50a6d270bd6.zip
gme: added settings form
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@5165 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Input/gme/gme.pro9
-rw-r--r--src/plugins/Input/gme/settingsdialog.cpp34
-rw-r--r--src/plugins/Input/gme/settingsdialog.h42
-rw-r--r--src/plugins/Input/gme/settingsdialog.ui126
4 files changed, 209 insertions, 2 deletions
diff --git a/src/plugins/Input/gme/gme.pro b/src/plugins/Input/gme/gme.pro
index 76728e884..a204c134a 100644
--- a/src/plugins/Input/gme/gme.pro
+++ b/src/plugins/Input/gme/gme.pro
@@ -2,10 +2,12 @@ include(../../plugins.pri)
HEADERS += decodergmefactory.h \
decoder_gme.h \
- gmehelper.h
+ gmehelper.h \
+ settingsdialog.h
SOURCES += decoder_gme.cpp \
decodergmefactory.cpp \
- gmehelper.cpp
+ gmehelper.cpp \
+ settingsdialog.cpp
TARGET = $$PLUGINS_PREFIX/Input/gme
QMAKE_CLEAN = $$PLUGINS_PREFIX/Input/libgme.so
INCLUDEPATH += ../../../
@@ -34,3 +36,6 @@ win32 {
QMAKE_LIBDIR += ../../../../bin
LIBS += -lqmmp0 -lgme.dll
}
+
+FORMS += \
+ settingsdialog.ui
diff --git a/src/plugins/Input/gme/settingsdialog.cpp b/src/plugins/Input/gme/settingsdialog.cpp
new file mode 100644
index 000000000..27f448ed1
--- /dev/null
+++ b/src/plugins/Input/gme/settingsdialog.cpp
@@ -0,0 +1,34 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * 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; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#include "settingsdialog.h"
+#include "ui_settingsdialog.h"
+
+SettingsDialog::SettingsDialog(QWidget *parent) :
+ QDialog(parent),
+ m_ui(new Ui::SettingsDialog)
+{
+ m_ui->setupUi(this);
+}
+
+SettingsDialog::~SettingsDialog()
+{
+ delete m_ui;
+}
diff --git a/src/plugins/Input/gme/settingsdialog.h b/src/plugins/Input/gme/settingsdialog.h
new file mode 100644
index 000000000..6e49bc6cb
--- /dev/null
+++ b/src/plugins/Input/gme/settingsdialog.h
@@ -0,0 +1,42 @@
+/***************************************************************************
+ * Copyright (C) 2015 by Ilya Kotov *
+ * forkotov02@hotmail.ru *
+ * *
+ * 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; if not, write to the *
+ * Free Software Foundation, Inc., *
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
+ ***************************************************************************/
+
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include <QDialog>
+
+namespace Ui {
+class SettingsDialog;
+}
+
+class SettingsDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit SettingsDialog(QWidget *parent = 0);
+ ~SettingsDialog();
+
+private:
+ Ui::SettingsDialog *m_ui;
+};
+
+#endif // SETTINGSDIALOG_H
diff --git a/src/plugins/Input/gme/settingsdialog.ui b/src/plugins/Input/gme/settingsdialog.ui
new file mode 100644
index 000000000..a3cd79ea8
--- /dev/null
+++ b/src/plugins/Input/gme/settingsdialog.ui
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>360</width>
+ <height>108</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>GME Plugin Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <property name="leftMargin">
+ <number>6</number>
+ </property>
+ <property name="rightMargin">
+ <number>6</number>
+ </property>
+ <property name="bottomMargin">
+ <number>6</number>
+ </property>
+ <item>
+ <layout class="QFormLayout" name="formLayout">
+ <property name="fieldGrowthPolicy">
+ <enum>QFormLayout::AllNonFixedFieldsGrow</enum>
+ </property>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Fadeout length:</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="fadeoutSpinBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="suffix">
+ <string>ms</string>
+ </property>
+ <property name="minimum">
+ <number>500</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="2">
+ <widget class="QCheckBox" name="fadeoutCheckBox">
+ <property name="text">
+ <string>Enable fadeout</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>254</x>
+ <y>101</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>322</x>
+ <y>101</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>fadeoutCheckBox</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>fadeoutSpinBox</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>83</x>
+ <y>17</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>149</x>
+ <y>42</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>