Commit graph

11 commits

Author SHA1 Message Date
Sergey Starosek
ec1088f2cc Ignore mouse wheel events on tags widget
This prevents tags widgets (dive tags and buddy) from grabbing
focus on mouse wheel events but allows entering dive edit mode
on mouse click.

It was attempted earlier by Dirk (commit d117beca), but edit mode
did not work properly.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-19 13:56:06 -08:00
Dirk Hohndel
a27f67c026 Whitespace and coding style updates
Another futile attempt to cleanup the code and make coding style and
whitespace consistent. I tried to add a file that describes the key points
of our coding style. I have no illusions that this will help the least
bit...

This commit should ONLY change whitespace

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 11:50:56 +07:00
Sergey Starosek
4659b594f0 Emit textChanged() signal on completion selection
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-16 09:12:59 +07:00
Tomaz Canabrava
bffceb18e7 Do not New / Delete the item, use the Stack.
This should be somewhat faster, and the code is cleaner.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20 09:53:04 -08:00
Tomaz Canabrava
bdd1b3b546 Make it possible to use the Tag System in dark themes
The color used on the bright theme was cyan, and it's too bright when the
font is also white.

This patch uses the HSL information of the color to determine if the text
color is light or dark, and adjusting the background color for that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20 09:53:04 -08:00
Tomaz Canabrava
9e57dd4826 Code cleanup: QPair<int, int> -> qMakePair
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20 09:53:04 -08:00
Anton Lundin
5b61409358 Use delete instead of free() in c++
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-11 03:13:30 +01:00
Dirk Hohndel
4e9a29a0af Remove debug output left in the previous commit by mistake
Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07 16:32:23 +09:00
Dirk Hohndel
f262ed69cc Make the tag widget act more sanely when pressing Tab
When dealing with autocompletion, tag usually means "take this, move on".
In the tag widget the tab was added to the tag itself (and then stripped
when the input line was processed). Not exactly useful.

This feels a bit "hackish", but it seems to get the job done.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07 13:40:57 +09:00
Maximilian Güntner
c4d8b6a4d5 Fix the inconsistent behaviour of QCompleter
The TagWidget behaves now similiar to a QLineEdit.
Pressing Enter/Return will now close the completion widget.

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02 17:10:34 +01:00
Maximilian Güntner
04cdfce782 Added a custom widget for tagging dives
A custom tag widget has been added to MainTab.
Tags are seperated by a comma ",". The implementation
supports escaping a comma by using "\,".
While typing, the widget supports the user by suggesting
tags using a QCompleter.

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02 03:37:31 +01:00