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

kcalc

  • sources
  • kde-4.12
  • kdeutils
  • kcalc
kcalc_settings.h
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from kcalc.kcfg.
2 // All changes you do to this file will be lost.
3 #ifndef KCALCSETTINGS_H
4 #define KCALCSETTINGS_H
5 
6 #include <kconfigskeleton.h>
7 #include <kdebug.h>
8 
9 #include <KApplication>
10 #include <KGlobalSettings>
11 #include <KColorScheme>
12 #include <KLocale>
13 class KCalcSettings : public KConfigSkeleton
14 {
15  public:
16  class EnumCalculatorMode
17  {
18  public:
19  enum type { simple, science, statistics, numeral, COUNT };
20  };
21 
22  static KCalcSettings *self();
23  ~KCalcSettings();
24 
28  static
29  void setForeColor( const QColor & v )
30  {
31  if (!self()->isImmutable( QString::fromLatin1( "ForeColor" ) ))
32  self()->mForeColor = v;
33  }
34 
38  static
39  QColor foreColor()
40  {
41  return self()->mForeColor;
42  }
43 
47  static
48  void setBackColor( const QColor & v )
49  {
50  if (!self()->isImmutable( QString::fromLatin1( "BackColor" ) ))
51  self()->mBackColor = v;
52  }
53 
57  static
58  QColor backColor()
59  {
60  return self()->mBackColor;
61  }
62 
66  static
67  void setNumberButtonsColor( const QColor & v )
68  {
69  if (!self()->isImmutable( QString::fromLatin1( "NumberButtonsColor" ) ))
70  self()->mNumberButtonsColor = v;
71  }
72 
76  static
77  QColor numberButtonsColor()
78  {
79  return self()->mNumberButtonsColor;
80  }
81 
85  static
86  void setFunctionButtonsColor( const QColor & v )
87  {
88  if (!self()->isImmutable( QString::fromLatin1( "FunctionButtonsColor" ) ))
89  self()->mFunctionButtonsColor = v;
90  }
91 
95  static
96  QColor functionButtonsColor()
97  {
98  return self()->mFunctionButtonsColor;
99  }
100 
104  static
105  void setStatButtonsColor( const QColor & v )
106  {
107  if (!self()->isImmutable( QString::fromLatin1( "StatButtonsColor" ) ))
108  self()->mStatButtonsColor = v;
109  }
110 
114  static
115  QColor statButtonsColor()
116  {
117  return self()->mStatButtonsColor;
118  }
119 
123  static
124  void setHexButtonsColor( const QColor & v )
125  {
126  if (!self()->isImmutable( QString::fromLatin1( "HexButtonsColor" ) ))
127  self()->mHexButtonsColor = v;
128  }
129 
133  static
134  QColor hexButtonsColor()
135  {
136  return self()->mHexButtonsColor;
137  }
138 
142  static
143  void setMemoryButtonsColor( const QColor & v )
144  {
145  if (!self()->isImmutable( QString::fromLatin1( "MemoryButtonsColor" ) ))
146  self()->mMemoryButtonsColor = v;
147  }
148 
152  static
153  QColor memoryButtonsColor()
154  {
155  return self()->mMemoryButtonsColor;
156  }
157 
161  static
162  void setOperationButtonsColor( const QColor & v )
163  {
164  if (!self()->isImmutable( QString::fromLatin1( "OperationButtonsColor" ) ))
165  self()->mOperationButtonsColor = v;
166  }
167 
171  static
172  QColor operationButtonsColor()
173  {
174  return self()->mOperationButtonsColor;
175  }
176 
180  static
181  void setButtonFont( const QFont & v )
182  {
183  if (!self()->isImmutable( QString::fromLatin1( "ButtonFont" ) ))
184  self()->mButtonFont = v;
185  }
186 
190  static
191  QFont buttonFont()
192  {
193  return self()->mButtonFont;
194  }
195 
199  static
200  void setDisplayFont( const QFont & v )
201  {
202  if (!self()->isImmutable( QString::fromLatin1( "DisplayFont" ) ))
203  self()->mDisplayFont = v;
204  }
205 
209  static
210  QFont displayFont()
211  {
212  return self()->mDisplayFont;
213  }
214 
218  static
219  void setPrecision( uint v )
220  {
221  if (v < 8)
222  {
223  kDebug() << "setPrecision: value " << v << " is less than the minimum value of 8";
224  v = 8;
225  }
226 
227  if (v > 200)
228  {
229  kDebug() << "setPrecision: value " << v << " is greater than the maximum value of 200";
230  v = 200;
231  }
232 
233  if (!self()->isImmutable( QString::fromLatin1( "Precision" ) ))
234  self()->mPrecision = v;
235  }
236 
240  static
241  uint precision()
242  {
243  return self()->mPrecision;
244  }
245 
249  static
250  void setFixedPrecision( uint v )
251  {
252  if (!self()->isImmutable( QString::fromLatin1( "FixedPrecision" ) ))
253  self()->mFixedPrecision = v;
254  }
255 
259  static
260  uint fixedPrecision()
261  {
262  return self()->mFixedPrecision;
263  }
264 
268  static
269  void setFixed( bool v )
270  {
271  if (!self()->isImmutable( QString::fromLatin1( "Fixed" ) ))
272  self()->mFixed = v;
273  }
274 
278  static
279  bool fixed()
280  {
281  return self()->mFixed;
282  }
283 
287  static
288  void setBeep( bool v )
289  {
290  if (!self()->isImmutable( QString::fromLatin1( "Beep" ) ))
291  self()->mBeep = v;
292  }
293 
297  static
298  bool beep()
299  {
300  return self()->mBeep;
301  }
302 
306  static
307  void setCaptionResult( bool v )
308  {
309  if (!self()->isImmutable( QString::fromLatin1( "CaptionResult" ) ))
310  self()->mCaptionResult = v;
311  }
312 
316  static
317  bool captionResult()
318  {
319  return self()->mCaptionResult;
320  }
321 
325  static
326  void setGroupDigits( bool v )
327  {
328  if (!self()->isImmutable( QString::fromLatin1( "GroupDigits" ) ))
329  self()->mGroupDigits = v;
330  }
331 
335  static
336  bool groupDigits()
337  {
338  return self()->mGroupDigits;
339  }
340 
344  static
345  void setTwosComplement( bool v )
346  {
347  if (!self()->isImmutable( QString::fromLatin1( "TwosComplement" ) ))
348  self()->mTwosComplement = v;
349  }
350 
354  static
355  bool twosComplement()
356  {
357  return self()->mTwosComplement;
358  }
359 
363  static
364  void setCalculatorMode( EnumCalculatorMode::type v )
365  {
366  if (!self()->isImmutable( QString::fromLatin1( "CalculatorMode" ) ))
367  self()->mCalculatorMode = v;
368  }
369 
373  static
374  EnumCalculatorMode::type calculatorMode()
375  {
376  return static_cast<EnumCalculatorMode::type>(self()->mCalculatorMode);
377  }
378 
382  static
383  void setShowBitset( bool v )
384  {
385  if (!self()->isImmutable( QString::fromLatin1( "ShowBitset" ) ))
386  self()->mShowBitset = v;
387  }
388 
392  static
393  bool showBitset()
394  {
395  return self()->mShowBitset;
396  }
397 
401  static
402  void setShowConstants( bool v )
403  {
404  if (!self()->isImmutable( QString::fromLatin1( "ShowConstants" ) ))
405  self()->mShowConstants = v;
406  }
407 
411  static
412  bool showConstants()
413  {
414  return self()->mShowConstants;
415  }
416 
420  static
421  void setAngleMode( uint v )
422  {
423  if (!self()->isImmutable( QString::fromLatin1( "AngleMode" ) ))
424  self()->mAngleMode = v;
425  }
426 
430  static
431  uint angleMode()
432  {
433  return self()->mAngleMode;
434  }
435 
439  static
440  void setBaseMode( uint v )
441  {
442  if (!self()->isImmutable( QString::fromLatin1( "BaseMode" ) ))
443  self()->mBaseMode = v;
444  }
445 
449  static
450  uint baseMode()
451  {
452  return self()->mBaseMode;
453  }
454 
458  static
459  void setBinaryGrouping( uint v )
460  {
461  if (!self()->isImmutable( QString::fromLatin1( "BinaryGrouping" ) ))
462  self()->mBinaryGrouping = v;
463  }
464 
468  static
469  uint binaryGrouping()
470  {
471  return self()->mBinaryGrouping;
472  }
473 
477  static
478  void setOctalGrouping( uint v )
479  {
480  if (!self()->isImmutable( QString::fromLatin1( "OctalGrouping" ) ))
481  self()->mOctalGrouping = v;
482  }
483 
487  static
488  uint octalGrouping()
489  {
490  return self()->mOctalGrouping;
491  }
492 
496  static
497  void setHexadecimalGrouping( uint v )
498  {
499  if (!self()->isImmutable( QString::fromLatin1( "HexadecimalGrouping" ) ))
500  self()->mHexadecimalGrouping = v;
501  }
502 
506  static
507  uint hexadecimalGrouping()
508  {
509  return self()->mHexadecimalGrouping;
510  }
511 
515  static
516  void setNameConstant( int i, const QString & v )
517  {
518  if (!self()->isImmutable( QString::fromLatin1( "nameConstant%1" ).arg( i ) ))
519  self()->mNameConstant[i] = v;
520  }
521 
525  static
526  QString nameConstant( int i )
527  {
528  return self()->mNameConstant[i];
529  }
530 
534  static
535  void setValueConstant( int i, const QString & v )
536  {
537  if (!self()->isImmutable( QString::fromLatin1( "valueConstant%1" ).arg( i ) ))
538  self()->mValueConstant[i] = v;
539  }
540 
544  static
545  QString valueConstant( int i )
546  {
547  return self()->mValueConstant[i];
548  }
549 
550  protected:
551  KCalcSettings();
552  friend class KCalcSettingsHelper;
553 
554 
555  // Colors
556  QColor mForeColor;
557  QColor mBackColor;
558  QColor mNumberButtonsColor;
559  QColor mFunctionButtonsColor;
560  QColor mStatButtonsColor;
561  QColor mHexButtonsColor;
562  QColor mMemoryButtonsColor;
563  QColor mOperationButtonsColor;
564 
565  // Font
566  QFont mButtonFont;
567  QFont mDisplayFont;
568 
569  // Precision
570  uint mPrecision;
571  uint mFixedPrecision;
572  bool mFixed;
573 
574  // General
575  bool mBeep;
576  bool mCaptionResult;
577  bool mGroupDigits;
578  bool mTwosComplement;
579  int mCalculatorMode;
580  bool mShowBitset;
581  bool mShowConstants;
582  uint mAngleMode;
583  uint mBaseMode;
584 
585  // Grouping
586  uint mBinaryGrouping;
587  uint mOctalGrouping;
588  uint mHexadecimalGrouping;
589 
590  // UserConstants
591  QString mNameConstant[6];
592  QString mValueConstant[6];
593 
594  private:
595 };
596 
597 #endif
598 
KCalcSettings::operationButtonsColor
static QColor operationButtonsColor()
Get The color of operation buttons.
Definition: kcalc_settings.h:172
KCalcSettings::mCalculatorMode
int mCalculatorMode
Definition: kcalc_settings.h:579
KCalcSettings::fixedPrecision
static uint fixedPrecision()
Get Number of fixed decimal digits.
Definition: kcalc_settings.h:260
KCalcSettings::setBeep
static void setBeep(bool v)
Set Whether to beep on error.
Definition: kcalc_settings.h:288
KCalcSettings::statButtonsColor
static QColor statButtonsColor()
Get The color of statistical buttons.
Definition: kcalc_settings.h:115
KCalcSettings::setBaseMode
static void setBaseMode(uint v)
Set Numeric base.
Definition: kcalc_settings.h:440
KCalcSettings::setShowConstants
static void setShowConstants(bool v)
Set Whether to show constant buttons.
Definition: kcalc_settings.h:402
KCalcSettings::memoryButtonsColor
static QColor memoryButtonsColor()
Get The color of memory buttons.
Definition: kcalc_settings.h:153
KCalcSettings::mFixed
bool mFixed
Definition: kcalc_settings.h:572
KCalcSettings::mMemoryButtonsColor
QColor mMemoryButtonsColor
Definition: kcalc_settings.h:562
KCalcSettings::setFixedPrecision
static void setFixedPrecision(uint v)
Set Number of fixed decimal digits.
Definition: kcalc_settings.h:250
KCalcSettings::setFixed
static void setFixed(bool v)
Set Whether to use fixed decimal places.
Definition: kcalc_settings.h:269
KCalcSettings::groupDigits
static bool groupDigits()
Get Whether to group digits.
Definition: kcalc_settings.h:336
KCalcSettings::showBitset
static bool showBitset()
Get Whether to show the bit edit widget.
Definition: kcalc_settings.h:393
KCalcSettings::backColor
static QColor backColor()
Get The background color of the display.
Definition: kcalc_settings.h:58
KCalcSettings::setButtonFont
static void setButtonFont(const QFont &v)
Set The font to use for the buttons.
Definition: kcalc_settings.h:181
KCalcSettings::octalGrouping
static uint octalGrouping()
Get Octal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:488
KCalcSettings::setTwosComplement
static void setTwosComplement(bool v)
Set Whether to use Two's Complement for non-decimal numbers.
Definition: kcalc_settings.h:345
KCalcSettings::mOperationButtonsColor
QColor mOperationButtonsColor
Definition: kcalc_settings.h:563
KCalcSettings::setOperationButtonsColor
static void setOperationButtonsColor(const QColor &v)
Set The color of operation buttons.
Definition: kcalc_settings.h:162
KCalcSettings::mFunctionButtonsColor
QColor mFunctionButtonsColor
Definition: kcalc_settings.h:559
KCalcSettings::hexButtonsColor
static QColor hexButtonsColor()
Get The color of hex buttons.
Definition: kcalc_settings.h:134
KCalcSettings::EnumCalculatorMode::simple
Definition: kcalc_settings.h:19
KCalcSettings::EnumCalculatorMode::science
Definition: kcalc_settings.h:19
KCalcSettings::EnumCalculatorMode::COUNT
Definition: kcalc_settings.h:19
KCalcSettings::functionButtonsColor
static QColor functionButtonsColor()
Get The color of function buttons.
Definition: kcalc_settings.h:96
KCalcSettings::mPrecision
uint mPrecision
Definition: kcalc_settings.h:570
KCalcSettings::EnumCalculatorMode
Definition: kcalc_settings.h:16
KCalcSettings::setNumberButtonsColor
static void setNumberButtonsColor(const QColor &v)
Set The color of number buttons.
Definition: kcalc_settings.h:67
KConfigSkeleton
KCalcSettings::displayFont
static QFont displayFont()
Get The font to use in the display.
Definition: kcalc_settings.h:210
KCalcSettings::mShowBitset
bool mShowBitset
Definition: kcalc_settings.h:580
KCalcSettings::mForeColor
QColor mForeColor
Definition: kcalc_settings.h:556
KCalcSettings::setGroupDigits
static void setGroupDigits(bool v)
Set Whether to group digits.
Definition: kcalc_settings.h:326
KCalcSettings::beep
static bool beep()
Get Whether to beep on error.
Definition: kcalc_settings.h:298
KCalcSettings::binaryGrouping
static uint binaryGrouping()
Get Binary figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:469
KCalcSettings::~KCalcSettings
~KCalcSettings()
Definition: kcalc_settings.cpp:188
KCalcSettings::setStatButtonsColor
static void setStatButtonsColor(const QColor &v)
Set The color of statistical buttons.
Definition: kcalc_settings.h:105
KCalcSettings::setHexButtonsColor
static void setHexButtonsColor(const QColor &v)
Set The color of hex buttons.
Definition: kcalc_settings.h:124
KCalcSettings::setNameConstant
static void setNameConstant(int i, const QString &v)
Set Name of the user programmable constants.
Definition: kcalc_settings.h:516
KCalcSettings::mHexadecimalGrouping
uint mHexadecimalGrouping
Definition: kcalc_settings.h:588
KCalcSettings::setAngleMode
static void setAngleMode(uint v)
Set Degrees, radians or grads.
Definition: kcalc_settings.h:421
KCalcSettings::EnumCalculatorMode::statistics
Definition: kcalc_settings.h:19
KCalcSettings::EnumCalculatorMode::type
type
Definition: kcalc_settings.h:19
KCalcSettings::setShowBitset
static void setShowBitset(bool v)
Set Whether to show the bit edit widget.
Definition: kcalc_settings.h:383
KCalcSettings::mAngleMode
uint mAngleMode
Definition: kcalc_settings.h:582
KCalcSettings::setOctalGrouping
static void setOctalGrouping(uint v)
Set Octal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:478
KCalcSettings::mBaseMode
uint mBaseMode
Definition: kcalc_settings.h:583
KCalcSettings::mFixedPrecision
uint mFixedPrecision
Definition: kcalc_settings.h:571
KCalcSettings::mCaptionResult
bool mCaptionResult
Definition: kcalc_settings.h:576
KCalcSettings::mValueConstant
QString mValueConstant[6]
Definition: kcalc_settings.h:592
KCalcSettings::numberButtonsColor
static QColor numberButtonsColor()
Get The color of number buttons.
Definition: kcalc_settings.h:77
KCalcSettings::setPrecision
static void setPrecision(uint v)
Set Maximum number of digits displayed.
Definition: kcalc_settings.h:219
KCalcSettings::setCaptionResult
static void setCaptionResult(bool v)
Set Whether to show the result in the window title.
Definition: kcalc_settings.h:307
KCalcSettings::mNumberButtonsColor
QColor mNumberButtonsColor
Definition: kcalc_settings.h:558
KCalcSettings::EnumCalculatorMode::numeral
Definition: kcalc_settings.h:19
KCalcSettings::buttonFont
static QFont buttonFont()
Get The font to use for the buttons.
Definition: kcalc_settings.h:191
KCalcSettings::setDisplayFont
static void setDisplayFont(const QFont &v)
Set The font to use in the display.
Definition: kcalc_settings.h:200
KCalcSettings::mTwosComplement
bool mTwosComplement
Definition: kcalc_settings.h:578
KCalcSettings::mOctalGrouping
uint mOctalGrouping
Definition: kcalc_settings.h:587
KCalcSettings::mStatButtonsColor
QColor mStatButtonsColor
Definition: kcalc_settings.h:560
KCalcSettings::mButtonFont
QFont mButtonFont
Definition: kcalc_settings.h:566
KCalcSettings::setCalculatorMode
static void setCalculatorMode(EnumCalculatorMode::type v)
Set CalculatorMode.
Definition: kcalc_settings.h:364
KCalcSettings::hexadecimalGrouping
static uint hexadecimalGrouping()
Get Hexadecimal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:507
KCalcSettings
Definition: kcalc_settings.h:13
KCalcSettings::mBeep
bool mBeep
Definition: kcalc_settings.h:575
KCalcSettings::calculatorMode
static EnumCalculatorMode::type calculatorMode()
Get CalculatorMode.
Definition: kcalc_settings.h:374
KCalcSettings::setValueConstant
static void setValueConstant(int i, const QString &v)
Set List of user programmable constants.
Definition: kcalc_settings.h:535
KCalcSettings::showConstants
static bool showConstants()
Get Whether to show constant buttons.
Definition: kcalc_settings.h:412
KCalcSettings::mGroupDigits
bool mGroupDigits
Definition: kcalc_settings.h:577
KCalcSettings::mDisplayFont
QFont mDisplayFont
Definition: kcalc_settings.h:567
KCalcSettings::setBackColor
static void setBackColor(const QColor &v)
Set The background color of the display.
Definition: kcalc_settings.h:48
KCalcSettings::mShowConstants
bool mShowConstants
Definition: kcalc_settings.h:581
KCalcSettings::nameConstant
static QString nameConstant(int i)
Get Name of the user programmable constants.
Definition: kcalc_settings.h:526
KCalcSettings::precision
static uint precision()
Get Maximum number of digits displayed.
Definition: kcalc_settings.h:241
KCalcSettings::KCalcSettingsHelper
friend class KCalcSettingsHelper
Definition: kcalc_settings.h:552
KCalcSettings::foreColor
static QColor foreColor()
Get The foreground color of the display.
Definition: kcalc_settings.h:39
KCalcSettings::setMemoryButtonsColor
static void setMemoryButtonsColor(const QColor &v)
Set The color of memory buttons.
Definition: kcalc_settings.h:143
KCalcSettings::baseMode
static uint baseMode()
Get Numeric base.
Definition: kcalc_settings.h:450
KCalcSettings::setFunctionButtonsColor
static void setFunctionButtonsColor(const QColor &v)
Set The color of function buttons.
Definition: kcalc_settings.h:86
KCalcSettings::twosComplement
static bool twosComplement()
Get Whether to use Two's Complement for non-decimal numbers.
Definition: kcalc_settings.h:355
KCalcSettings::setBinaryGrouping
static void setBinaryGrouping(uint v)
Set Binary figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:459
KCalcSettings::angleMode
static uint angleMode()
Get Degrees, radians or grads.
Definition: kcalc_settings.h:431
KCalcSettings::setHexadecimalGrouping
static void setHexadecimalGrouping(uint v)
Set Hexadecimal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:497
KCalcSettings::valueConstant
static QString valueConstant(int i)
Get List of user programmable constants.
Definition: kcalc_settings.h:545
KCalcSettings::mBackColor
QColor mBackColor
Definition: kcalc_settings.h:557
KCalcSettings::mHexButtonsColor
QColor mHexButtonsColor
Definition: kcalc_settings.h:561
KCalcSettings::setForeColor
static void setForeColor(const QColor &v)
Set The foreground color of the display.
Definition: kcalc_settings.h:29
KCalcSettings::captionResult
static bool captionResult()
Get Whether to show the result in the window title.
Definition: kcalc_settings.h:317
KCalcSettings::mNameConstant
QString mNameConstant[6]
Definition: kcalc_settings.h:591
KCalcSettings::mBinaryGrouping
uint mBinaryGrouping
Definition: kcalc_settings.h:586
KCalcSettings::fixed
static bool fixed()
Get Whether to use fixed decimal places.
Definition: kcalc_settings.h:279
KCalcSettings::KCalcSettings
KCalcSettings()
Definition: kcalc_settings.cpp:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:08:05 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kcalc

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

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