Commit Graph

172 Commits

Author SHA1 Message Date
Marco Martin
9c695c5cf5 add a shadow 2011-10-10 14:02:48 +02:00
Marco Martin
3da7704b3a use the font size for control size 2011-10-10 13:39:16 +02:00
Marco Martin
94ad9f8d3f private ButtonShadow for shadow/hover of buttons
also, don't export DusalStateButton
2011-10-10 13:04:22 +02:00
Marco Martin
554399afc7 a method to fetch custom size wallpapers 2011-10-09 16:12:58 +02:00
Aaron Seigo
b0783ce5f7 a slew of clean ups and improvements to the code
DataSource still needs to be made to not keep a private copy of all the data
2011-09-22 22:45:26 +02:00
Marco Martin
e8bcc257e1 Merge branch 'plasma/declarative' 2011-09-18 16:42:30 +02:00
Marco Martin
734d0e15df unfortunately this is still needed 2011-09-16 19:20:49 +02:00
Marco Martin
27c857db82 pre-populate the model if needed
since DataModel is a consumer of a consumer, in the case DataSource as already data, populate the model with it without waiting for the signal
2011-09-15 23:05:44 +02:00
Marco Martin
ccc5bf7b90 queued connection is not necessary anymore
all data is checked for possible roles now
2011-09-15 21:06:05 +02:00
Marco Martin
e18e08c2f1 don't cache empty sources 2011-09-15 21:05:06 +02:00
Marco Martin
0fec8e54c5 move rangemodel in a components plugin 2011-09-13 21:21:29 +02:00
Marco Martin
e5b43a7357 Merge branch 'master' into plasma/declarative
Conflicts:
	plasma/declarativeimports/core/CMakeLists.txt
	plasma/declarativeimports/core/corebindingsplugin.cpp
	plasma/declarativeimports/plasmacomponents/BusyIndicator.qml
	plasma/declarativeimports/plasmacomponents/ScrollBar.qml
	plasma/declarativeimports/plasmacomponents/qmldir
2011-09-13 20:43:59 +02:00
Marco Martin
b68fb0a060 be sure to include ALL role names
some dataengines can have a different set of keys for each item (ie metadata dataengine) the whole mapped roles must be the complete superset
this is not very efficient, but unfortunately is necessary.
(another reason  why DataContainers should become models)
2011-09-12 21:34:55 +02:00
Marco Martin
d48888e7ac default to 0 interval (no polling) 2011-09-01 16:25:31 +02:00
Marco Martin
e24624f80c graphics for checkboxes and radio buttons 2011-08-30 23:04:45 +02:00
Marco Martin
019617f3bc paint grey when disabled 2011-08-20 17:43:36 +02:00
Marco Martin
6d7b475468 location property that decides the sliding effect 2011-08-15 19:32:01 +02:00
Marco Martin
e8432fe351 don't reset the model if the source isn't ours 2011-07-25 19:11:36 +02:00
Daker Fernandes Pinheiro
90123fa75e Add gallery example for ProgressBar plasma component
Also refactored the busy indicator gallery code and
agregated it with the progress bar gallery.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-25 00:20:16 -03:00
Daker Fernandes Pinheiro
1edb412e52 Add ProgressBar plasma component
The ProgressBar is defined in the Qt Components common API.
It has a orientation property, usign Qt.Horizontal or
Qt.Vertical to set the orientation of the component.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-25 00:14:51 -03:00
Daker Fernandes Pinheiro
dd136c42bd Add gallery example for TextArea plasma component
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-22 16:13:26 -03:00
Daker Fernandes Pinheiro
decbcb0439 Add TextArea plasma component
The TextArea is defined in the Qt Components common API.

Some features were added as a plasma specific behaviour for this component:

- It emit the keys pressed and released signals
- Implements a focus policy
- The current implementation only covers the desktop use case.
    For mobile use, a flickable text area with scroll decorators
    would be more appropriate.
- Scroll bars appears only if the content is bigger than the content.
- The width of the the scroll bars can be setted through the scrollWidth
    property
- The size of the text content can also be setted. For this the properties
    contentMaxWidth and contentMaxHeight must be used. The default value
    is the dimensions of the TextArea.

The current state of the implemention lacks of:

- A behaviour for hover state, present in other components
- A errorHighlight usage
- Polish the visual alignment of the SVGs items
- Lacks of right mouse button interaction.
    Would be interesting to use it to cut & paste operations.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-22 16:12:36 -03:00
Daker Fernandes Pinheiro
d318641dcf Fix ScrollBar plasma component incrementValue function
- The function was not bounding the value after incremented
    inside the flickable content size.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-21 17:48:31 -03:00
Daker Fernandes Pinheiro
db7cd67033 Add gallery example for TextField plasma component
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-21 10:16:42 -03:00
Daker Fernandes Pinheiro
b37a2230b7 Add TextField plasma component
The TextField is defined in the Qt Components common API.

Some features were added as a plasma specific behaviour for this component:

- It emit the keys pressed and released signals.
- Implements a focus policy

The current state of the implemention lacks of:

- A behaviour for hover state, present in other components
- A errorHighlight usage

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-21 10:16:34 -03:00
Daker Fernandes Pinheiro
3a984f05b0 Add enabled/disable support for ScrollBar plasma component
- The current disabled scroll bar have less opacity when disabled
   instead of custom graphics. Needs to be defined if this is
   the expected behaviour.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-18 19:17:19 -03:00
Daker Fernandes Pinheiro
b9e69695bd Add enabled/disable support for Slider plasma component
- The current disabled slider have less opacity when disabled
   instead of custom graphics. Needs to be defined if this is
   the expected behaviour.

- The gallery example was also updated.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-18 19:16:38 -03:00
Daker Fernandes Pinheiro
3ab58b3877 Fix comments about graphics for plasma components enabled/disabled properties
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-18 18:49:45 -03:00
Daker Fernandes Pinheiro
4ff2523d13 Add enabled/disable support for CheckBoxes, RadioButtons and Switches plasma components
- The current disabled CheckBoxes, RadioButtons and Switches,
   have less opacity when disabled instead of custom graphics.
   Needs to be defined if this is the expected behaviour.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-18 18:41:07 -03:00
Daker Fernandes Pinheiro
487d79bce3 Add enabled/disable support for Button plasma component
- The current disabled buttons have less opacity when disabled
   instead of custom graphics. Needs to be defined if this is
   the expected behaviour.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-18 18:20:49 -03:00
Daker Fernandes Pinheiro
83bd875a44 Add focus and key events handling on Buttton plasma component
- When a button is clicked it aqcuires the focus.
- The space and return keys now can be used to press the button if
  it has the activeFocus

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-15 21:21:06 -03:00
Daker Fernandes Pinheiro
38284f8e1a Fix Highlight plasma component margins
The SVG margins was not being considered.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-15 20:51:42 -03:00
Daker Fernandes Pinheiro
93f4b0efb5 Add handleSize property to control the handle size of the plasma Slider component
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-15 20:45:08 -03:00
Daker Fernandes Pinheiro
8a3162b431 Fix Plasma ScrollBar flickableItem position binding when mouse or keys are used
The RangeModel value was being incremented directly by the mouse and keys
events, and it was overriding the binding with the flickableItem position.
Once the ScrollBar button was clicked, the direct manipulation of the
flickable component was not updating the scroll position.

The new function 'incrementValue' now does the correct work.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-15 10:03:17 -03:00
Daker Fernandes Pinheiro
cba7e6204a Add Color Picker on Sliders Plasma Components Gallery
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-15 09:24:44 -03:00
Aaron Seigo
e3f18bded0 only let a source be valid if there is an engine and the engine is valid 2011-07-15 13:18:48 +02:00
Aaron Seigo
e2f4b4ecc2 protect against accessing a null 2011-07-15 13:18:47 +02:00
Aaron Seigo
201baafc1c mainitem can be null according to the if() below, so respect that 2011-07-15 13:18:47 +02:00
Daker Fernandes Pinheiro
d9cc5a1ba6 Refactor Plasma Components Gallery
- Move columns present in the gallery into separate files
- Move Gallery into a subdir of tests

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-14 12:10:08 -03:00
Daker Fernandes Pinheiro
355655e0d4 Add ScrollDecorator component
ScrollDecorators API is defined in QtComponents's common API
This component just diplay how a Flickable content size and
content position is. It's similar to a ScrollBar but is not
interactive.

The current implemetation makes it visible only when flickable
content is moved.

The plasma implementation has 2 extra properties:
- orientation: Qt.Vertical / Qt.Horizontal orientaion
- inverted: true if the scroll decorator should appear inverted
  (the same logic of Slider and ScrollBar)
  it has a false default value

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-14 11:04:20 -03:00
Marco Martin
6354e56a91 emit visiblechanged when it should 2011-07-12 20:31:29 +02:00
Daker Fernandes Pinheiro
00576442cc Add ButtonRow and ButtonColumn
- Add ButtonGroup.js which contains the logic behind ButtonRow/Column
- Code taken from desktop qt-components

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 19:56:50 -03:00
Daker Fernandes Pinheiro
69670fcd56 Add copyright for BusyIndicator
Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 19:21:24 -03:00
Daker Fernandes Pinheiro
33b63aa125 Change BusyIndicator smoothAnimation property default to be true
- Also simplified the BusyIndicator gallery example

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 18:52:40 -03:00
Daker Fernandes Pinheiro
363e341f66 Remove ListItemView supports
- ListItemView, ListItem were removed because could be easily built using ScrollBar
- ListHighlight was renamed into Highlight

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 18:49:40 -03:00
Montel Laurent
addf0945a1 Fix compile warning 2011-07-08 22:06:29 +02:00
Daker Fernandes Pinheiro
30889de6e7 Refactor Switch, CheckBox, RadioButton to extend a single DualStateButton
- To extend the dual state button, just add the visual component in the view property

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 15:11:55 -03:00
Daker Fernandes Pinheiro
a650da9ee5 Add Switch component
API and code based on CheckBox

- Misses the Switch resources
2011-07-08 14:53:52 -03:00
Daker Fernandes Pinheiro
8dc9dcd090 Add keyboard events handling in RadioButton and CheckBox
When space or return is pressed, it changes the component state.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 14:41:46 -03:00
Daker Fernandes Pinheiro
5ac7ececa9 Add keyboard events handling in Slider
Using the arrow keys enables the user to increase/decrease stepSize units
from the Slider's value.

Signed-off-by: Daker Fernandes Pinheiro <dakerfp@gmail.com>
2011-07-08 14:41:13 -03:00