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 @@ - Configure QuickLaunch + Configure Quicklaunch - - - - Visible icons: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - icons - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + Qt::Vertical @@ -53,96 +27,108 @@ - - - - Qt::Horizontal - - - - - + + - Icon size: + Show icon names: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - iconSizeSlider + iconNamesVisibleCheckBox - - - - px + + + + - - - - - 0 - 0 - + + + + Enable popup: - - Unlimited + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - -1 + + dialogEnabledCheckBox - - 4 - - - - - Qt::Horizontal + + + + - + - Dialog icon size: + Maximum rows: Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - dialogIconSizeSlider + maxRowsOrColumnsSpinBox - - + + + + unlimited + - px + + + 0 + + + 0 + - + - Show icon names: + Force row settings: + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + - iconNamesCheckBox + forceMaxRowsOrColumnsCheckBox - + - + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -152,71 +138,12 @@
knuminput.h
+ + maxRowsOrColumnsSpinBox + forceMaxRowsOrColumnsCheckBox + iconNamesVisibleCheckBox + dialogEnabledCheckBox + - - - iconSizeSlider - valueChanged(int) - iconSizeSpin - setValue(int) - - - 134 - 43 - - - 225 - 43 - - - - - iconSizeSpin - valueChanged(int) - iconSizeSlider - setValue(int) - - - 225 - 43 - - - 134 - 43 - - - - - dialogIconSizeSlider - valueChanged(int) - dialogIconSizeSpin - setValue(int) - - - 134 - 71 - - - 225 - 71 - - - - - dialogIconSizeSpin - valueChanged(int) - dialogIconSizeSlider - setValue(int) - - - 225 - 71 - - - 134 - 71 - - - - +