• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • applications API Reference
  • KDE Home
  • Contact Us
 

Kate

  • kde-4.14
  • applications
  • kate
  • part
  • utils
katedefaultcolors.h
Go to the documentation of this file.
1 /* This file is part of the KDE libraries and the Kate part.
2  *
3  * Copyright (C) 2014 Milian Wolff <mail@milianw.de>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef __KATE_DEFAULTCOLORS_H__
22 #define __KATE_DEFAULTCOLORS_H__
23 
24 #include <KColorScheme>
25 
26 namespace Kate {
27 
28 enum ColorRole {
29  // editor backgrounds
30  Background,
31  SelectionBackground,
32  HighlightedLineBackground,
33  SearchHighlight,
34  ReplaceHighlight,
35  // text decorations
36  HighlightedBracket,
37  TabMarker,
38  IndentationLine,
39  SpellingMistakeLine,
40  // icon border
41  WordWrapMarker,
42  IconBar,
43  CodeFolding,
44  LineNumber,
45  Separator,
46  ModifiedLine,
47  SavedLine,
48  // templates
49  TemplateBackground,
50  TemplateFocusedEditablePlaceholder,
51  TemplateEditablePlaceholder,
52  TemplateNotEditablePlaceholder
53 };
54 
55 enum Mark {
56  Bookmark = 0,
57  ActiveBreakpoint,
58  ReachedBreakpoint,
59  DisabledBreakpoint,
60  Execution,
61  Warning,
62  Error,
63 
64  FIRST_MARK = Bookmark,
65  LAST_MARK = Error
66 };
67 
68 }
69 
70 class KateDefaultColors
71 {
72 public:
73  KateDefaultColors();
74 
75  QColor color(Kate::ColorRole color) const;
76  QColor mark(Kate::Mark mark) const;
77  QColor mark(int mark) const;
78 
79  enum ColorType {
80  ForegroundColor,
81  BackgroundColor
82  };
83  QColor adaptToScheme(const QColor& color, ColorType type) const;
84 
85 private:
86  KColorScheme m_view;
87  KColorScheme m_window;
88  KColorScheme m_selection;
89  KColorScheme m_inactiveSelection;
90  QColor m_background;
91  QColor m_foreground;
92  qreal m_backgroundLuma;
93  qreal m_foregroundLuma;
94 };
95 
96 #endif // __KATE_DEFAULTCOLORS_H__
Kate::SearchHighlight
Definition: katedefaultcolors.h:33
KateDefaultColors::adaptToScheme
QColor adaptToScheme(const QColor &color, ColorType type) const
Definition: katedefaultcolors.cpp:119
KateDefaultColors::KateDefaultColors
KateDefaultColors()
Definition: katedefaultcolors.cpp:29
Kate::TemplateNotEditablePlaceholder
Definition: katedefaultcolors.h:52
KateDefaultColors::BackgroundColor
Definition: katedefaultcolors.h:81
KateDefaultColors::color
QColor color(Kate::ColorRole color) const
Definition: katedefaultcolors.cpp:41
Kate::LAST_MARK
Definition: katedefaultcolors.h:65
Kate::IndentationLine
Definition: katedefaultcolors.h:38
Kate::TemplateFocusedEditablePlaceholder
Definition: katedefaultcolors.h:50
Kate::Background
Definition: katedefaultcolors.h:30
Kate::FIRST_MARK
Definition: katedefaultcolors.h:64
Kate::Bookmark
Definition: katedefaultcolors.h:56
Kate::HighlightedLineBackground
Definition: katedefaultcolors.h:32
Kate::HighlightedBracket
Definition: katedefaultcolors.h:36
Kate::ModifiedLine
Definition: katedefaultcolors.h:46
Kate::TemplateBackground
Definition: katedefaultcolors.h:49
Kate::IconBar
Definition: katedefaultcolors.h:42
Kate::ColorRole
ColorRole
Definition: katedefaultcolors.h:28
Kate::ActiveBreakpoint
Definition: katedefaultcolors.h:57
QColor
Kate::TemplateEditablePlaceholder
Definition: katedefaultcolors.h:51
Kate::SavedLine
Definition: katedefaultcolors.h:47
Kate::Mark
Mark
Definition: katedefaultcolors.h:55
Kate::SpellingMistakeLine
Definition: katedefaultcolors.h:39
Kate::CodeFolding
Definition: katedefaultcolors.h:43
KateDefaultColors
Definition: katedefaultcolors.h:70
KateDefaultColors::mark
QColor mark(Kate::Mark mark) const
Definition: katedefaultcolors.cpp:89
Kate::Separator
Definition: katedefaultcolors.h:45
Kate::ReplaceHighlight
Definition: katedefaultcolors.h:34
Kate::TabMarker
Definition: katedefaultcolors.h:37
Kate::ReachedBreakpoint
Definition: katedefaultcolors.h:58
KateDefaultColors::ColorType
ColorType
Definition: katedefaultcolors.h:79
Kate::WordWrapMarker
Definition: katedefaultcolors.h:41
Kate::Error
Definition: katedefaultcolors.h:62
Kate::Warning
Definition: katedefaultcolors.h:61
Kate::Execution
Definition: katedefaultcolors.h:60
KateDefaultColors::ForegroundColor
Definition: katedefaultcolors.h:80
Kate::SelectionBackground
Definition: katedefaultcolors.h:31
Kate::LineNumber
Definition: katedefaultcolors.h:44
Kate::DisabledBreakpoint
Definition: katedefaultcolors.h:59
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 9 2020 03:56:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Kate

Skip menu "Kate"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

applications API Reference

Skip menu "applications API Reference"
  •   kate
  •       kate
  •   KTextEditor
  •   Kate
  • Konsole

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal