Commit Graph

737 Commits

Author SHA1 Message Date
Martin Klapetek
cb4d7e8b4c Emit proper signals everywhere 2013-11-27 00:22:08 +01:00
Martin Klapetek
e80e2960c6 Shuffle the code around a bit
These methods are in the middle of other together-related methods, for
no reason. Looks like corn flakes in the middle of beer. Sure, you can
do that, but why would you. Actually I should try that.
2013-11-27 00:21:22 +01:00
Martin Klapetek
33f2670f07 Remove empty Q_SIGNALS & Q_SLOTS 2013-11-27 00:13:44 +01:00
Martin Klapetek
f9cca29bd1 Make MonthMenu items not hardcoded
That's just wrong.
2013-11-27 00:07:30 +01:00
Martin Klapetek
5c6b1c9251 Rename isTodayMonth() to today()
Whoever named the method like that should be slapped over his fingers.
2013-11-26 17:28:15 +01:00
Martin Klapetek
ab97884c00 Calculate days before current month properly 2013-11-26 16:24:04 +01:00
Martin Klapetek
d1dc311345 Reinstate the month name capitalization
Some CLDR (locale) data used by Qt have standalone month names
starting with lower-case letters. So if we want to provide consistent
look across locales, we need to capitalize it ourselves

See https://bugreports.qt-project.org/browse/QTBUG-35100
2013-11-25 17:00:19 +01:00
Martin Klapetek
580d7d198a Revert capitalizing the month's name
That's a locale thing/bug.
2013-11-25 13:42:54 +01:00
Martin Klapetek
ff47006845 Add some docs to Calendar binginds 2013-11-25 13:24:49 +01:00
Martin Klapetek
224e1a620b Make the calendar applet follow current locale with first day in week
Also rename startDay property to firstDayOfWeek property so it's more
clear what it does. Handling the first day of week is changed a bit too
as QML uses 0 for Sunday while QDate uses 7 for Sunday, so the
getter/setter is accomodated to that fact and converts from 0 to 7 on
setting and vice-versa in the getter.

REVIEW: 114099
2013-11-25 13:24:30 +01:00
Aleix Pol
f187db1e86 Remove KDE4Support dependency from plasma-frameworks (almost)
Stop using classes from kde4support:
- KComponentData is deprecated, it will be using QCoreApplication::
applicationName() and QCoreApplication::applicationVersion(). Of course,
this means that the existing shells will have to be ported. I have no
problem with doing that port myself, if I'm told where to look into.
- Drop usage of KLocale, ported to QLocale
- Drop usage of KStandardDirs, ported to QStandardPaths
- Drop usage of KIcon, ported to QIcon

Furthermore, there's a module in src/declarativeimports/locale that IIUC
exposes KLocale bindings to QML. A specific plan to port it should happen
as well.

REVIEW: 113920
2013-11-22 13:03:29 +01:00
Sebastian Kügler
ccca440859 Default to BottomEdge in Dialog
Also add a little bit of debugging to check sizing.
2013-11-20 04:05:35 +01:00
Aleix Pol
0fa21b4af5 Iterate over the cmake scripts
Prefer using imported targets rather than cmake variables.
2013-11-15 16:46:59 +01:00
Aleix Pol
3ef13c53dc Remove predicates on cmake end commands
http://techbase.kde.org/Policies/CMake_Coding_Style#End_commands
2013-11-14 17:25:10 +01:00
Mark Gaiser
d56f690fcf Add license to calendar component classes. 2013-11-13 13:41:41 +01:00
Sebastian Kügler
085e232641 Export MonthMenu, calendar 2013-11-13 06:05:52 +01:00
Sebastian Kügler
4337daa38e Various layout improvements 2013-11-13 05:28:42 +01:00
Sebastian Kügler
95dc36f0ee large spacing is defaultFont.mSize().height 2013-11-13 05:26:18 +01:00
Sebastian Kügler
d248fe1955 clean up a bit 2013-11-12 05:56:10 +01:00
Sebastian Kügler
6f8d1b6ab2 correct initial date setting, theming improvement 2013-11-12 05:51:45 +01:00
Sebastian Kügler
6134503899 Navigation improvements
- fix today highlighting
- click on month name opens menu to switch month
- jump to today works
2013-11-12 04:53:50 +01:00
Sebastian Kügler
19db9c9663 Add calendar QML components to the Plugin
This allows us to keep minimal API, since the calendar view and import
really belong together. Also makes it a lot easier to provide a separate
Calendar Plasmoid.
2013-11-12 03:40:52 +01:00
Sebastian Kügler
859e2ce352 theme.smallSpacing and theme.largeSpacing
Accessors to allow centralized control of spacing in a DPI-friendly way.
Will be used to unify spacing across default widget to make them look
more consistent.

Currently, smallSpacing is font height / 10, large is font height / 2.
2013-11-11 22:53:42 +01:00
Aleix Pol
1d3da96d88 Make sure that plasma-framework is not using anything from kdelibs4
Stop finding the packages
Remove KDE4_ includes
Remove unused LIBINTL finder, provided by kdelibs
2013-11-11 18:29:32 +01:00
David Faure
f4e6d019f6 Add missing include, after all-of-QtDBus-and-QtCore removal in kdelibs headers 2013-11-10 13:03:50 +01:00
Martin Gräßlin
9e32090b50 Do not add dialog to DialogShadows before it became visible at least once
Calling DialogShadows::self()->addWindow(...) will create the low level window.
If this is called before the property windowFlags is evaluated the window flag
X11BypassWindowManagerHint has no effect as that one must be present when the
window is created through the low level xcb call.

This was breaking declarative KWin scripts as KWin's windows need to have the
X11BypassWindowManagerHint.

REVIEW: 113700
2013-11-07 10:33:56 +01:00
Sebastian Kügler
44a27ca40a Update buttonDownPos in event filter
This basically fixes the clicked signal, probably a sutble change in Qt
between 4 and 5 revealed this bug.
2013-11-07 00:21:56 +01:00
Marco Martin
3530130b19 make sure is frameless 2013-10-30 18:39:42 +01:00
Sebastian Kügler
7b0faed939 Remove QIconItem 2013-10-30 17:20:57 +01:00
Marco Martin
1c435c56a4 ensure no borders 2013-10-30 15:18:14 +01:00
Marco Martin
1898432387 better window management 2013-10-30 14:08:32 +01:00
Kevin Ottens
8507084d62 Use the target now that KDE4Support exports one 2013-10-28 12:56:13 +01:00
Sebastian Kügler
79ad02c244 Out of bounds checking for array access
This fixes a crasher in v4, without backtrace. Trying to reproduce it
in a simpler case, but this at least makes PageStack work.
2013-10-28 04:20:52 +01:00
Sebastian Kügler
51de1b4a59 debug-- 2013-10-28 04:19:58 +01:00
Stephen Kelly
b071260d15 Use target name instead of variable. 2013-10-24 12:45:26 +02:00
Kevin Ottens
e79c58807a KLocale moved in KDE4Support 2013-10-22 17:58:24 +02:00
Marco Martin
e6151ac159 hide from taskbar 2013-10-22 16:36:41 +02:00
Marco Martin
c41a4f3761 smarter positioning when there is no visualparent 2013-10-22 16:19:09 +02:00
Marco Martin
d797985ffa some fixes in the dialog 2013-10-22 13:05:13 +02:00
Aleix Pol
af8a7bad7d Stop using Qt5Transitional in Plasma Frameworks
Removes the find_package(Qt5Transitional) and does the proper
find_package(Qt5) with the list of modules.

Most of the porting is about using the Qt5:: targets.

REVIEW: 113345
2013-10-22 00:40:17 +02:00
Marco Martin
876ade83a0 get rid of WidgetExplorerView
The widget explorer window is done by a Dialog, allowing for more flexibility in shell packages
2013-10-21 22:05:38 +02:00
Marco Martin
391d6ea70b sliding popups are back 2013-10-18 17:46:57 +02:00
Marco Martin
17e133b77b dead code -- 2013-10-18 17:23:20 +02:00
Marco Martin
f81fbea365 simpler and more correct border calculation 2013-10-18 17:20:59 +02:00
Marco Martin
9423ad57f2 use Plasma::Types::Location 2013-10-18 16:50:56 +02:00
Sebastian Kügler
d5bef21f7b Rename target plasma to Plasma
This is in line with the frameworks naming policy, camelcasing. Up until
now, libplasma was the only library being KF5::plasma, that is now
KF5::Plasma.
2013-10-16 00:47:47 +02:00
Alex Richardson
e597f66af2 fix some warnings
REVIEW: 113193
2013-10-13 15:44:08 +02:00
Sebastian Kügler
c7c9e8fefc Put steve's changes back in
CCMAIL:steveire@gmail.com
2013-10-13 02:00:32 +02:00
Sebastian Kügler
c2be5b6b12 Revert bef789642e
That commit breaks the build, not finding qtest_kde.h, and cascading
errors from there.

CCMAIL:steveire@gmail.com
2013-10-12 21:47:07 +02:00
Stephen Kelly
bef789642e Remove obsolete include_directories use. 2013-10-12 15:25:19 +02:00
Aurélien Gâteau
d53a7ff03c Fix build failing to find Qt5DeclarativeConfig.cmake 2013-10-08 17:48:18 +02:00
Sebastian Kügler
bf03242380 Disable krunner-related code from the build 2013-10-08 17:37:15 +02:00
Mirko Boehm (Endocode)
a4af408b59 Fix initiaization order for Calendar. 2013-10-07 00:40:50 +02:00
Mirko Boehm (Endocode)
b590226a24 Fix initialization order for DialogProxy. 2013-10-07 00:40:41 +02:00
Sebastian Kügler
6df4a21e8a Port declarative theme away from KGlobalSettings` 2013-10-05 06:19:51 +02:00
Sebastian Kügler
5b17b0f082 Reenable tests in declarativeimports 2013-10-05 06:19:51 +02:00
Sebastian Kügler
2ca0e0eff2 find KDELibs4 2013-10-05 04:30:19 +02:00
Sebastian Kügler
b036e790a2 build without kde4support 2013-10-05 02:48:09 +02:00
Sebastian Kügler
2ad8ff7c55 plasmacomponents builds without kde4support 2013-10-05 02:48:09 +02:00
Sebastian Kügler
3c81603a8b Crudely make corebindings kde4support free 2013-10-05 02:48:09 +02:00
Sebastian Kügler
7ee3a698b0 No more kde4support for dirmodel plugin 2013-10-05 02:48:09 +02:00
Sebastian Kügler
0aa6247dd9 Use target instead of var for KF5::KI18n 2013-10-04 23:44:36 +02:00
Sebastian Kügler
b2121c1e06 cmake fixes
- finally remove KDE4_KIO_LIBS
- change KDeclarative to KF5::KDeclarative
- add KService where needed
2013-10-04 19:18:34 +02:00
Aleix Pol
1891066fc2 Adapt to kdelibs ab56e2f. 2013-10-04 18:40:47 +02:00
Stephen Kelly
0e8f31644b Add some missing links.
The
2013-10-01 14:12:29 +02:00
Marco Martin
9b3b387b0b new install targe 2013-09-18 21:36:36 +02:00
Aaron Seigo
0c68fa35bc indentation is not rocket science, but without it we lose maintainability 2013-09-13 16:29:30 +02:00
Eike Hein
eaef6cfbcb Make KDeclarativeMouseEvent's button prop usable in QML.
Qt::MouseButton is not registered, so use int instead. This
matches QML's own MouseEvent.button property.

Ack'ed by Marco Martin.
2013-09-11 19:02:27 +02:00
Marco Martin
cdc778f417 test applet for config uis 2013-09-11 17:39:09 +02:00
Martin Gräßlin
52e96b41df Ensure that the WindowThumbnail is not trying to render a thumbnail of itself
Recursive window thumbnails would look awesome on the screen, but reality
is that X/OpenGL or $DEITY doesn't like it at all and decided to just
freeze the view.

So let's delay all the redirecting till the WindowThumbnail has been
added to its QQuickWindow and if the window id is the one of the own
window we just render the icon instead.
2013-09-11 13:57:40 +02:00
Marco Martin
a7e9b1261b just use c++0x for now
gcc 4.6 and msvc still don't have -std=c++11
2013-09-11 11:15:29 +02:00
Martin Gräßlin
91d306d2e8 QQuick item for live updating window thumbnails
New qquick item in PlasmaCore to render a live updating window
thumbnail. The implementation uses XCB to redirect the specified
window using the composite extension. This means a running compositor
is not required. Through the damage extension the item tracks changes
to the window and triggers updates of the texture. Furthermore the
item tracks geometry changes of the window to recreate the window
pixmap.

If the pixmap of the window is valid, a texture is generated from it
using the glx texture from pixmap extension. For this a new optional
dependency for glx is added. On platform where glx is not available
(e.g. Windows, Linux with OpenGL ES) this will not get compiled and
the window's icon is used instead as a fallback.

REVIEW: 112142
2013-09-11 09:45:47 +02:00
Martin Gräßlin
97ce3dc808 Rework finding of XCB
Uses the new components syntax of FindXCB. So far plasma frameworks
only need the XCB component and that one is optional just like XLib.

The find xcb is moved to the toplevel CMakeLists.txt together with
the find x11 and HAVE_X11 gets set only if both X11 and XCB are found.

REVIEW: 112499
2013-09-09 06:14:35 +02:00
Marco Martin
abbe19722f use native text rendering 2013-09-06 13:43:19 +02:00
Marco Martin
89ae53097f unbreak mouse release event 2013-09-03 15:51:25 +02:00
Marco Martin
5005f2c879 add acceptedButtons prop as MouseArea 2013-09-02 15:38:00 +02:00
Ivan Čukić
6657090107 Added documentation for the Application class 2013-09-01 13:35:18 +02:00
Ivan Čukić
f786c74020 Ported the broken branch to a new one 2013-08-31 17:47:29 +02:00
Marco Martin
e8a4332034 re-add the calendar qml component
CCMAIL:heena393@gmail.com
2013-08-31 15:23:04 +02:00
Marco Martin
5ecaf1d08b add shadows to dialogs 2013-08-29 15:11:07 +02:00
Marco Martin
4c79f8fcff fix datamodel (adapt to api change)
also, change some connects to the new syntax, so next time a thing like
that gets catched
2013-08-28 22:11:55 +02:00
Marco Martin
f3729cac2d correctly filter child events 2013-08-28 14:21:51 +02:00
Marco Martin
86a2847c84 revert bd6927138f
apparently we can't tap into the valuetype conversion of QFont at all
theme.mSize(font) it is
2013-08-28 14:07:07 +02:00
Marco Martin
82a880396f install i18n iff hasn't been done yet 2013-08-28 13:53:42 +02:00
Marco Martin
04f11788ea stub for drag and drop and paste mechanism 2013-08-28 13:23:27 +02:00
Marco Martin
bd6927138f restore mSize attached property of theme fonts 2013-08-27 17:35:10 +02:00
Sebastian Kügler
19c4b555d5 Less warnings in TabButton 2013-08-27 04:27:28 +02:00
Sebastian Kügler
fd7ba8497a Use QVariantMap for data argument in newData
We need to pass the data as QVariantMap to the QML runtime, otherwise
the object can't be decoded client-side.
2013-08-27 04:26:00 +02:00
Sebastian Kügler
fa20d4b99b Parent QDrag to Item's parent
This seems more in line with general semantics, although it probably
doesn't make much of a difference here.
2013-08-26 21:43:52 +02:00
Sebastian Kügler
acba1e9471 Fix a bunch of leftovers from porting, add debug 2013-08-26 02:23:24 +02:00
Sebastian Kügler
20e9241c3a Remove KDE4Defaults 2013-08-26 02:21:53 +02:00
Sebastian Kügler
663b394d5e hasColor method for mimedata 2013-08-26 02:19:31 +02:00
Sebastian Kügler
3ccf499854 Paint a row of icons for the mimetypes 2013-08-24 03:43:26 +02:00
Andreas Cord-Landwehr
24c60ed48c Fix button width computation when height is set.
This commit fixes the button label overlapping over the button borders
when the button height is manually set to a value bigger than the
icon's smallsize.

Review done by notmart on IRC.
2013-08-22 21:14:42 +02:00
Marco Martin
0a73ce2850 if hover events are accepted, intercept them too 2013-08-20 23:03:57 +02:00
Eike Hein
4d5bac5f22 Ignore child event types we're not explicitly interested in.
MouseEventListener listens to both child events and events passing
through itself; child events are recorded so the handler for the
latter can perform a comparison and avoid emitting signals for the
same event again. However, this comparison could fail because the
member used to record the last child event would also be updated
for events we were not actually interested in.

A real-world example of this is opening a popup menu in repsonse to
a Press event. This causes an Ungrab event on the child, which would
cause the comparison to fail and mousePressEvent to announce the same
press yet again.

CCBUG:323067
2013-08-20 19:53:46 +02:00
Martin Gräßlin
531e6c3db5 Fix linking
KDEUI is dead which caused quite some collateral damage in our
CMakeLists.
2013-08-20 07:47:09 +02:00
heena mahour
b17ca9f007 Merge branch 'heenamahour/gsoc' of git://anongit.kde.org/plasma-framework into heenamahour/plasma2 2013-08-17 08:15:01 +00:00
heena mahour
3fb515ca6d Added margin Hints to highlight and indent Desktop.qml 2013-08-16 15:36:32 +00:00
Sebastian Kügler
2256c5ad1c Fix text elide in button and toolbutton
Also use a Plasma.Label, instead of doing it on our own
2013-08-14 05:46:55 +02:00
Sebastian Kügler
7fb579610a Return QObject* instead of Service*
Service* is not understood as return type, QObject is.
2013-08-14 03:26:43 +02:00
Martin Gräßlin
f50a5412ba Drop windowId property from PlasmaCore.Dialog
Property windowId was according to the comments only provided because
KWin needed it. KWin's usecase was to know the window Id of the window
where a given item is rendered to. In QtQuick a QQuickItem provides a
pointer to the QQuickWindow holding the item. This means this hack is no
longer needed.

REVIEW: 112033
2013-08-13 06:47:10 +02:00
Sebastian Kügler
fd3f1eaa35 Reduce KDE4 usage in cmake setup 2013-08-09 05:22:20 +02:00
Sebastian Kügler
db9b0016d1 remove last remains of kdebug 2013-08-09 04:14:26 +02:00
Kevin Ottens
418bcfa75a Add missing includes
The latest changes to KImageCache are slightly source incompatible, so
some types have to be included earlier.
2013-08-06 18:59:47 +02:00
Alex Richardson
7e8f62acad fix including sortfiltermodeltest.moc 2013-08-06 18:21:25 +02:00
Eike Hein
f63357bd29 Make the setData() accessor take a QVariant as payload.
The implementation now specifically tries to support byte arrays
being passed in, which is what the base class speaks. To try and
retain the previous behavior anything else is attempted to be
converted to a string and failing that, silently dropped.

REVIEW:111748
CCBUG:322567
2013-08-06 12:01:53 +02:00
Sebastian Kügler
b89451fb25 Merge branch 'master' into sebas/kplugins 2013-08-05 16:30:23 +02:00
Marco Martin
ea42678895 make minimumWidth/maximum/implicit exportable
both the applet and its compact representation can now export minimumWidth,implicitWidth etc and those are exported to the root graphics item.

the minimum width of the applet is used to collapse in popup
2013-08-05 15:37:21 +02:00
heena mahour
18266f3ab7 import org.kde.dirmodel 2.0 installed 2013-08-03 10:21:05 +00:00
Kevin Ottens
3eaa4d83f4 runnermodeltest is manual not automated 2013-08-01 12:38:47 +02:00
Sebastian Kügler
f034b84daf add ctor back in that got lost during the merge 2013-07-30 21:31:12 +02:00
Kevin Ottens
0e590217f8 Port away from kdebug 2013-07-30 08:05:09 +02:00
Giorgos Tsiapaliokas
6d000fe183 s/QVariantHash/QVariantMap.
QVariantHash isn't consumable from QML
2013-07-29 19:09:06 +03:00
Sebastian Kügler
d3b9cf5f35 merge 2013-07-25 14:45:49 +02:00
Kevin Ottens
c42406cabc Pull in the KDE4Attic dependency 2013-07-25 11:54:15 +02:00
Sebastian Kügler
06925637a7 Merge branch 'master' into sebas/kplugins 2013-07-18 11:59:42 +02:00
Marco Martin
c0f3730686 forward port the scrolling fixes of plasma1 vers 2013-07-16 19:30:25 +02:00
Sebastian Kügler
84cd704368 Merge branch 'master' into sebas/kplugins 2013-07-12 10:35:09 +02:00
Alex Neundorf
454bf83be3 -adapt to current changes in kdelibs regarding kde4support: use ${KDE4Support_LIBRARIES} when using it
Search for KDE4Support, but after searching KDELibs4, this is hackish, but currentlx necessary due to
cyclic dependencies we still have

Alex
2013-07-11 22:57:04 +02:00
Sebastian Kügler
21c04fd3d3 Merge branch 'master' into sebas/kplugins
Conflicts:
	CMakeLists.txt
2013-07-09 02:34:36 +02:00
Sebastian Kügler
a9c022f5b9 Cleanups 2013-07-03 05:12:30 +02:00
Sebastian Kügler
95aa0eee7d remove tdata accessor again 2013-07-03 00:41:54 +02:00
Sebastian Kügler
f9502edb14 Convert to use QVariantMap throughout
This makes it possible again to use DataSource.data from QML. Some more
optimizations are needed, but it already basically works.
2013-07-03 00:39:54 +02:00
Sebastian Kügler
ad08301db4 Add temporary QVariantMap data accessor 2013-07-02 03:21:30 +02:00
Marco Martin
5b0b17f86a respect contents hints 2013-07-01 18:21:29 +02:00
Kevin Ottens
c36c625d9c Port away from KUrl 2013-06-27 16:39:03 +02:00
Sebastian Kügler
6389825172 User Q_ macros for signals and slots 2013-06-21 02:22:02 +02:00
Marco Martin
b324f520fb qt5 port of DirModel 2013-06-19 17:38:06 +02:00
Sebastian Kügler
2b6eea985e use ecm macros for tests in qtextracomponents 2013-06-19 02:51:59 +02:00
Sebastian Kügler
66ed317518 Port and enable unit tests for core bindings
All pass.
2013-06-19 02:48:09 +02:00
Sebastian Kügler
eafac77910 clean up include 2013-06-19 01:15:08 +02:00
Sebastian Kügler
728cf2e53f don't use startdragdistance here
emit click if the cursor is still in the area regardless of the
distance travelled
this because MouseEventListener doesn't start drags

BUG:320893
FIXED-IN:4.11

cherry-picked from ac9592832893cd6562dc0747f8afc1d7f89442c8 in
kde-runtime
2013-06-17 15:25:29 +02:00
Sebastian Kügler
057d592a1a Ensure the busyindicator is square 2013-06-17 15:22:15 +02:00
Marco Martin
50ee44b70d Merge branch 'PlasmaTypesClass' 2013-06-12 11:24:03 +02:00
Marco Martin
7a7914126e Switch is a CheckBox on desktop
the sliding Switch is touch specific
2013-05-25 12:50:32 +02:00
Marco Martin
669ed7a35c register Units 2013-05-16 13:39:30 +02:00
Marco Martin
570d0bdc05 export the Plasma::Types object 2013-05-15 19:51:05 +02:00
Marco Martin
75cbf80f47 add Units from Plasma1 2013-05-15 17:58:30 +02:00
Marco Martin
e07cbe99af allow last column to be bigger
last column wisth is regulated by the page's implicitWidth, but the
final with will always be a multiple of columnWidth
2013-05-15 14:16:44 +02:00
Marco Martin
812b9a06ab get rid of Plasma::Location 2013-05-14 18:27:27 +02:00
Marco Martin
e07600a83f Put all Plasma emums in a Types class
This makes possible to use them directly frmo QML
as a minus, is not pretty and requires tons of search and replace in old
c++ code
2013-05-10 19:29:13 +02:00
Marco Martin
c13a58cf11 checkable and checked properties 2013-05-09 16:16:16 +02:00
Marco Martin
4692c941af add ServiceOperationStatus binding
this class is used to monitor the enabled status of service operations
2013-05-02 18:56:00 +02:00
Marco Martin
08ed91d7e0 Data is a QVariantmap again
this means that DataEngines and the Storage Service are directly usable from QML2 again
2013-05-02 18:02:38 +02:00
Sebastian Kügler
47c63deb6f elegantly work around
the hack
2013-04-30 02:59:02 +02:00
Sebastian Kügler
b68317e930 Use QVariant for MenuItem::icon
This way, we can cover string and QIcon assignments transparently,
another backwards compatibility fix, and easier thing in Plasma2: Now
the user doesn't have to worry about creating QIcons, but can just
assign the icon name, and it will get loaded from the theme. Models that
provide QIcons (such as QStandardItems) now work correctly with
PlasmaCore.MenuItems.
2013-04-30 02:50:42 +02:00
Sebastian Kügler
e4976005c6 Fix crasher with 0x0 windows
It can happen that the visualParent has no window attached, so don't
access it. In this case, use the visualParent's geometry.
2013-04-30 02:33:17 +02:00
Marco Martin
31e39640ce correct kdeclarative includes 2013-04-26 17:36:45 +02:00
Stephen Kelly
268f44fc3b Remove use of qt4_automoc.
It is obsolete.
2013-04-12 11:09:43 +02:00
Anant Kamath
f66a3608c0 Fixed exporting flags to QML 2013-04-12 03:12:04 +05:30
Sebastian Kügler
39de2a637c Fix crash in SortFilterModel::mapRowFromSource()
It was not using the correct model to get the source index from the
row.

Patch by Aurélien Gâteau

CCMAIL:agateau@kde.org
REVIEW:109946
2013-04-10 16:19:34 +02:00
Sebastian Kügler
63366d4218 a few more optimizations and better docs for tooltip 2013-04-09 04:38:06 +02:00
Sebastian Kügler
3859dbdd07 Improve API docs 2013-04-09 04:02:19 +02:00
Sebastian Kügler
e7887ee199 more removal of unnecessary stuff 2013-04-09 03:52:59 +02:00
Sebastian Kügler
3bd1d939e8 remove maincomponent and target properties from tooltipproxy 2013-04-09 03:50:43 +02:00
Sebastian Kügler
50a4abac6d ToolTip polishing
- manage mainComponent entirely in ToolTip.qml
- less resizing/setvisible makes it faster and smoother
- fix timer connects in dialog
- Kill dead code
2013-04-09 03:42:54 +02:00
Sebastian Kügler
2cc96aac45 kill tooltipwindow implementation
We use a dialog subclass-singleton now.

I love the smell of dead code in the morning.
2013-04-09 01:27:25 +02:00
Sebastian Kügler
9eda3882ca Make tooltip positioning work 2013-04-09 00:09:07 +02:00
Marco Martin
c3e2a6e671 smaller sectionscroller 2013-04-05 11:08:30 +02:00
Sebastian Kügler
e0c7eaafad dynamic object creation inside tooltip
The mainItem is now a Component, which gets created on demand and passed
to the tooltip dialog.

Positioning is a bit off now, but it basically seems to work as we'd
like it to.
2013-04-05 04:27:55 +02:00
Sebastian Kügler
8eab0f20f2 tooltip now uses a dialog
A bit crude, and only half-working, but shows up
2013-04-05 01:10:53 +02:00
Sebastian Kügler
feda4f5013 make tooltipdialog a singleton 2013-04-05 00:30:17 +02:00
Sebastian Kügler
e48908eb70 add tooltipdialog class
Let's try to share more code with dialog -- especially sizing, frame
painting and positioning with dialog. This means a bit of rewiring, but
should result in more lazy-loaded, shared objects.

The idea is to have at most one window, which is recycled for all
tooltips, making it possible to animate transitions.
2013-04-04 23:50:44 +02:00
Sebastian Kügler
95dddcea35 split tooltip and tooltipwindow 2013-04-04 23:33:05 +02:00
Sebastian Kügler
d207025d8f Blur behind for tooltips
Also clean up flags a bit.
2013-04-04 16:00:57 +02:00
Sebastian Kügler
010f471bc7 Restore API: ToolTip.visualParent becomes target 2013-04-04 05:11:31 +02:00
Sebastian Kügler
e4ee4d6dd0 basic tooltip featureset finished
This implementation deviates a bit from the Plasma 1 tooltips:
- image is now a string
- tooltips align to the parent by default, or the visualParent set
Otherwise, the changes should be fairly transparant.

A crude basic featureset works.
2013-04-04 05:02:51 +02:00
Sebastian Kügler
c739f3ae58 Increase margins a bit, wm hints 2013-04-04 02:02:10 +02:00
Sebastian Kügler
7e6d750f2a Window size synching with tooltip content 2013-04-04 01:46:02 +02:00
Sebastian Kügler
efd12a5ec1 Add components to default tooltip, fix layout 2013-04-04 01:27:14 +02:00
Sebastian Kügler
20a4e6ca43 add ToolTip.qml 2013-04-03 20:23:51 +02:00
Sebastian Kügler
a6526d7bbe Start rewrite of tooltip
ToolTipProxy is now a QQuickWindow and renamed to ToolTipWindow.
This is done in C++.
ToolTip itself is a QML file, which internally uses tooltipwindow to
display the attached item.

Basic showing / hiding and embedding an Item works, positioning,
margins, etc are not implemented yet. Neither are special windowmanager
hints and flags.
2013-04-03 02:23:22 +02:00
Sebastian Kügler
1c5faf9271 add fixme 2013-04-03 02:22:56 +02:00
Sebastian Kügler
0bac65e374 Strip down tooltip so it builds 2013-04-03 00:50:00 +02:00
Sebastian Kügler
76ced6ff80 Remove fixed FIXME 2013-04-03 00:49:36 +02:00
Sebastian Kügler
cbe0d39b99 add spacing in buttonrow and column 2013-03-27 22:27:22 +01:00
Sebastian Kügler
ad1311ddd3 Attach an image to the drag
it now works with delegate, color and image, urls in the form of icons
tbd.
2013-03-27 02:50:45 +01:00
Sebastian Kügler
a0fb4356dc Positioning of Menu on screen
Actually quite a bit more lightweight than its QGV predecessor.
2013-03-26 22:34:35 +01:00
Sebastian Kügler
0ef4080e4f positioning for context menu 2013-03-26 22:17:25 +01:00
Sebastian Kügler
335e0b6d9d Port Menu and MenuItem to QtQuick2
In MenuItem, we can't inherit QAction anymore (our MenuItem has to be a
QQuickItem), so we need to aggregate, which means adding glue API.

Positioning code is disabled, icons broken, but a QMenu with our items
inside shows up and is works.
2013-03-26 20:15:56 +01:00
Sebastian Kügler
9c6b7539bc fix namespacing in ContextMenu 2013-03-26 01:12:04 +01:00
Marco Martin
ed36b6aab4 bigger clear button 2013-03-20 21:14:04 +01:00
Sebastian Kügler
f972925392 these signals have gone 2013-03-19 03:34:28 +01:00
David Faure
c82ff42e76 remove old include 2013-03-13 12:16:35 +01:00
Marco Martin
99bab1825e get rid of PaintUtils
the only one using it was PlasmaCore.IconItem, move the transition() function there
2013-03-13 12:05:06 +01:00
Marco Martin
620478614a remove unused QGraphics* includes 2013-03-13 11:45:34 +01:00
Marco Martin
3bfbc31381 remove some not used includes 2013-03-13 11:32:00 +01:00
Sebastian Kügler
a3b39a8321 All imports are now 2.0
This patch changes the version numbers of the plugins to 2.0. This
includes the previously 0.1 plasmacomponents, extras and
qtextracomponents. DragandDrop, which was at 1.0 is now also at 2.0.

Also, all the QML code has been changed to import the 2.0 plugins.

As a side-effect, we now share a version number with QtQuick 2.0 now.
2013-03-13 02:34:53 +01:00
Sebastian Kügler
4cfc6863af change all 0.1 imports to 2.0 in qml files 2013-03-13 01:56:19 +01:00
Marco Martin
dd0cc2464d ThmemeProxy is a subclass of Theme 2013-03-12 16:49:33 +01:00
Marco Martin
fd97160327 remove the singleton usage from everywhere 2013-03-12 16:29:04 +01:00
Marco Martin
b7a079f87d replace homepage() with pluginInfo()
a KPluginInfo will have the homepage from the desktop file but also the other data as well such as author and description
2013-03-11 18:01:22 +01:00
Marco Martin
62c8a7b500 don't expose windowTranslucencyEnabled 2013-03-11 17:39:42 +01:00
Marco Martin
2894eef3c4 add notify signal for font properties 2013-03-11 17:26:01 +01:00
Marco Martin
83baa3691e theme.defaultFont.mSize api changed
QML2 has QFont directly binded, but doesn't have mSize, so move it to Theme
theme.defaultFont.mSize to theme.mSize(theme.defaultFont)
2013-03-11 17:06:05 +01:00
Marco Martin
74d1a62bdd remove fonts from Plasma::Thmeme
replace FontProxy with default QFont QML2 bindings
2013-03-11 16:59:39 +01:00
Marco Martin
a4b22cc7d4 warnings-- 2013-03-07 12:01:29 +01:00
Marco Martin
e6eae78f06 propagate size hints 2013-03-07 12:01:29 +01:00
Marco Martin
7d79041e2a propagate size hints 2013-03-07 12:01:29 +01:00
Sebastian Kügler
1a31c22e57 debug-- 2013-03-07 02:42:13 +01:00
Sebastian Kügler
5a30426e07 test mimedata attachment and transport from drag to drop area
Works for me.
2013-03-07 01:08:55 +01:00
Sebastian Kügler
37e3ef99f0 Make mouse interaction work
- events need to be accepted, otherwise they don't have effect on the
  drag, and it doesn't get released
- slightly more intelligent starting of drag, saves quite some cycles
  and is way more correct this way

The "attach pixmap of dragged item" is still disabled. This probably
needs to be rethought entirely. One option would be to ditch this class
in favour of QtQuick 2's Drag, DragEvent and DropArea. Food for API
discussion.
2013-03-07 00:26:39 +01:00
Marco Martin
f4de55af67 use KAction from kde4support
it should buld again, usingkaction as type for kactioncollection
2013-03-04 15:46:47 +01:00
Marco Martin
be06b06015 support for panel icon sizes 2013-03-01 16:11:08 +01:00
Sebastian Kügler
8a386d065c add a bit of debugging info
which shows that we're getting wrong events right now. :/
2013-02-27 22:13:14 +01:00
Sebastian Kügler
3ee1474c17 draganddrop: all classes build and are enabled 2013-02-27 19:24:44 +01:00
Sebastian Kügler
b60983ca1f Port DeclarativeDragDropEvent 2013-02-27 18:55:53 +01:00
Sebastian Kügler
4fc1dbef00 draganddrop: more porting, build some bits already 2013-02-27 17:59:03 +01:00
Sebastian Kügler
2168bdec75 no i18n right now 2013-02-27 14:54:55 +01:00
Sebastian Kügler
112fb3f78a Fix API 2013-02-27 14:54:55 +01:00
Sebastian Kügler
f79c3833bd Start port of drag and drop import 2013-02-27 14:54:55 +01:00
Marco Martin
6777a7dc56 call superclass event handlers 2013-02-27 14:51:12 +01:00
Marco Martin
854ecdcf5b make sure the dialog is resized before showing
crash--
probably there is a bug in scenegraph when one calls show() of a 0,0 size wondow
2013-02-27 14:35:34 +01:00
Aaron Seigo
4cb892dd04 only create a new svg item if we don't already have one 2013-02-26 14:50:41 +01:00
Sebastian Kügler
45147081e7 Fix comment 2013-02-26 05:47:12 +01:00
Sebastian Kügler
2032816118 Disable borders when we're hitting the screen's edge 2013-02-26 05:39:49 +01:00
Sebastian Kügler
d6b66ecb96 Switch enabledBorders based on popupPosition 2013-02-26 04:50:00 +01:00
Sebastian Kügler
6a73133da4 positioning for popups
- default top TopEdge
- Swap edges if specified
- shift on non-specified edges
- all borders, edge-cases (ha!) are confirmed working
- cleaned up some cruft

Not taken care of yet:
- framesvg border disabling
- sliding effect w/ kwin
- smarter resolution of visualParent
2013-02-26 03:58:55 +01:00
Sebastian Kügler
9b4db5a7b4 Basic edge locations working inside PlasmaCore.Dialog 2013-02-26 02:17:21 +01:00
Sebastian Kügler
8131ad0abc Add PlasmaNamespace as PlasmaCore.Plasma
This is not beautiful, so we'll change it later on, for now, this allows
us to test enum settings.
2013-02-26 01:10:28 +01:00
Sebastian Kügler
e2a2a9f6d2 revert int -> Qt::AlignmentFlag for location 2013-02-25 17:55:06 +01:00
Sebastian Kügler
9e8f112be0 a few lingering bits of dialog layout code, not enabled 2013-02-25 16:48:04 +01:00
Sebastian Kügler
0faa120641 Convert alignment to Qt::AlignmentFlag
Also start a bit on the logic of setting location. Does nothing yet, but
build.
2013-02-22 16:45:08 +01:00
Sebastian Kügler
7c9d0abc23 Use Qt::AligntmentFlag instead of int for popupPosition 2013-02-22 03:54:14 +01:00
Sebastian Kügler
00c93c186d Test code for placement 2013-02-22 03:43:09 +01:00
Sebastian Kügler
8f71cf9de7 Center in visualParent by default
If we have no visual parent, use the workArea's center. This is mostly
in line with Plasma1's behavior (modulo visualParent vs. parent).
2013-02-22 03:41:56 +01:00
Sebastian Kügler
006eb99b55 Make dialog-in-separate-window kind of work
inlining is still broken, disabled right now. popupPosition has moved
into PlasmaCore.Dialog internally, so don't handle it in QML.
2013-02-22 02:18:16 +01:00
Sebastian Kügler
e96671be05 Add debugsels for popupPosition 2013-02-22 02:18:16 +01:00
Marco Martin
73ab93e009 use the margins of the framesvg instead of own 2013-02-21 16:04:08 +01:00
Marco Martin
799a5989d9 enable blur behind 2013-02-21 14:58:09 +01:00
Marco Martin
31838228d4 add missing declaration 2013-02-21 14:49:28 +01:00
Marco Martin
efc725acec use a framesvgitem as background 2013-02-21 14:32:48 +01:00
Marco Martin
de81cdada3 implement popupPosition
call it only by setting a visualParent, don't expose it to qml for now
2013-02-20 20:39:15 +01:00
Marco Martin
a1507092a0 restore isactivewindow 2013-02-20 19:39:03 +01:00
Marco Martin
7ce2d0f7d6 sync sizes also on the other way 2013-02-20 19:31:06 +01:00
Marco Martin
f7e3a72d14 iremove unused properties
x,y,width,height are already in qquickwindow
2013-02-20 18:03:28 +01:00
Marco Martin
8ba734f05b correct item resize
comment out more old api

will be reenable one by one only when needed
2013-02-20 15:51:28 +01:00
Marco Martin
059682af85 less dead code 2013-02-20 15:25:13 +01:00
Marco Martin
1928ecce74 make sure a transparent window 2013-02-20 15:18:58 +01:00
Sebastian Kügler
6461683f58 Some work on PlasmaComponents.Dialog
Still broken in all kinds of ways, buttons, geometry, etc.
2013-02-20 06:56:48 +01:00
Sebastian Kügler
0fe94f0dac try to make dialog transparent 2013-02-20 06:56:38 +01:00
Sebastian Kügler
ea508733d6 Rejig Dialog - starts working
It now inherits from QQuickWindow.

setting the mainItem is not reparenting it right now, this will probably
break, so needs fixing. For now, it works though as long as the mainItem
has the Dialog as parent already. WindowFlags and sizing seems to work.
2013-02-20 05:30:22 +01:00
Sebastian Kügler
305e711c8c Fix namespace of RangeModel in Slider and ProgressBar
Now those components work as well.
2013-02-20 05:27:11 +01:00
Sebastian Kügler
71e2114541 Fix RangeModel namespace 2013-02-20 05:24:03 +01:00
Sebastian Kügler
2566309c9a Start porting PlasmaCore.Dialog
This commit enables the build of PlasmaCore.Dialog. Most of the code is
disabled, as it's quite wired up with QGraphicsWidgets. The remaining
pieces are actually able to bring up a window, but don't display
anything.
2013-02-20 04:25:29 +01:00
Sebastian Kügler
226e61c432 module directive for runnermodel 2013-02-20 02:31:33 +01:00
Sebastian Kügler
0c2793718b shush 2013-02-20 02:27:41 +01:00
Sebastian Kügler
4375b61759 Add module identier to qmldirs 2013-02-20 02:09:23 +01:00
Sebastian Kügler
4683f10dcb Fix namespacing in Sheet 2013-02-20 01:36:22 +01:00
Sebastian Kügler
55a9091992 Use Item as type for ToolBar, apparently we can't use our own defined types here anymore 2013-02-20 01:36:08 +01:00
Sebastian Kügler
d3ce808a41 Fix namespacing in SectionScroller 2013-02-20 01:35:27 +01:00
Sebastian Kügler
af1ca41261 Fix namespacing in PageStack 2013-02-20 01:34:57 +01:00
Sebastian Kügler
614259cf69 Fix namespacing in Dialog 2013-02-20 01:34:26 +01:00
Sebastian Kügler
0900460842 Fix namespacing in SelectionDialog 2013-02-20 01:34:07 +01:00
Sebastian Kügler
bb842b64d2 Fix namespacing in QueryDialog 2013-02-20 01:33:57 +01:00
Sebastian Kügler
b8ccb0ded6 Fix namespacing in CommonDialog 2013-02-20 01:33:43 +01:00
Sebastian Kügler
59e65cbaee Fix import in ButtonColumn 2013-02-20 01:33:01 +01:00
Sebastian Kügler
fec80c2c96 Remove activeFocus property, it's moved up into one of its parents 2013-02-20 01:09:08 +01:00
Sebastian Kügler
36564796d0 Fix namespacing for RangeModel in ScrollBar 2013-02-20 01:08:52 +01:00
Sebastian Kügler
4e82cc5d3d TextField polishing
- remove call to closeSoftwareInputPanel before calling it, it's removed
  from TextInput in commit
3721de405e
I suppose it now "just works", but will test. The API is not there,
anyway, so it's safe to remove.
- clearbutton only shows when enabled
- clearbutton rightmargin
2013-02-20 00:26:33 +01:00
Sebastian Kügler
48cd938931 do not override TextField.activeFocus property
In QtQuick2, we cannot override a property anymore. In the case of
TextField, this means we'll have to rely on Qt for focus handling.
2013-02-19 22:32:41 +01:00
Marco Martin
97d8362774 fix isValid() 2013-02-19 17:50:38 +01:00
Sebastian Kügler
b15f6baebd Port, make build and enable KRunnerModel plugin 2013-02-18 01:15:01 +01:00
Sebastian Kügler
6aa3947cd8 clean up linker targets in PlasmaExtras 2013-02-18 01:14:23 +01:00
Sebastian Kügler
e7034a50cb remove traces from dataengineconsumer and declarativeitemcontainer
dataengineconsumer is now used from kdelibs
declarativeitemcontainer is not needed with QtQuick2
2013-02-18 01:03:42 +01:00
Sebastian Kügler
1e13f5718e Fix off-by-one in RunnerModel
Forward-ported from RB

REVIEW:108922
2013-02-16 14:47:13 +01:00
Sebastian Kügler
bb32d5b080 Port eventFilter to Qt5/QtQuick2
Now all events already caught by children also propagate into the
MouseEventListener, making it work completely as it should (tested).
2013-02-15 16:34:09 +01:00
Sebastian Kügler
ac5a34dfe4 DeclarativeItemContainer goes the way of the Dino 2013-02-15 16:12:42 +01:00
Sebastian Kügler
69dbc5a202 Finalize port of Locale bindings
Small, likely irrelevant API changes:

* removed: bool useTranscript(...)
* removed: QString translateQt(...)

has been removed in kdelibs as well, and is
removeAccelerator now uses KLocalizedString, and is expected to fully
work, so is isApplicationTranslatedInto().

Another module fully ported. :)
2013-02-15 05:32:47 +01:00
Sebastian Kügler
19d9a2b88b Port, build Locale bindings
This enables 90% of the Locale bindings. Some translation-related things
need changing.
2013-02-15 05:13:53 +01:00
Sebastian Kügler
e071a0fdd0 small cleanup 2013-02-15 04:05:58 +01:00
Sebastian Kügler
7a2828c7b3 Enable dataenginebindings: QScriptValues for engines 2013-02-15 04:04:51 +01:00
Sebastian Kügler
6c6acb9944 A whole bunch of types in PlasmaCore
This enables, ports where necessary, the rest of the DataEngine classes,
ServiceJob handling, and RunnerManager.

Now, more or less only Dialog and ToolTip are unported. Those will need
reimplementations for QtQuick2.
2013-02-15 04:01:53 +01:00
Sebastian Kügler
8fa8e6675b registerType SortFilterModel 2013-02-15 03:48:53 +01:00
Sebastian Kügler
2ef90c4a12 Port, build and register DataModel 2013-02-15 03:46:49 +01:00
Sebastian Kügler
1c3ee1168a registerType DataSource 2013-02-15 03:36:00 +01:00
Sebastian Kügler
d8f9f8be9b Port Core.DataSource to Plasma2 2013-02-15 03:33:22 +01:00
Sebastian Kügler
d7ac446c43 Enable build of PlasmaExtras 2013-02-15 02:44:21 +01:00
Sebastian Kügler
b8ac0c045c Port PlasmaExtras to Qt5
The only thing missing is ResourceInstance, which needs KActivities
ported to Qt5 first. Otherwise, seems to work.
2013-02-15 02:41:31 +01:00
Sebastian Kügler
72ebf77b53 PlasmaExtras: switch imports to QtQuick 2.0 2013-02-15 02:11:38 +01:00
Sebastian Kügler
cf04f4591b Port MouseEventListener to QtQuick2
All those signals work, I'm not quite sure what the eventFilter is used
for, the Item seems to work just fine without it. I've left it disabled
for now, maybe we can kill this code?

CCMAIL:mart@kde.org
2013-02-15 01:38:40 +01:00
Sebastian Kügler
57bac0cdaa register types for {QImage|QPixmap}Item 2013-02-15 00:24:30 +01:00
Sebastian Kügler
a283134b3e Port QtExtras.QImageItem to Qt5, enable build 2013-02-15 00:20:01 +01:00
Sebastian Kügler
49dee59515 Port QtExtras.QPixmapItem to Qt5, enable build 2013-02-15 00:16:21 +01:00
Marco Martin
8b5ea692b3 add another include dir 2013-02-14 19:47:08 +01:00
Sebastian Kügler
7dfe957e66 The Big Move
All cpp code moves into the src/ subdirectory, as the Frameworks policy
suggests.

Directory structure should now be in line with other, future frameworks.
2013-02-14 17:17:12 +01:00