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

kcalc

  • kde-4.x
  • 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 <QFontDatabase>
10 #include <KColorScheme>
11 #include <KLocalizedString>
12 class KCalcSettings : public KConfigSkeleton
13 {
14  public:
15  class EnumCalculatorMode
16  {
17  public:
18  enum type { simple, science, statistics, numeral, COUNT };
19  };
20 
21  static KCalcSettings *self();
22  ~KCalcSettings();
23 
27  static
28  void setForeColor( const QColor & v )
29  {
30  if (!self()->isImmutable( QString::fromLatin1( "ForeColor" ) ))
31  self()->mForeColor = v;
32  }
33 
37  static
38  QColor foreColor()
39  {
40  return self()->mForeColor;
41  }
42 
46  static
47  void setBackColor( const QColor & v )
48  {
49  if (!self()->isImmutable( QString::fromLatin1( "BackColor" ) ))
50  self()->mBackColor = v;
51  }
52 
56  static
57  QColor backColor()
58  {
59  return self()->mBackColor;
60  }
61 
65  static
66  void setNumberButtonsColor( const QColor & v )
67  {
68  if (!self()->isImmutable( QString::fromLatin1( "NumberButtonsColor" ) ))
69  self()->mNumberButtonsColor = v;
70  }
71 
75  static
76  QColor numberButtonsColor()
77  {
78  return self()->mNumberButtonsColor;
79  }
80 
84  static
85  void setFunctionButtonsColor( const QColor & v )
86  {
87  if (!self()->isImmutable( QString::fromLatin1( "FunctionButtonsColor" ) ))
88  self()->mFunctionButtonsColor = v;
89  }
90 
94  static
95  QColor functionButtonsColor()
96  {
97  return self()->mFunctionButtonsColor;
98  }
99 
103  static
104  void setStatButtonsColor( const QColor & v )
105  {
106  if (!self()->isImmutable( QString::fromLatin1( "StatButtonsColor" ) ))
107  self()->mStatButtonsColor = v;
108  }
109 
113  static
114  QColor statButtonsColor()
115  {
116  return self()->mStatButtonsColor;
117  }
118 
122  static
123  void setHexButtonsColor( const QColor & v )
124  {
125  if (!self()->isImmutable( QString::fromLatin1( "HexButtonsColor" ) ))
126  self()->mHexButtonsColor = v;
127  }
128 
132  static
133  QColor hexButtonsColor()
134  {
135  return self()->mHexButtonsColor;
136  }
137 
141  static
142  void setMemoryButtonsColor( const QColor & v )
143  {
144  if (!self()->isImmutable( QString::fromLatin1( "MemoryButtonsColor" ) ))
145  self()->mMemoryButtonsColor = v;
146  }
147 
151  static
152  QColor memoryButtonsColor()
153  {
154  return self()->mMemoryButtonsColor;
155  }
156 
160  static
161  void setOperationButtonsColor( const QColor & v )
162  {
163  if (!self()->isImmutable( QString::fromLatin1( "OperationButtonsColor" ) ))
164  self()->mOperationButtonsColor = v;
165  }
166 
170  static
171  QColor operationButtonsColor()
172  {
173  return self()->mOperationButtonsColor;
174  }
175 
179  static
180  void setButtonFont( const QFont & v )
181  {
182  if (!self()->isImmutable( QString::fromLatin1( "ButtonFont" ) ))
183  self()->mButtonFont = v;
184  }
185 
189  static
190  QFont buttonFont()
191  {
192  return self()->mButtonFont;
193  }
194 
198  static
199  void setDisplayFont( const QFont & v )
200  {
201  if (!self()->isImmutable( QString::fromLatin1( "DisplayFont" ) ))
202  self()->mDisplayFont = v;
203  }
204 
208  static
209  QFont displayFont()
210  {
211  return self()->mDisplayFont;
212  }
213 
217  static
218  void setPrecision( uint v )
219  {
220  if (v < 8)
221  {
222  kDebug() << "setPrecision: value " << v << " is less than the minimum value of 8";
223  v = 8;
224  }
225 
226  if (v > 200)
227  {
228  kDebug() << "setPrecision: value " << v << " is greater than the maximum value of 200";
229  v = 200;
230  }
231 
232  if (!self()->isImmutable( QString::fromLatin1( "Precision" ) ))
233  self()->mPrecision = v;
234  }
235 
239  static
240  uint precision()
241  {
242  return self()->mPrecision;
243  }
244 
248  static
249  void setFixedPrecision( uint v )
250  {
251  if (!self()->isImmutable( QString::fromLatin1( "FixedPrecision" ) ))
252  self()->mFixedPrecision = v;
253  }
254 
258  static
259  uint fixedPrecision()
260  {
261  return self()->mFixedPrecision;
262  }
263 
267  static
268  void setFixed( bool v )
269  {
270  if (!self()->isImmutable( QString::fromLatin1( "Fixed" ) ))
271  self()->mFixed = v;
272  }
273 
277  static
278  bool fixed()
279  {
280  return self()->mFixed;
281  }
282 
286  static
287  void setBeep( bool v )
288  {
289  if (!self()->isImmutable( QString::fromLatin1( "Beep" ) ))
290  self()->mBeep = v;
291  }
292 
296  static
297  bool beep()
298  {
299  return self()->mBeep;
300  }
301 
305  static
306  void setCaptionResult( bool v )
307  {
308  if (!self()->isImmutable( QString::fromLatin1( "CaptionResult" ) ))
309  self()->mCaptionResult = v;
310  }
311 
315  static
316  bool captionResult()
317  {
318  return self()->mCaptionResult;
319  }
320 
324  static
325  void setGroupDigits( bool v )
326  {
327  if (!self()->isImmutable( QString::fromLatin1( "GroupDigits" ) ))
328  self()->mGroupDigits = v;
329  }
330 
334  static
335  bool groupDigits()
336  {
337  return self()->mGroupDigits;
338  }
339 
343  static
344  void setTwosComplement( bool v )
345  {
346  if (!self()->isImmutable( QString::fromLatin1( "TwosComplement" ) ))
347  self()->mTwosComplement = v;
348  }
349 
353  static
354  bool twosComplement()
355  {
356  return self()->mTwosComplement;
357  }
358 
362  static
363  void setRepeatLastOperation( bool v )
364  {
365  if (!self()->isImmutable( QString::fromLatin1( "RepeatLastOperation" ) ))
366  self()->mRepeatLastOperation = v;
367  }
368 
372  static
373  bool repeatLastOperation()
374  {
375  return self()->mRepeatLastOperation;
376  }
377 
381  static
382  void setCalculatorMode( EnumCalculatorMode::type v )
383  {
384  if (!self()->isImmutable( QString::fromLatin1( "CalculatorMode" ) ))
385  self()->mCalculatorMode = v;
386  }
387 
391  static
392  EnumCalculatorMode::type calculatorMode()
393  {
394  return static_cast<EnumCalculatorMode::type>(self()->mCalculatorMode);
395  }
396 
400  static
401  void setShowBitset( bool v )
402  {
403  if (!self()->isImmutable( QString::fromLatin1( "ShowBitset" ) ))
404  self()->mShowBitset = v;
405  }
406 
410  static
411  bool showBitset()
412  {
413  return self()->mShowBitset;
414  }
415 
419  static
420  void setShowConstants( bool v )
421  {
422  if (!self()->isImmutable( QString::fromLatin1( "ShowConstants" ) ))
423  self()->mShowConstants = v;
424  }
425 
429  static
430  bool showConstants()
431  {
432  return self()->mShowConstants;
433  }
434 
438  static
439  void setAngleMode( uint v )
440  {
441  if (!self()->isImmutable( QString::fromLatin1( "AngleMode" ) ))
442  self()->mAngleMode = v;
443  }
444 
448  static
449  uint angleMode()
450  {
451  return self()->mAngleMode;
452  }
453 
457  static
458  void setBaseMode( uint v )
459  {
460  if (!self()->isImmutable( QString::fromLatin1( "BaseMode" ) ))
461  self()->mBaseMode = v;
462  }
463 
467  static
468  uint baseMode()
469  {
470  return self()->mBaseMode;
471  }
472 
476  static
477  void setBinaryGrouping( uint v )
478  {
479  if (!self()->isImmutable( QString::fromLatin1( "BinaryGrouping" ) ))
480  self()->mBinaryGrouping = v;
481  }
482 
486  static
487  uint binaryGrouping()
488  {
489  return self()->mBinaryGrouping;
490  }
491 
495  static
496  void setOctalGrouping( uint v )
497  {
498  if (!self()->isImmutable( QString::fromLatin1( "OctalGrouping" ) ))
499  self()->mOctalGrouping = v;
500  }
501 
505  static
506  uint octalGrouping()
507  {
508  return self()->mOctalGrouping;
509  }
510 
514  static
515  void setHexadecimalGrouping( uint v )
516  {
517  if (!self()->isImmutable( QString::fromLatin1( "HexadecimalGrouping" ) ))
518  self()->mHexadecimalGrouping = v;
519  }
520 
524  static
525  uint hexadecimalGrouping()
526  {
527  return self()->mHexadecimalGrouping;
528  }
529 
533  static
534  void setNameConstant( int i, const QString & v )
535  {
536  if (!self()->isImmutable( QString::fromLatin1( "nameConstant%1" ).arg( i ) ))
537  self()->mNameConstant[i] = v;
538  }
539 
543  static
544  QString nameConstant( int i )
545  {
546  return self()->mNameConstant[i];
547  }
548 
552  static
553  void setValueConstant( int i, const QString & v )
554  {
555  if (!self()->isImmutable( QString::fromLatin1( "valueConstant%1" ).arg( i ) ))
556  self()->mValueConstant[i] = v;
557  }
558 
562  static
563  QString valueConstant( int i )
564  {
565  return self()->mValueConstant[i];
566  }
567 
568  protected:
569  KCalcSettings();
570  friend class KCalcSettingsHelper;
571 
572 
573  // Colors
574  QColor mForeColor;
575  QColor mBackColor;
576  QColor mNumberButtonsColor;
577  QColor mFunctionButtonsColor;
578  QColor mStatButtonsColor;
579  QColor mHexButtonsColor;
580  QColor mMemoryButtonsColor;
581  QColor mOperationButtonsColor;
582 
583  // Font
584  QFont mButtonFont;
585  QFont mDisplayFont;
586 
587  // Precision
588  uint mPrecision;
589  uint mFixedPrecision;
590  bool mFixed;
591 
592  // General
593  bool mBeep;
594  bool mCaptionResult;
595  bool mGroupDigits;
596  bool mTwosComplement;
597  bool mRepeatLastOperation;
598  int mCalculatorMode;
599  bool mShowBitset;
600  bool mShowConstants;
601  uint mAngleMode;
602  uint mBaseMode;
603 
604  // Grouping
605  uint mBinaryGrouping;
606  uint mOctalGrouping;
607  uint mHexadecimalGrouping;
608 
609  // UserConstants
610  QString mNameConstant[6];
611  QString mValueConstant[6];
612 
613  private:
614 };
615 
616 #endif
617 
KCalcSettings::operationButtonsColor
static QColor operationButtonsColor()
Get The color of operation buttons.
Definition: kcalc_settings.h:171
KCalcSettings::mCalculatorMode
int mCalculatorMode
Definition: kcalc_settings.h:598
KCalcSettings::fixedPrecision
static uint fixedPrecision()
Get Number of fixed decimal digits.
Definition: kcalc_settings.h:259
KCalcSettings::setBeep
static void setBeep(bool v)
Set Whether to beep on error.
Definition: kcalc_settings.h:287
KCalcSettings::statButtonsColor
static QColor statButtonsColor()
Get The color of statistical buttons.
Definition: kcalc_settings.h:114
KCalcSettings::setBaseMode
static void setBaseMode(uint v)
Set Numeric base.
Definition: kcalc_settings.h:458
KCalcSettings::setShowConstants
static void setShowConstants(bool v)
Set Whether to show constant buttons.
Definition: kcalc_settings.h:420
KCalcSettings::memoryButtonsColor
static QColor memoryButtonsColor()
Get The color of memory buttons.
Definition: kcalc_settings.h:152
KCalcSettings::mFixed
bool mFixed
Definition: kcalc_settings.h:590
KCalcSettings::mMemoryButtonsColor
QColor mMemoryButtonsColor
Definition: kcalc_settings.h:580
KCalcSettings::setFixedPrecision
static void setFixedPrecision(uint v)
Set Number of fixed decimal digits.
Definition: kcalc_settings.h:249
KCalcSettings::setFixed
static void setFixed(bool v)
Set Whether to use fixed decimal places.
Definition: kcalc_settings.h:268
KCalcSettings::groupDigits
static bool groupDigits()
Get Whether to group digits.
Definition: kcalc_settings.h:335
KCalcSettings::showBitset
static bool showBitset()
Get Whether to show the bit edit widget.
Definition: kcalc_settings.h:411
KCalcSettings::backColor
static QColor backColor()
Get The background color of the display.
Definition: kcalc_settings.h:57
KCalcSettings::setButtonFont
static void setButtonFont(const QFont &v)
Set The font to use for the buttons.
Definition: kcalc_settings.h:180
KCalcSettings::octalGrouping
static uint octalGrouping()
Get Octal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:506
KCalcSettings::setTwosComplement
static void setTwosComplement(bool v)
Set Whether to use Two's Complement for non-decimal numbers.
Definition: kcalc_settings.h:344
KCalcSettings::mOperationButtonsColor
QColor mOperationButtonsColor
Definition: kcalc_settings.h:581
QFont
KCalcSettings::setRepeatLastOperation
static void setRepeatLastOperation(bool v)
Set Enables that the last operation is repeated when "=" is pressed.
Definition: kcalc_settings.h:363
KCalcSettings::setOperationButtonsColor
static void setOperationButtonsColor(const QColor &v)
Set The color of operation buttons.
Definition: kcalc_settings.h:161
KCalcSettings::mFunctionButtonsColor
QColor mFunctionButtonsColor
Definition: kcalc_settings.h:577
KCalcSettings::hexButtonsColor
static QColor hexButtonsColor()
Get The color of hex buttons.
Definition: kcalc_settings.h:133
KCalcSettings::EnumCalculatorMode::simple
Definition: kcalc_settings.h:18
KCalcSettings::EnumCalculatorMode::science
Definition: kcalc_settings.h:18
KCalcSettings::EnumCalculatorMode::COUNT
Definition: kcalc_settings.h:18
KCalcSettings::functionButtonsColor
static QColor functionButtonsColor()
Get The color of function buttons.
Definition: kcalc_settings.h:95
KCalcSettings::mPrecision
uint mPrecision
Definition: kcalc_settings.h:588
KCalcSettings::EnumCalculatorMode
Definition: kcalc_settings.h:15
KCalcSettings::setNumberButtonsColor
static void setNumberButtonsColor(const QColor &v)
Set The color of number buttons.
Definition: kcalc_settings.h:66
KConfigSkeleton
KCalcSettings::displayFont
static QFont displayFont()
Get The font to use in the display.
Definition: kcalc_settings.h:209
KCalcSettings::mShowBitset
bool mShowBitset
Definition: kcalc_settings.h:599
KCalcSettings::mForeColor
QColor mForeColor
Definition: kcalc_settings.h:574
KCalcSettings::setGroupDigits
static void setGroupDigits(bool v)
Set Whether to group digits.
Definition: kcalc_settings.h:325
KCalcSettings::beep
static bool beep()
Get Whether to beep on error.
Definition: kcalc_settings.h:297
KCalcSettings::binaryGrouping
static uint binaryGrouping()
Get Binary figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:487
KCalcSettings::~KCalcSettings
~KCalcSettings()
Definition: kcalc_settings.cpp:194
KCalcSettings::setStatButtonsColor
static void setStatButtonsColor(const QColor &v)
Set The color of statistical buttons.
Definition: kcalc_settings.h:104
KCalcSettings::setHexButtonsColor
static void setHexButtonsColor(const QColor &v)
Set The color of hex buttons.
Definition: kcalc_settings.h:123
KCalcSettings::setNameConstant
static void setNameConstant(int i, const QString &v)
Set Name of the user programmable constants.
Definition: kcalc_settings.h:534
KCalcSettings::mHexadecimalGrouping
uint mHexadecimalGrouping
Definition: kcalc_settings.h:607
KCalcSettings::setAngleMode
static void setAngleMode(uint v)
Set Degrees, radians or grads.
Definition: kcalc_settings.h:439
KCalcSettings::EnumCalculatorMode::statistics
Definition: kcalc_settings.h:18
KCalcSettings::EnumCalculatorMode::type
type
Definition: kcalc_settings.h:18
KCalcSettings::setShowBitset
static void setShowBitset(bool v)
Set Whether to show the bit edit widget.
Definition: kcalc_settings.h:401
KCalcSettings::mAngleMode
uint mAngleMode
Definition: kcalc_settings.h:601
KCalcSettings::setOctalGrouping
static void setOctalGrouping(uint v)
Set Octal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:496
KCalcSettings::mBaseMode
uint mBaseMode
Definition: kcalc_settings.h:602
KCalcSettings::mFixedPrecision
uint mFixedPrecision
Definition: kcalc_settings.h:589
KCalcSettings::mCaptionResult
bool mCaptionResult
Definition: kcalc_settings.h:594
KCalcSettings::mValueConstant
QString mValueConstant[6]
Definition: kcalc_settings.h:611
KCalcSettings::numberButtonsColor
static QColor numberButtonsColor()
Get The color of number buttons.
Definition: kcalc_settings.h:76
KCalcSettings::setPrecision
static void setPrecision(uint v)
Set Maximum number of digits displayed.
Definition: kcalc_settings.h:218
QString
QColor
KCalcSettings::setCaptionResult
static void setCaptionResult(bool v)
Set Whether to show the result in the window title.
Definition: kcalc_settings.h:306
KCalcSettings::mNumberButtonsColor
QColor mNumberButtonsColor
Definition: kcalc_settings.h:576
KCalcSettings::EnumCalculatorMode::numeral
Definition: kcalc_settings.h:18
KCalcSettings::buttonFont
static QFont buttonFont()
Get The font to use for the buttons.
Definition: kcalc_settings.h:190
KCalcSettings::setDisplayFont
static void setDisplayFont(const QFont &v)
Set The font to use in the display.
Definition: kcalc_settings.h:199
KCalcSettings::mTwosComplement
bool mTwosComplement
Definition: kcalc_settings.h:596
KCalcSettings::mOctalGrouping
uint mOctalGrouping
Definition: kcalc_settings.h:606
KCalcSettings::mStatButtonsColor
QColor mStatButtonsColor
Definition: kcalc_settings.h:578
KCalcSettings::mButtonFont
QFont mButtonFont
Definition: kcalc_settings.h:584
KCalcSettings::setCalculatorMode
static void setCalculatorMode(EnumCalculatorMode::type v)
Set CalculatorMode.
Definition: kcalc_settings.h:382
KCalcSettings::hexadecimalGrouping
static uint hexadecimalGrouping()
Get Hexadecimal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:525
KCalcSettings::repeatLastOperation
static bool repeatLastOperation()
Get Enables that the last operation is repeated when "=" is pressed.
Definition: kcalc_settings.h:373
KCalcSettings
Definition: kcalc_settings.h:12
KCalcSettings::mBeep
bool mBeep
Definition: kcalc_settings.h:593
KCalcSettings::calculatorMode
static EnumCalculatorMode::type calculatorMode()
Get CalculatorMode.
Definition: kcalc_settings.h:392
KCalcSettings::setValueConstant
static void setValueConstant(int i, const QString &v)
Set List of user programmable constants.
Definition: kcalc_settings.h:553
KCalcSettings::showConstants
static bool showConstants()
Get Whether to show constant buttons.
Definition: kcalc_settings.h:430
KCalcSettings::mGroupDigits
bool mGroupDigits
Definition: kcalc_settings.h:595
KCalcSettings::mDisplayFont
QFont mDisplayFont
Definition: kcalc_settings.h:585
KCalcSettings::setBackColor
static void setBackColor(const QColor &v)
Set The background color of the display.
Definition: kcalc_settings.h:47
KCalcSettings::mShowConstants
bool mShowConstants
Definition: kcalc_settings.h:600
KCalcSettings::nameConstant
static QString nameConstant(int i)
Get Name of the user programmable constants.
Definition: kcalc_settings.h:544
KCalcSettings::precision
static uint precision()
Get Maximum number of digits displayed.
Definition: kcalc_settings.h:240
KCalcSettings::mRepeatLastOperation
bool mRepeatLastOperation
Definition: kcalc_settings.h:597
KCalcSettings::KCalcSettingsHelper
friend class KCalcSettingsHelper
Definition: kcalc_settings.h:570
KCalcSettings::foreColor
static QColor foreColor()
Get The foreground color of the display.
Definition: kcalc_settings.h:38
KCalcSettings::setMemoryButtonsColor
static void setMemoryButtonsColor(const QColor &v)
Set The color of memory buttons.
Definition: kcalc_settings.h:142
QString::fromLatin1
QString fromLatin1(const char *str, int size)
KCalcSettings::baseMode
static uint baseMode()
Get Numeric base.
Definition: kcalc_settings.h:468
KCalcSettings::setFunctionButtonsColor
static void setFunctionButtonsColor(const QColor &v)
Set The color of function buttons.
Definition: kcalc_settings.h:85
KCalcSettings::twosComplement
static bool twosComplement()
Get Whether to use Two's Complement for non-decimal numbers.
Definition: kcalc_settings.h:354
KCalcSettings::setBinaryGrouping
static void setBinaryGrouping(uint v)
Set Binary figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:477
KCalcSettings::angleMode
static uint angleMode()
Get Degrees, radians or grads.
Definition: kcalc_settings.h:449
KCalcSettings::setHexadecimalGrouping
static void setHexadecimalGrouping(uint v)
Set Hexadecimal figures will be separated by a whitespace after every Xth digit.
Definition: kcalc_settings.h:515
KCalcSettings::valueConstant
static QString valueConstant(int i)
Get List of user programmable constants.
Definition: kcalc_settings.h:563
KCalcSettings::mBackColor
QColor mBackColor
Definition: kcalc_settings.h:575
KCalcSettings::mHexButtonsColor
QColor mHexButtonsColor
Definition: kcalc_settings.h:579
KCalcSettings::setForeColor
static void setForeColor(const QColor &v)
Set The foreground color of the display.
Definition: kcalc_settings.h:28
KCalcSettings::captionResult
static bool captionResult()
Get Whether to show the result in the window title.
Definition: kcalc_settings.h:316
KCalcSettings::mNameConstant
QString mNameConstant[6]
Definition: kcalc_settings.h:610
KCalcSettings::mBinaryGrouping
uint mBinaryGrouping
Definition: kcalc_settings.h:605
KCalcSettings::fixed
static bool fixed()
Get Whether to use fixed decimal places.
Definition: kcalc_settings.h:278
KCalcSettings::KCalcSettings
KCalcSettings()
Definition: kcalc_settings.cpp:27
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 6 2019 03:35:09 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
  • ktimer
  • kwallet
  • 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