diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-02-28 20:50:37 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2008-02-28 20:50:37 +0000 |
| commit | 32b99cd71c113f192c31c14b154600cfd71993cd (patch) | |
| tree | 068b834710e643be42c2cb7bc15bd6fe6a46952a /src/plugins/General | |
| parent | 6ee74cda4d4bff26a4b5ea079642bb9783e11d91 (diff) | |
| download | qmmp-32b99cd71c113f192c31c14b154600cfd71993cd.tar.gz qmmp-32b99cd71c113f192c31c14b154600cfd71993cd.tar.bz2 qmmp-32b99cd71c113f192c31c14b154600cfd71993cd.zip | |
added notifier plugin
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@259 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
| -rw-r--r-- | src/plugins/General/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | src/plugins/General/General.pro | 3 | ||||
| -rw-r--r-- | src/plugins/General/notifier/CMakeLists.txt | 67 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.cpp | 59 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.h | 49 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifier.pro | 36 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifierfactory.cpp | 58 | ||||
| -rw-r--r-- | src/plugins/General/notifier/notifierfactory.h | 45 | ||||
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.cpp | 79 | ||||
| -rw-r--r-- | src/plugins/General/notifier/popupwidget.h | 54 | ||||
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.cpp | 69 | ||||
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.h | 49 | ||||
| -rw-r--r-- | src/plugins/General/notifier/settingsdialog.ui | 254 |
13 files changed, 830 insertions, 2 deletions
diff --git a/src/plugins/General/CMakeLists.txt b/src/plugins/General/CMakeLists.txt index 793d41401..1dfa8e373 100644 --- a/src/plugins/General/CMakeLists.txt +++ b/src/plugins/General/CMakeLists.txt @@ -1,6 +1,7 @@ SET(USE_DBUS TRUE CACHE BOOL "enable/disable dbus plugin") SET(USE_SCROBBLER TRUE CACHE BOOL "enable/disable scrobbler plugin") SET(USE_STATICON TRUE CACHE BOOL "enable/disable status icon plugin") +SET(USE_NOTIFIER TRUE CACHE BOOL "enable/disable notifier plugin") IF(USE_DBUS) MESSAGE(STATUS "DBUS ON") @@ -21,4 +22,11 @@ MESSAGE( STATUS "STATICON ON") add_subdirectory(statusicon) ELSE(USE_STATICON) MESSAGE( STATUS "STATICON OFF") -ENDIF(USE_STATICON)
\ No newline at end of file +ENDIF(USE_STATICON) + +IF(USE_NOTIFIER) +MESSAGE(STATUS "NOTIFIER ON") +add_subdirectory(notifier) +ELSE(USE_NOTIFIER) +MESSAGE(STATUS "NOTIFIER OFF") +ENDIF(USE_NOTIFIER) diff --git a/src/plugins/General/General.pro b/src/plugins/General/General.pro index 11f567452..31790c056 100644 --- a/src/plugins/General/General.pro +++ b/src/plugins/General/General.pro @@ -1,4 +1,5 @@ SUBDIRS += statusicon \ scrobbler \ - dbuscontrol + dbuscontrol \ + notifier TEMPLATE = subdirs diff --git a/src/plugins/General/notifier/CMakeLists.txt b/src/plugins/General/notifier/CMakeLists.txt new file mode 100644 index 000000000..5bf6cb3b2 --- /dev/null +++ b/src/plugins/General/notifier/CMakeLists.txt @@ -0,0 +1,67 @@ +project(libnotifier) + +cmake_minimum_required(VERSION 2.4.0) + + + +INCLUDE(FindQt4) + +find_package(Qt4 REQUIRED) # find and setup Qt4 for this project +include(${QT_USE_FILE}) + +# qt plugin +ADD_DEFINITIONS( -Wall ) +ADD_DEFINITIONS(${QT_DEFINITIONS}) +ADD_DEFINITIONS(-DQT_PLUGIN) +ADD_DEFINITIONS(-DQT_NO_DEBUG) +ADD_DEFINITIONS(-DQT_SHARED) +ADD_DEFINITIONS(-DQT_THREAD) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +SET(QT_INCLUDES + ${QT_INCLUDES} + ${CMAKE_CURRENT_BINARY_DIR}/../../../ +) + +# libqmmpui +include_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../) +link_directories(${CMAKE_CURRENT_BINARY_DIR}/../../../qmmpui) + +SET(libnotifier_SRCS + settingsdialog.cpp + notifier.cpp + notifierfactory.cpp + popupwidget.cpp +) + +SET(libnotifier_MOC_HDRS + settingsdialog.h + notifierfactory.h + notifier.h + popupwidget.h +) + +#SET(libnotifier_RCCS translations/translations.qrc) + +#SET(libnotifier_RCCS images/images.qrc) + +#QT4_ADD_RESOURCES(libnotifier_RCC_SRCS ${libnotifier_RCCS}) + +QT4_WRAP_CPP(libnotifier_MOC_SRCS ${libnotifier_MOC_HDRS}) + +# user interface + + +SET(libnotifier_UIS + settingsdialog.ui +) + +QT4_WRAP_UI(libnotifier_UIS_H ${libnotifier_UIS}) +# Don't forget to include output directory, otherwise +# the UI file won't be wrapped! +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + +ADD_LIBRARY(notifier SHARED ${libnotifier_SRCS} ${libnotifier_MOC_SRCS} ${libnotifier_UIS_H} ${libnotifier_RCC_SRCS}) +target_link_libraries(notifier ${QT_LIBRARIES} -lqmmpui) +install(TARGETS notifier DESTINATION ${LIB_DIR}/qmmp/General) diff --git a/src/plugins/General/notifier/notifier.cpp b/src/plugins/General/notifier/notifier.cpp new file mode 100644 index 000000000..2c2c53ae4 --- /dev/null +++ b/src/plugins/General/notifier/notifier.cpp @@ -0,0 +1,59 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QTimer> + +#include "popupwidget.h" +#include "notifier.h" + +Notifier::Notifier(QObject *parent) + : General(parent) +{ + m_popupWidget = 0; +} + +Notifier::~Notifier() +{} + +void Notifier::setState(const uint &state) +{ + switch ((uint) state) + { + case General::Playing: + { + break; + } + case General::Paused: + { + break; + } + case General::Stopped: + { + break; + } + } +} + +void Notifier::setSongInfo(const SongInfo &song) +{ + if(m_popupWidget) + delete m_popupWidget; + m_popupWidget = new PopupWidget(song); +} diff --git a/src/plugins/General/notifier/notifier.h b/src/plugins/General/notifier/notifier.h new file mode 100644 index 000000000..d2d2f706f --- /dev/null +++ b/src/plugins/General/notifier/notifier.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef NOTIFIER_H +#define NOTIFIER_H + +#include <QPointer> + +#include <qmmpui/general.h> + +class PopupWidget; + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ + +class Notifier : public General +{ +Q_OBJECT +public: + Notifier(QObject *parent = 0); + + ~Notifier(); + + void setState(const uint& state); + void setSongInfo(const SongInfo &song); + +private: + QPointer<PopupWidget> m_popupWidget; + +}; + +#endif diff --git a/src/plugins/General/notifier/notifier.pro b/src/plugins/General/notifier/notifier.pro new file mode 100644 index 000000000..099b52aed --- /dev/null +++ b/src/plugins/General/notifier/notifier.pro @@ -0,0 +1,36 @@ +include(../../plugins.pri) + +INCLUDEPATH += ../../../../src +CONFIG += release \ +warn_on \ +plugin + +TARGET =$$PLUGINS_PREFIX/General/notifier +QMAKE_CLEAN =$$PLUGINS_PREFIX/General/libnotifier.so + + +TEMPLATE = lib +QMAKE_LIBDIR += ../../../../lib +LIBS += -lqmmpui + +#TRANSLATIONS = translations/ffmpeg_plugin_ru.ts +#RESOURCES = translations/translations.qrc + +isEmpty(LIB_DIR){ + LIB_DIR = /lib +} +target.path = $$LIB_DIR/qmmp/General +INSTALLS += target +#FORMS += settingsdialog.ui + +HEADERS += notifierfactory.h \ + notifier.h \ + popupwidget.h \ + settingsdialog.h +SOURCES += notifierfactory.cpp \ + notifier.cpp \ + popupwidget.cpp \ + settingsdialog.cpp + +FORMS += settingsdialog.ui + diff --git a/src/plugins/General/notifier/notifierfactory.cpp b/src/plugins/General/notifier/notifierfactory.cpp new file mode 100644 index 000000000..d99a11064 --- /dev/null +++ b/src/plugins/General/notifier/notifierfactory.cpp @@ -0,0 +1,58 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QtGui> + +#include "notifier.h" +#include "settingsdialog.h" +#include "notifierfactory.h" + +const GeneralProperties NotifierFactory::properties() const +{ + GeneralProperties properties; + properties.name = tr("Notifier Plugin"); + properties.hasAbout = TRUE; + properties.hasSettings = TRUE; + return properties; +} + +General *NotifierFactory::create(QObject *parent) +{ + return new Notifier(parent); +} + +QDialog *NotifierFactory::createConfigDialog(QWidget *parent) +{ + return new SettingsDialog(parent); +} + +void NotifierFactory::showAbout(QWidget *parent) +{ + QMessageBox::about (parent, tr("About Notifier Plugin"), + tr("Qmmp Desktop Notifier Plugin")+"\n"+ + tr("Writen by: Ilya Kotov <forkotov02@hotmail.ru>")); +} + +QTranslator *NotifierFactory::createTranslator(QObject *parent) +{ + return 0; +} + +Q_EXPORT_PLUGIN(NotifierFactory) diff --git a/src/plugins/General/notifier/notifierfactory.h b/src/plugins/General/notifier/notifierfactory.h new file mode 100644 index 000000000..68c22bbde --- /dev/null +++ b/src/plugins/General/notifier/notifierfactory.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef NOTIFIERFACTORY_H +#define NOTIFIERFACTORY_H + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +#include <QObject> +#include <QTranslator> +#include <QDialog> + +#include <qmmpui/general.h> +#include <qmmpui/generalfactory.h> + +class NotifierFactory : public QObject, public GeneralFactory +{ +Q_OBJECT +Q_INTERFACES(GeneralFactory); +public: + const GeneralProperties properties() const; + General *create(QObject *parent); + QDialog *createConfigDialog(QWidget *parent); + void showAbout(QWidget *parent); + QTranslator *createTranslator(QObject *parent); +}; + +#endif diff --git a/src/plugins/General/notifier/popupwidget.cpp b/src/plugins/General/notifier/popupwidget.cpp new file mode 100644 index 000000000..eb15ddc88 --- /dev/null +++ b/src/plugins/General/notifier/popupwidget.cpp @@ -0,0 +1,79 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QVBoxLayout> +#include <QLabel> +#include <QApplication> +#include <QDesktopWidget> +#include <QTimer> +#include <QPalette> +#include <QSettings> +#include <QDir> + +#include "popupwidget.h" + +PopupWidget::PopupWidget(const SongInfo &song, QWidget *parent) + : QFrame(parent) +{ + setWindowFlags(Qt::X11BypassWindowManagerHint | + Qt::WindowStaysOnTopHint); + setFrameStyle(QFrame::Box | QFrame::Plain); + QVBoxLayout *layout = new QVBoxLayout(this); + QString title = song.title(); + title.append(" "); + if (!song.isStream()) + title.append(QString("(%1:%2)").arg(song.length()/60).arg(song.length()%60, 2, 10, QChar('0'))); + QLabel *label1 = new QLabel("<b>"+title+"</b>", this); + layout->addWidget(label1); + + QString info = song.artist(); + if (!info.isEmpty() && !song.album().isEmpty()) + info.append(" - " + song.album()); + if (!info.isEmpty()) + { + QLabel *label2 = new QLabel(info, this); + layout->addWidget(label2); + } + setLayout(layout); + resize(sizeHint()); + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Notifier"); + int delay = settings.value("message_delay", 2000).toInt(); + uint pos = settings.value("message_pos", PopupWidget::BOTTOMLEFT).toUInt(); + settings.endGroup(); + //calculate widget position + int x = 5, y = 5; + QSize desktopSize = QApplication::desktop()->size(); + if (pos == LEFT || pos == RIGHT || pos == CENTER) + y = desktopSize.height()/2 - height()/2; + else if (pos == BOTTOMLEFT || pos == BOTTOM || pos == BOTTOMRIGHT) + y = desktopSize.height() - height() - 5; + if (pos == TOP || pos == BOTTOM || pos == CENTER) + x = desktopSize.width()/2 - width()/2; + else if (pos == TOPRIGHT || pos == RIGHT || pos == BOTTOMRIGHT) + x = desktopSize.width() - width() - 5; + + move (x,y); + QTimer::singleShot(delay, this, SLOT(deleteLater())); + show(); +} + +PopupWidget::~PopupWidget() +{} diff --git a/src/plugins/General/notifier/popupwidget.h b/src/plugins/General/notifier/popupwidget.h new file mode 100644 index 000000000..048fe4d33 --- /dev/null +++ b/src/plugins/General/notifier/popupwidget.h @@ -0,0 +1,54 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef POPUPWIDGET_H +#define POPUPWIDGET_H + +#include <QWidget> +#include <QFrame> + +#include <qmmpui/songinfo.h> + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class PopupWidget : public QFrame +{ + Q_OBJECT +public: + PopupWidget(const SongInfo &song, QWidget *parent = 0); + + ~PopupWidget(); + + enum Position + { + TOPLEFT = 0, + TOP, + TOPRIGHT, + RIGHT, + BOTTOMRIGHT, + BOTTOM, + BOTTOMLEFT, + LEFT, + CENTER + }; + +}; + +#endif diff --git a/src/plugins/General/notifier/settingsdialog.cpp b/src/plugins/General/notifier/settingsdialog.cpp new file mode 100644 index 000000000..a460d5af9 --- /dev/null +++ b/src/plugins/General/notifier/settingsdialog.cpp @@ -0,0 +1,69 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ + +#include <QSettings> +#include <QDir> + +#include "popupwidget.h" +#include "settingsdialog.h" + +SettingsDialog::SettingsDialog(QWidget *parent) + : QDialog(parent) +{ + ui.setupUi(this); + + m_buttons.insert(PopupWidget::TOPLEFT, ui.topLeftButton); + m_buttons.insert(PopupWidget::TOP, ui.topButton); + m_buttons.insert(PopupWidget::TOPRIGHT, ui.topRightButton); + m_buttons.insert(PopupWidget::RIGHT, ui.rightButton); + m_buttons.insert(PopupWidget::BOTTOMRIGHT, ui.bottomRightButton); + m_buttons.insert(PopupWidget::BOTTOM, ui.bottomButton); + m_buttons.insert(PopupWidget::BOTTOMLEFT, ui.bottomLeftButton); + m_buttons.insert(PopupWidget::LEFT, ui.leftButton); + m_buttons.insert(PopupWidget::CENTER, ui.centerButton); + + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Notifier"); + ui.messageDelaySpinBox->setValue(settings.value("message_delay", 2000).toInt()); + uint pos = settings.value("message_pos", PopupWidget::BOTTOMLEFT).toUInt(); + m_buttons.value(pos)->setChecked(TRUE); + settings.endGroup(); + connect(ui.okButton, SIGNAL(clicked()), SLOT(writeSettings())); +} + + +SettingsDialog::~SettingsDialog() +{} + +void SettingsDialog::writeSettings() +{ + QSettings settings(QDir::homePath()+"/.qmmp/qmmprc", QSettings::IniFormat); + settings.beginGroup("Notifier"); + settings.setValue ("message_delay", ui.messageDelaySpinBox->value()); + uint pos = PopupWidget::BOTTOMLEFT; + foreach (QPushButton *button, m_buttons.values()) + { + if(button->isChecked()) + pos = m_buttons.key(button); + } + settings.setValue("message_pos", pos); + settings.endGroup(); + accept(); +} diff --git a/src/plugins/General/notifier/settingsdialog.h b/src/plugins/General/notifier/settingsdialog.h new file mode 100644 index 000000000..6d5f39a15 --- /dev/null +++ b/src/plugins/General/notifier/settingsdialog.h @@ -0,0 +1,49 @@ +/*************************************************************************** + * Copyright (C) 2008 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., * + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + ***************************************************************************/ +#ifndef SETTINGSDIALOG_H +#define SETTINGSDIALOG_H + +#include <QDialog> + + +#include "ui_settingsdialog.h" + +/** + @author Ilya Kotov <forkotov02@hotmail.ru> +*/ +class SettingsDialog : public QDialog +{ +Q_OBJECT +public: + SettingsDialog(QWidget *parent = 0); + + ~SettingsDialog(); + + +private slots: + void writeSettings(); + +private: + Ui::SettingsDialog ui; + QMap<uint, QPushButton*> m_buttons; + +}; + +#endif diff --git a/src/plugins/General/notifier/settingsdialog.ui b/src/plugins/General/notifier/settingsdialog.ui new file mode 100644 index 000000000..db6a1ec24 --- /dev/null +++ b/src/plugins/General/notifier/settingsdialog.ui @@ -0,0 +1,254 @@ +<ui version="4.0" > + <class>SettingsDialog</class> + <widget class="QDialog" name="SettingsDialog" > + <property name="geometry" > + <rect> + <x>0</x> + <y>0</y> + <width>268</width> + <height>273</height> + </rect> + </property> + <property name="windowTitle" > + <string>Status Icon Plugin Settings</string> + </property> + <layout class="QVBoxLayout" > + <item> + <widget class="QGroupBox" name="groupBox_4" > + <property name="title" > + <string>General</string> + </property> + <widget class="QLabel" name="label_3" > + <property name="geometry" > + <rect> + <x>10</x> + <y>30</y> + <width>141</width> + <height>23</height> + </rect> + </property> + <property name="text" > + <string>Message delay, ms:</string> + </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + <widget class="QSpinBox" name="messageDelaySpinBox" > + <property name="geometry" > + <rect> + <x>140</x> + <y>30</y> + <width>71</width> + <height>23</height> + </rect> + </property> + <property name="minimum" > + <number>100</number> + </property> + <property name="maximum" > + <number>10000</number> + </property> + <property name="singleStep" > + <number>100</number> + </property> + <property name="value" > + <number>1000</number> + </property> + </widget> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox" > + <property name="title" > + <string>Position</string> + </property> + <layout class="QGridLayout" > + <item row="0" column="0" > + <widget class="QPushButton" name="topLeftButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="1" > + <widget class="QPushButton" name="topButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="0" column="2" > + <widget class="QPushButton" name="topRightButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QPushButton" name="leftButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="2" > + <widget class="QPushButton" name="rightButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="0" > + <widget class="QPushButton" name="bottomLeftButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="1" > + <widget class="QPushButton" name="bottomButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="2" column="2" > + <widget class="QPushButton" name="bottomRightButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + <item row="1" column="1" > + <widget class="QPushButton" name="centerButton" > + <property name="text" > + <string/> + </property> + <property name="checkable" > + <bool>true</bool> + </property> + <property name="autoExclusive" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <layout class="QHBoxLayout" > + <property name="spacing" > + <number>6</number> + </property> + <property name="leftMargin" > + <number>0</number> + </property> + <property name="topMargin" > + <number>0</number> + </property> + <property name="rightMargin" > + <number>0</number> + </property> + <property name="bottomMargin" > + <number>0</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" > + <size> + <width>131</width> + <height>31</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okButton" > + <property name="text" > + <string>OK</string> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="cancelButton" > + <property name="text" > + <string>Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <resources/> + <connections> + <connection> + <sender>cancelButton</sender> + <signal>clicked()</signal> + <receiver>SettingsDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel" > + <x>336</x> + <y>210</y> + </hint> + <hint type="destinationlabel" > + <x>179</x> + <y>224</y> + </hint> + </hints> + </connection> + </connections> +</ui> |
