aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/groupedlineedit.cpp
AgeCommit message (Collapse)Author
2014-07-10Forbid the use of empty strings as tagsGravatar Tomaz Canabrava
Some tags were wrong when the user added two commas, so this patch forbids the use of a comma when we don't have any tags. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-10Tags can never include a commaGravatar Dirk Hohndel
And no, I don't want "\," to be legal in our tag, either. Way too much pain for way too little gain. Fixes #560 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-27Much, much smarter way of finding the TagsGravatar Tomaz Canabrava
The old way manually implemented a parser, where it could simply call a regexp (or, in my case, a QChar) that will split the QString into many, to find the beginning and end of the strings on the tags. This patch also fixes a Qt5 off-by-one bug on the tag Visualization. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-22Gratuitous whitespace changesGravatar Dirk Hohndel
I keep trying to get to consistenct. Completely hopeless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-03Whitespace cleanupGravatar Dirk Hohndel
Minor change to the perl postprocessing script and resulting changes to the affected source files. This deals with two issues: - "foreach"-like structures were not always treated correctly - some longer calculations that ended on "+ constant" were reformatted in a rather unatractive manner In one source file (divelist.c) I ended up adding braces to the sources... trying to cascade the indentation further down without having the block there seemed a lot more trouble than it's worth. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Removed obsolete code.Gravatar Tomaz Canabrava
The QPainter::hightQualityAntiAliasing is ignored by Qt, the docs says we should use QPainter::AntiAliasing. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-20Make it possible to use the Tag System in dark themesGravatar Tomaz Canabrava
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-11-22Work around QPlainTextEdit / QPainter bug on MacGravatar Dirk Hohndel
Actually, it's not so much "work around", it's just "disable our eye candy" for tags on Mac. This is quite frustrating. When we do anything that has the QPainter touch the widget from our GroupedLineEdit::paintEvent() path then the QPlainTextEdit::paintEvent() doesn't render the text of the tags. Fixes #298 Sort of. But I guess tag text without eye candy is better than eye candy without tag text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-02Corrected indentation, added license/copyrightGravatar Maximilian Güntner
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02Added a custom widget for tagging divesGravatar Maximilian Güntner
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>