[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/generic/applets/quicklaunch
From: Ingomar Wesp <ingomar () wesp ! name>
Date: 2010-04-30 21:39:31
Message-ID: 20100430213931.20DA9AC8AB () svn ! kde ! org
[Download RAW message or body]
SVN commit 1121230 by iwesp:
Refactoring, improved dialog handling and drag & drop.
- Added the newly created classes IconGrid and IconGridLayout implementing a new
icon grid widget and its layout.
- Refactored the quicklaunch applet so that it uses the newly created classes
and lives in its own namespace.
Functionality wise, this means:
- Improved drag & drop behaviour (it is now possible to drop items in the popup
dialog) and drag & drop markers.
- Icons are now moved to/from the dialog explicitly instead of asking the user
to specify the number of the icons that are shown in the primary area.
- Icon size is now determined automatically based on the available space,
hard-coded minimum and maximum bounds and the number of rows (or columns) set
by the user. This is done in a custom layout that is no longer based on
QGraphicsGridLayout.
- When all icons are removed from an icon area, a placeholder icon is displayed.
As this patch changes the configuration keys used, it also incorporates code for
migrating the previously used config keys.
This commit (hopefully ;) fixes bugs #184412, #206382, #206912, #214463, #225011
and #233914. For more information, please have a look at review board entries
#3786 and #3358 as well as the corresponding discussions on plasma-devel.
BUG: 184412
BUG: 206382
BUG: 206912
BUG: 214463
BUG: 225011
BUG: 233914
M +4 -3 CMakeLists.txt
D QuicklaunchLayout.cpp
D QuicklaunchLayout.h
A icongrid.cpp [License: GPL (v2+)]
A icongrid.h [License: GPL (v2+)]
A icongridlayout.cpp [License: GPL (v2+)]
A icongridlayout.h [License: GPL (v2+)]
A quicklaunch.cpp quicklaunchApplet.cpp#1110338 [License: GPL (v2+)]
A quicklaunch.h quicklaunchApplet.h#1110338 [License: GPL (v2+)]
D quicklaunchApplet.cpp
D quicklaunchApplet.h
M +65 -138 quicklaunchConfig.ui
D quicklaunchIcon.cpp
D quicklaunchIcon.h
A quicklaunchicon.cpp quicklaunchIcon.cpp#1110338 [License: GPL (v2+)]
A quicklaunchicon.h quicklaunchIcon.h#1110338 [License: GPL (v2+)]
--- trunk/KDE/kdebase/workspace/plasma/generic/applets/quicklaunch/CMakeLists.txt #1121229:1121230
@@ -11,9 +11,10 @@
endif(NOT KDE4_FOUND)
set(plasma_applet_quicklaunch_SRCS
- quicklaunchApplet.cpp
- quicklaunchIcon.cpp
- QuicklaunchLayout.cpp
+ quicklaunch.cpp
+ quicklaunchicon.cpp
+ icongrid.cpp
+ icongridlayout.cpp
)
kde4_add_ui_files(plasma_applet_quicklaunch_SRCS quicklaunchConfig.ui)
--- trunk/KDE/kdebase/workspace/plasma/generic/applets/quicklaunch/quicklaunchConfig.ui #1121229:1121230
@@ -11,36 +11,10 @@
</rect>
</property>
<property name="windowTitle">
- <string>Configure QuickLaunch</string>
+ <string>Configure Quicklaunch</string>
</property>
<layout class="QGridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Visible icons:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>icons</cstring>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="5" column="0">
+ <item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -53,96 +27,108 @@
</property>
</spacer>
</item>
- <item row="2" column="1">
- <widget class="QSlider" name="iconSizeSlider">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
+ <item row="5" column="0">
+ <widget class="QLabel" name="iconNamesVisibleLabel">
<property name="text">
- <string>Icon size:</string>
+ <string>Show icon names:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
- <cstring>iconSizeSlider</cstring>
+ <cstring>iconNamesVisibleCheckBox</cstring>
</property>
</widget>
</item>
- <item row="2" column="2">
- <widget class="KIntSpinBox" name="iconSizeSpin">
- <property name="suffix">
- <string>px</string>
+ <item row="5" column="1">
+ <widget class="QCheckBox" name="iconNamesVisibleCheckBox">
+ <property name="text">
+ <string/>
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
- <widget class="KIntSpinBox" name="icons">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="6" column="0">
+ <widget class="QLabel" name="dialogEnabledLabel">
+ <property name="text">
+ <string>Enable popup:</string>
</property>
- <property name="specialValueText">
- <string>Unlimited</string>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
- <property name="minimum">
- <number>-1</number>
+ <property name="buddy">
+ <cstring>dialogEnabledCheckBox</cstring>
</property>
- <property name="value">
- <number>4</number>
- </property>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QSlider" name="dialogIconSizeSlider">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
+ <item row="6" column="1">
+ <widget class="QCheckBox" name="dialogEnabledCheckBox">
+ <property name="text">
+ <string/>
</property>
</widget>
</item>
<item row="3" column="0">
- <widget class="QLabel" name="label_3">
+ <widget class="QLabel" name="maxRowsOrColumnsLabel">
<property name="text">
- <string>Dialog icon size:</string>
+ <string>Maximum rows:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
- <cstring>dialogIconSizeSlider</cstring>
+ <cstring>maxRowsOrColumnsSpinBox</cstring>
</property>
</widget>
</item>
- <item row="3" column="2">
- <widget class="KIntSpinBox" name="dialogIconSizeSpin">
+ <item row="3" column="1" colspan="2">
+ <widget class="KIntSpinBox" name="maxRowsOrColumnsSpinBox">
+ <property name="specialValueText">
+ <string>unlimited</string>
+ </property>
<property name="suffix">
- <string>px</string>
+ <string notr="true"/>
</property>
+ <property name="minimum">
+ <number>0</number>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
</widget>
</item>
<item row="4" column="0">
- <widget class="QLabel" name="label_4">
+ <widget class="QLabel" name="forceMaxRowsOrColumnsLabel">
<property name="text">
- <string>Show icon names:</string>
+ <string>Force row settings:</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
<property name="buddy">
- <cstring>iconNamesCheckBox</cstring>
+ <cstring>forceMaxRowsOrColumnsCheckBox</cstring>
</property>
</widget>
</item>
<item row="4" column="1">
- <widget class="QCheckBox" name="iconNamesCheckBox">
+ <widget class="QCheckBox" name="forceMaxRowsOrColumnsCheckBox">
<property name="text">
- <string/>
+ <string notr="true"/>
</property>
</widget>
</item>
+ <item row="3" column="3">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
<customwidgets>
@@ -152,71 +138,12 @@
<header>knuminput.h</header>
</customwidget>
</customwidgets>
+ <tabstops>
+ <tabstop>maxRowsOrColumnsSpinBox</tabstop>
+ <tabstop>forceMaxRowsOrColumnsCheckBox</tabstop>
+ <tabstop>iconNamesVisibleCheckBox</tabstop>
+ <tabstop>dialogEnabledCheckBox</tabstop>
+ </tabstops>
<resources/>
- <connections>
- <connection>
- <sender>iconSizeSlider</sender>
- <signal>valueChanged(int)</signal>
- <receiver>iconSizeSpin</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>134</x>
- <y>43</y>
- </hint>
- <hint type="destinationlabel">
- <x>225</x>
- <y>43</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>iconSizeSpin</sender>
- <signal>valueChanged(int)</signal>
- <receiver>iconSizeSlider</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>225</x>
- <y>43</y>
- </hint>
- <hint type="destinationlabel">
- <x>134</x>
- <y>43</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>dialogIconSizeSlider</sender>
- <signal>valueChanged(int)</signal>
- <receiver>dialogIconSizeSpin</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>134</x>
- <y>71</y>
- </hint>
- <hint type="destinationlabel">
- <x>225</x>
- <y>71</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>dialogIconSizeSpin</sender>
- <signal>valueChanged(int)</signal>
- <receiver>dialogIconSizeSlider</receiver>
- <slot>setValue(int)</slot>
- <hints>
- <hint type="sourcelabel">
- <x>225</x>
- <y>71</y>
- </hint>
- <hint type="destinationlabel">
- <x>134</x>
- <y>71</y>
- </hint>
- </hints>
- </connection>
- </connections>
+ <connections/>
</ui>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic