[kde-doc-english] KDE/kdebase/workspace/plasma/desktop/applets/tasks
Markus Meik Slopianka
kamikazow at web.de
Sat Mar 6 20:28:25 CET 2010
SVN commit 1100097 by markuss:
FEATURE: 198661
GUI: Add "Disable scrollwheel" on taskbar
M +1 -1 taskgroupitem.cpp
M +14 -1 tasks.cpp
M +2 -1 tasks.h
M +129 -122 tasksConfig.ui
--- trunk/KDE/kdebase/workspace/plasma/desktop/applets/tasks/taskgroupitem.cpp #1100096:1100097
@@ -1288,7 +1288,7 @@
void TaskGroupItem::wheelEvent(QGraphicsSceneWheelEvent *event)
{
- focusSubTask((event->delta() < 0), true);
+ if(m_applet->scrollSwitch())focusSubTask((event->delta() < 0), true);
}
int TaskGroupItem::maxRows()
--- trunk/KDE/kdebase/workspace/plasma/desktop/applets/tasks/tasks.cpp #1100096:1100097
@@ -80,6 +80,7 @@
//TODO: for 4.5, make this option visible
m_showTooltip = cg.readEntry("showTooltip", true);
m_highlightWindows = cg.readEntry("highlightWindows", false);
+ m_scrollSwitch - cg.readEntry("scrollSwitch", true);
m_groupManager = new TaskManager::GroupManager(this);
Plasma::Containment* appletContainment = containment();
@@ -252,6 +253,7 @@
m_ui.showTooltip->setChecked(m_showTooltip);
m_ui.highlightWindows->setChecked(m_highlightWindows);
+ m_ui.scrollSwitch->setChecked(m_scrollSwitch);
m_ui.showOnlyCurrentDesktop->setChecked(m_groupManager->showOnlyCurrentDesktop());
m_ui.showOnlyCurrentScreen->setChecked(m_groupManager->showOnlyCurrentScreen());
m_ui.showOnlyMinimized->setChecked(m_groupManager->showOnlyMinimized());
@@ -336,6 +338,7 @@
changed = true;
}
+
if (m_groupManager->groupingStrategy() != (m_ui.groupingStrategy->currentIndex())) {
m_groupManager->setGroupingStrategy(static_cast<TaskManager::GroupManager::TaskGroupingStrategy>(m_ui.groupingStrategy->itemData(m_ui.groupingStrategy->currentIndex()).toInt()));
KConfigGroup cg = config();
@@ -378,7 +381,13 @@
cg.writeEntry("showTooltip", m_showTooltip);
changed = true;
}
-
+ if (m_scrollSwitch != (m_ui.scrollSwitch->checkState() == Qt::Checked)) {
+ m_scrollSwitch = !m_scrollSwitch;
+ KConfigGroup cg = config();
+ cg.writeEntry("scrollSwitch", m_scrollSwitch);
+ changed = true;
+ }
+
if (m_highlightWindows != (m_ui.highlightWindows->checkState() == Qt::Checked)) {
m_highlightWindows = !m_highlightWindows;
KConfigGroup cg = config();
@@ -430,6 +439,10 @@
}
}
+bool Tasks::scrollSwitch() const{
+ return m_scrollSwitch;
+}
+
K_EXPORT_PLASMA_APPLET(tasks, Tasks)
#include "tasks.moc"
--- trunk/KDE/kdebase/workspace/plasma/desktop/applets/tasks/tasks.h #1100096:1100097
@@ -101,7 +101,7 @@
bool showToolTip() const;
bool highlightWindows() const;
-
+ bool scrollSwitch() const;
void needsVisualFocus();
QWidget *popupDialog() const;
signals:
@@ -131,6 +131,7 @@
private:
bool m_showTooltip;
bool m_highlightWindows;
+ bool m_scrollSwitch;
Plasma::LayoutAnimator *m_animator;
QGraphicsLinearLayout *layout;
--- trunk/KDE/kdebase/workspace/plasma/desktop/applets/tasks/tasksConfig.ui #1100096:1100097
@@ -10,29 +10,75 @@
<height>530</height>
</rect>
</property>
- <layout class="QFormLayout" name="formLayout">
- <item row="2" column="1">
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="QLabel" name="label_5">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Appearance</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" colspan="2">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>Show tooltips:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>showTooltip</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
<widget class="QCheckBox" name="showTooltip">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="4" column="1">
+ <item row="2" column="0" colspan="2">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Force row settings:</string>
+ </property>
+ <property name="buddy">
+ <cstring>fillRows</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
<widget class="QCheckBox" name="fillRows">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="6" column="1">
+ <item row="3" column="0" colspan="2">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>Highlight windows:</string>
+ </property>
+ <property name="buddy">
+ <cstring>fillRows</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
<widget class="QCheckBox" name="highlightWindows">
<property name="text">
<string/>
</property>
</widget>
</item>
- <item row="7" column="1">
+ <item row="4" column="2">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -48,7 +94,20 @@
</property>
</spacer>
</item>
- <item row="9" column="1">
+ <item row="5" column="0" colspan="2">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Maximum rows:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>maxRows</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="KIntSpinBox" name="maxRows">
@@ -75,7 +134,49 @@
</item>
</layout>
</item>
- <item row="14" column="1">
+ <item row="6" column="1">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>64</width>
+ <height>10</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item row="7" column="0" colspan="3">
+ <widget class="QLabel" name="label_6">
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Grouping & Sorting</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Grouping:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>groupingStrategy</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QComboBox" name="groupingStrategy">
@@ -102,7 +203,7 @@
</item>
</layout>
</item>
- <item row="15" column="1">
+ <item row="9" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<spacer name="horizontalSpacer">
@@ -135,7 +236,7 @@
</item>
</layout>
</item>
- <item row="16" column="0">
+ <item row="10" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Sorting:</string>
@@ -148,7 +249,7 @@
</property>
</widget>
</item>
- <item row="16" column="1">
+ <item row="10" column="2">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QComboBox" name="sortingStrategy">
@@ -175,7 +276,7 @@
</item>
</layout>
</item>
- <item row="17" column="1">
+ <item row="11" column="2">
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -191,41 +292,7 @@
</property>
</spacer>
</item>
- <item row="19" column="0" colspan="2">
- <widget class="QCheckBox" name="showOnlyCurrentDesktop">
- <property name="text">
- <string>Only show tasks from the current desktop</string>
- </property>
- </widget>
- </item>
- <item row="20" column="0" colspan="2">
- <widget class="QCheckBox" name="showOnlyCurrentScreen">
- <property name="text">
- <string>Only show tasks from the current screen</string>
- </property>
- </widget>
- </item>
- <item row="21" column="0" colspan="2">
- <widget class="QCheckBox" name="showOnlyMinimized">
- <property name="text">
- <string>Only show tasks that are minimized</string>
- </property>
- </widget>
- </item>
- <item row="22" column="1">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>0</width>
- <height>5</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="18" column="0" colspan="2">
+ <item row="12" column="0">
<widget class="QLabel" name="label_4">
<property name="font">
<font>
@@ -238,103 +305,43 @@
</property>
</widget>
</item>
- <item row="11" column="0" colspan="2">
- <widget class="QLabel" name="label_6">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
+ <item row="13" column="0" colspan="3">
+ <widget class="QCheckBox" name="showOnlyCurrentDesktop">
<property name="text">
- <string>Grouping & Sorting</string>
+ <string>Only show tasks from the current desktop</string>
</property>
</widget>
</item>
- <item row="0" column="0" colspan="2">
- <widget class="QLabel" name="label_5">
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
+ <item row="14" column="0" colspan="3">
+ <widget class="QCheckBox" name="showOnlyCurrentScreen">
<property name="text">
- <string>Appearance</string>
+ <string>Only show tasks from the current screen</string>
</property>
</widget>
</item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_9">
+ <item row="15" column="0" colspan="3">
+ <widget class="QCheckBox" name="showOnlyMinimized">
<property name="text">
- <string>Highlight windows:</string>
+ <string>Only show tasks that are minimized</string>
</property>
- <property name="buddy">
- <cstring>fillRows</cstring>
- </property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_8">
+ <item row="16" column="0" colspan="3">
+ <widget class="QCheckBox" name="scrollSwitch">
<property name="text">
- <string>Force row settings:</string>
+ <string>Switch Applications using scroll wheel</string>
</property>
- <property name="buddy">
- <cstring>fillRows</cstring>
- </property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>Show tooltips:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>showTooltip</cstring>
- </property>
- </widget>
- </item>
- <item row="9" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>Maximum rows:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>maxRows</cstring>
- </property>
- </widget>
- </item>
- <item row="14" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Grouping:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>groupingStrategy</cstring>
- </property>
- </widget>
- </item>
- <item row="10" column="0">
- <spacer name="verticalSpacer_2">
+ <item row="17" column="2">
+ <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
<property name="sizeHint" stdset="0">
<size>
- <width>64</width>
- <height>10</height>
+ <width>0</width>
+ <height>5</height>
</size>
</property>
</spacer>
More information about the kde-doc-english
mailing list