#include "client.h"
#include "clientsettings.h"
+#include "iconloader.h"
#include "mainwin.h"
#include "networkmodel.h"
#include "qtui.h"
: SettingsPage("Internal", "IndicatorNotification", parent)
{
ui.setupUi(this);
+ // FIXME find proper icon (this one is used by the plasmoid as well)
+ ui.enabled->setIcon(SmallIcon("mail-message-new"));
connect(ui.enabled, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
}
audioPreview(0)
{
ui.setupUi(this);
+ ui.enabled->setIcon(SmallIcon("media-playback-start"));
ui.play->setIcon(SmallIcon("media-playback-start"));
ui.open->setIcon(SmallIcon("document-open"));
_hasDefaults |= cw->hasDefaults();
}
}
- layout->addStretch(1);
+ layout->addStretch(20);
load();
}
#include <QApplication>
#include <QCheckBox>
#include <QGroupBox>
-#include <QVBoxLayout>
+#include <QHBoxLayout>
#include "systraynotificationbackend.h"
#include "client.h"
#include "clientsettings.h"
#include "icon.h"
+#include "iconloader.h"
#include "mainwin.h"
#include "networkmodel.h"
#include "qtui.h"
/***************************************************************************/
SystrayNotificationBackend::ConfigWidget::ConfigWidget(QWidget *parent) : SettingsPage("Internal", "SystrayNotification", parent) {
- QGroupBox *groupBox = new QGroupBox(tr("System Tray Icon"), this);
- _animateBox = new QCheckBox(tr("Animate"));
- connect(_animateBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged()));
- _showBubbleBox = new QCheckBox(tr("Show bubble"));
+ _showBubbleBox = new QCheckBox(tr("Show a message in a popup"));
+ _showBubbleBox->setIcon(SmallIcon("dialog-information"));
connect(_showBubbleBox, SIGNAL(toggled(bool)), this, SLOT(widgetChanged()));
- QVBoxLayout *layout = new QVBoxLayout(groupBox);
- layout->addWidget(_animateBox);
+ QHBoxLayout *layout = new QHBoxLayout(this);
layout->addWidget(_showBubbleBox);
- layout->addStretch(1);
- QVBoxLayout *globalLayout = new QVBoxLayout(this);
- globalLayout->addWidget(groupBox);
-
}
void SystrayNotificationBackend::ConfigWidget::widgetChanged() {
- bool changed = (_showBubble != _showBubbleBox->isChecked() || _animate != _animateBox->isChecked());
- if(changed != hasChanged()) setChangedState(changed);
+ bool changed = (_showBubble != _showBubbleBox->isChecked());
+ if(changed != hasChanged())
+ setChangedState(changed);
}
bool SystrayNotificationBackend::ConfigWidget::hasDefaults() const {
}
void SystrayNotificationBackend::ConfigWidget::defaults() {
- _animateBox->setChecked(true);
_showBubbleBox->setChecked(false);
widgetChanged();
}
void SystrayNotificationBackend::ConfigWidget::load() {
NotificationSettings s;
- _animate = s.value("Systray/Animate", true).toBool();
_showBubble = s.value("Systray/ShowBubble", false).toBool();
- _animateBox->setChecked(_animate);
_showBubbleBox->setChecked(_showBubble);
setChangedState(false);
}
void SystrayNotificationBackend::ConfigWidget::save() {
NotificationSettings s;
- s.setValue("Systray/Animate", _animateBox->isChecked());
s.setValue("Systray/ShowBubble", _showBubbleBox->isChecked());
load();
}
void widgetChanged();
private:
- QCheckBox *_showBubbleBox, *_animateBox;
- bool _showBubble, _animate;
+ QCheckBox *_showBubbleBox;
+ bool _showBubble;
};
#endif
#include <QtGui>
#include "clientsettings.h"
+#include "iconloader.h"
#include "mainwin.h"
#include "qtui.h"
#else
layout->addWidget(enabledBox = new QCheckBox(tr("Mark taskbar entry, timeout:"), this));
#endif
+ enabledBox->setIcon(SmallIcon("flag-blue"));
+ enabledBox->setEnabled(true);
+
timeoutBox = new QSpinBox(this);
- timeoutBox->setMinimum(0);
+ timeoutBox->setMinimum(1);
timeoutBox->setMaximum(99);
timeoutBox->setSpecialValueText(tr("Unlimited"));
- timeoutBox->setSuffix(tr(" s"));
+ timeoutBox->setSuffix(tr(" seconds"));
layout->addWidget(timeoutBox);
- layout->addStretch(1);
+ layout->addStretch(20);
connect(enabledBox, SIGNAL(toggled(bool)), SLOT(widgetChanged()));
+ connect(enabledBox, SIGNAL(toggled(bool)), timeoutBox, SLOT(setEnabled(bool)));
connect(timeoutBox, SIGNAL(valueChanged(int)), SLOT(widgetChanged()));
}
<rect>
<x>0</x>
<y>0</y>
- <width>435</width>
+ <width>438</width>
<height>35</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="enabled">
+ <property name="toolTip">
+ <string>This enables support for the Ayatana Project's application indicator (libindicate).</string>
+ </property>
<property name="text">
- <string>Show messages in indicator</string>
+ <string>Show messages in application indicator</string>
</property>
</widget>
</item>
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>PhononNotificationConfigWidget</class>
- <widget class="QWidget" name="PhononNotificationConfigWidget" >
- <property name="geometry" >
+ <widget class="QWidget" name="PhononNotificationConfigWidget">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
- <width>482</width>
- <height>78</height>
+ <width>439</width>
+ <height>36</height>
</rect>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <widget class="QGroupBox" name="enabled" >
- <property name="title" >
- <string>Audio Notification (via Phonon)</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Play File:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="filename" />
- </item>
- <item>
- <widget class="QToolButton" name="play" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="open" >
- <property name="text" >
- <string/>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QCheckBox" name="enabled">
+ <property name="text">
+ <string>Play a sound</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="play">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Prelisten to the selected sound</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="filename">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Select the sound file to play</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="open">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="toolTip">
+ <string>Select the sound file to play</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
</widget>
</item>
</layout>
</widget>
<resources/>
- <connections/>
+ <connections>
+ <connection>
+ <sender>enabled</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>filename</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>59</x>
+ <y>15</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>246</x>
+ <y>20</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>enabled</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>open</receiver>
+ <slot>setEnabled(bool)</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>89</x>
+ <y>18</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>426</x>
+ <y>22</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
</ui>