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

knotes

  • sources
  • kde-4.14
  • kdepim
  • knotes
  • notes
knotedisplaysettings.cpp
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 
19 #include "knotedisplaysettings.h"
20 #include "noteshared/attributes/notedisplayattribute.h"
21 #include "knotesglobalconfig.h"
22 
23 
24 KNoteDisplaySettings::KNoteDisplaySettings(NoteShared::NoteDisplayAttribute *attr)
25  : mDisplayAttribute(attr)
26 {
27 }
28 
29 KNoteDisplaySettings::~KNoteDisplaySettings()
30 {
31 
32 }
33 
34 void KNoteDisplaySettings::setDisplayAttribute(NoteShared::NoteDisplayAttribute *attr)
35 {
36  mDisplayAttribute = attr;
37 }
38 
39 NoteShared::NoteDisplayAttribute *KNoteDisplaySettings::displayAttribute() const
40 {
41  return mDisplayAttribute;
42 }
43 
44 QColor KNoteDisplaySettings::backgroundColor() const
45 {
46  if (mDisplayAttribute)
47  return mDisplayAttribute->backgroundColor();
48  else
49  return KNotesGlobalConfig::self()->bgColor();
50 }
51 
52 QColor KNoteDisplaySettings::foregroundColor() const
53 {
54  if (mDisplayAttribute)
55  return mDisplayAttribute->foregroundColor();
56  else
57  return KNotesGlobalConfig::self()->fgColor();
58 }
59 
60 QSize KNoteDisplaySettings::size() const
61 {
62  if (mDisplayAttribute)
63  return mDisplayAttribute->size();
64  else
65  return QSize(KNotesGlobalConfig::self()->width(), KNotesGlobalConfig::self()->height());
66 }
67 
68 bool KNoteDisplaySettings::rememberDesktop() const
69 {
70  if (mDisplayAttribute)
71  return mDisplayAttribute->rememberDesktop();
72  else
73  return KNotesGlobalConfig::self()->rememberDesktop();
74 }
75 
76 int KNoteDisplaySettings::tabSize() const
77 {
78  if (mDisplayAttribute)
79  return mDisplayAttribute->tabSize();
80  else
81  return KNotesGlobalConfig::self()->tabSize();
82 }
83 
84 QFont KNoteDisplaySettings::font() const
85 {
86  if (mDisplayAttribute)
87  return mDisplayAttribute->font();
88  else
89  return KNotesGlobalConfig::self()->font();
90 }
91 
92 QFont KNoteDisplaySettings::titleFont() const
93 {
94  if (mDisplayAttribute)
95  return mDisplayAttribute->titleFont();
96  else
97  return KNotesGlobalConfig::self()->titleFont();
98 }
99 
100 int KNoteDisplaySettings::desktop() const
101 {
102  if (mDisplayAttribute)
103  return mDisplayAttribute->desktop();
104  else
105  return KNotesGlobalConfig::self()->desktop();
106 }
107 
108 bool KNoteDisplaySettings::isHidden() const
109 {
110  if (mDisplayAttribute)
111  return mDisplayAttribute->isHidden();
112  else
113  return KNotesGlobalConfig::self()->hideNote();
114 }
115 
116 QPoint KNoteDisplaySettings::position() const
117 {
118  if (mDisplayAttribute) {
119  return mDisplayAttribute->position();
120  }
121  else
122  return KNotesGlobalConfig::self()->position();
123 }
124 
125 bool KNoteDisplaySettings::showInTaskbar() const
126 {
127  if (mDisplayAttribute)
128  return mDisplayAttribute->showInTaskbar();
129  else
130  return KNotesGlobalConfig::self()->showInTaskbar();
131 }
132 
133 bool KNoteDisplaySettings::keepAbove() const
134 {
135  if (mDisplayAttribute)
136  return mDisplayAttribute->keepAbove();
137  else
138  return KNotesGlobalConfig::self()->keepAbove();
139 }
140 
141 bool KNoteDisplaySettings::keepBelow() const
142 {
143  if (mDisplayAttribute)
144  return mDisplayAttribute->keepBelow();
145  else
146  return KNotesGlobalConfig::self()->keepBelow();
147 }
148 
149 bool KNoteDisplaySettings::autoIndent() const
150 {
151  if (mDisplayAttribute)
152  return mDisplayAttribute->autoIndent();
153  else
154  return KNotesGlobalConfig::self()->autoIndent();
155 }
KNoteDisplaySettings::setDisplayAttribute
void setDisplayAttribute(NoteShared::NoteDisplayAttribute *attr)
Definition: knotedisplaysettings.cpp:34
QFont
KNoteDisplaySettings::font
QFont font() const
Definition: knotedisplaysettings.cpp:84
KNoteDisplaySettings::keepBelow
bool keepBelow() const
Definition: knotedisplaysettings.cpp:141
KNoteDisplaySettings::keepAbove
bool keepAbove() const
Definition: knotedisplaysettings.cpp:133
QPoint
KNoteDisplaySettings::rememberDesktop
bool rememberDesktop() const
Definition: knotedisplaysettings.cpp:68
KNoteDisplaySettings::tabSize
int tabSize() const
Definition: knotedisplaysettings.cpp:76
KNoteDisplaySettings::showInTaskbar
bool showInTaskbar() const
Definition: knotedisplaysettings.cpp:125
QColor
KNoteDisplaySettings::displayAttribute
NoteShared::NoteDisplayAttribute * displayAttribute() const
Definition: knotedisplaysettings.cpp:39
QSize
KNoteDisplaySettings::position
QPoint position() const
Definition: knotedisplaysettings.cpp:116
KNoteDisplaySettings::size
QSize size() const
Definition: knotedisplaysettings.cpp:60
knotedisplaysettings.h
KNoteDisplaySettings::autoIndent
bool autoIndent() const
Definition: knotedisplaysettings.cpp:149
KNoteDisplaySettings::isHidden
bool isHidden() const
Definition: knotedisplaysettings.cpp:108
KNoteDisplaySettings::KNoteDisplaySettings
KNoteDisplaySettings(NoteShared::NoteDisplayAttribute *attr=0)
Definition: knotedisplaysettings.cpp:24
KNoteDisplaySettings::foregroundColor
QColor foregroundColor() const
Definition: knotedisplaysettings.cpp:52
KNoteDisplaySettings::backgroundColor
QColor backgroundColor() const
Definition: knotedisplaysettings.cpp:44
KNoteDisplaySettings::~KNoteDisplaySettings
~KNoteDisplaySettings()
Definition: knotedisplaysettings.cpp:29
KNoteDisplaySettings::desktop
int desktop() const
Definition: knotedisplaysettings.cpp:100
KNoteDisplaySettings::titleFont
QFont titleFont() const
Definition: knotedisplaysettings.cpp:92
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

knotes

Skip menu "knotes"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

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