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

okteta

  • sources
  • kde-4.12
  • kdesdk
  • okteta
  • kasten
  • controllers
  • view
  • structures
  • settings
structviewpreferences.cpp
Go to the documentation of this file.
1 // This file is generated by kconfig_compiler from structviewpreferences.kcfg.
2 // All changes you do to this file will be lost.
3 
4 #include "structviewpreferences.h"
5 
6 #include <klocale.h>
7 
8 #include <kglobal.h>
9 #include <QtCore/QFile>
10 
11 using namespace Kasten2;
12 
13 namespace Kasten2 {
14 
15 class StructViewPreferencesHelper
16 {
17  public:
18  StructViewPreferencesHelper() : q(0) {}
19  ~StructViewPreferencesHelper() { delete q; }
20  StructViewPreferences *q;
21 };
22 }
23 
24 K_GLOBAL_STATIC(StructViewPreferencesHelper, s_globalStructViewPreferences)
25 StructViewPreferences *StructViewPreferences::self()
26 {
27  if (!s_globalStructViewPreferences->q) {
28  new StructViewPreferences;
29  s_globalStructViewPreferences->q->readConfig();
30  }
31 
32  return s_globalStructViewPreferences->q;
33 }
34 
35 StructViewPreferences::StructViewPreferences( )
36  : KConfigSkeleton( QLatin1String( "oktetastructuresrc" ) )
37 {
38  Q_ASSERT(!s_globalStructViewPreferences->q);
39  s_globalStructViewPreferences->q = this;
40  setCurrentGroup( QLatin1String( "ValueDisplay" ) );
41 
42  mUnsignedDisplayBaseItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "UnsignedDisplayBase" ), mUnsignedDisplayBase, 10 );
43  mUnsignedDisplayBaseItem->setLabel( i18n("UnsignedDisplayBase") );
44  mUnsignedDisplayBaseItem->setToolTip( i18nc("@info:tooltip", "The base to use when converting unsigned numbers to a string.") );
45  addItem( mUnsignedDisplayBaseItem, QLatin1String( "UnsignedDisplayBase" ) );
46  mSignedDisplayBaseItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "SignedDisplayBase" ), mSignedDisplayBase, 10 );
47  mSignedDisplayBaseItem->setLabel( i18n("SignedDisplayBase") );
48  mSignedDisplayBaseItem->setToolTip( i18nc("@info:tooltip", "The base to use when converting signed numbers to a string.") );
49  addItem( mSignedDisplayBaseItem, QLatin1String( "SignedDisplayBase" ) );
50  mCharDisplayBaseItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "CharDisplayBase" ), mCharDisplayBase, 10 );
51  mCharDisplayBaseItem->setLabel( i18n("CharDisplayBase") );
52  mCharDisplayBaseItem->setToolTip( i18nc("@info:tooltip", "The base to use when converting characters to a value string.") );
53  addItem( mCharDisplayBaseItem, QLatin1String( "CharDisplayBase" ) );
54  mShowCharNumericalValueItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShowCharNumericalValue" ), mShowCharNumericalValue, true );
55  mShowCharNumericalValueItem->setLabel( i18n("ShowCharNumericalValue") );
56  mShowCharNumericalValueItem->setToolTip( i18nc("@info:tooltip", "Whether to show the numerical value of chars") );
57  addItem( mShowCharNumericalValueItem, QLatin1String( "ShowCharNumericalValue" ) );
58  mLocaleAwareFloatFormattingItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "LocaleAwareFloatFormatting" ), mLocaleAwareFloatFormatting, false );
59  mLocaleAwareFloatFormattingItem->setLabel( i18n("LocaleAwareFloatFormatting") );
60  mLocaleAwareFloatFormattingItem->setToolTip( i18nc("@info:tooltip", "Whether to format floating point values according to the current locale") );
61  addItem( mLocaleAwareFloatFormattingItem, QLatin1String( "LocaleAwareFloatFormatting" ) );
62  mShortTypeNamesItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "ShortTypeNames" ), mShortTypeNames, true );
63  mShortTypeNamesItem->setLabel( i18n("ShortTypeNames") );
64  mShortTypeNamesItem->setToolTip( i18nc("@info:tooltip", "Whether to use short type names (i.e. uint32 instead of unsigned int)") );
65  addItem( mShortTypeNamesItem, QLatin1String( "ShortTypeNames" ) );
66  mLocaleAwareDecimalFormattingItem = new KConfigSkeleton::ItemBool( currentGroup(), QLatin1String( "LocaleAwareDecimalFormatting" ), mLocaleAwareDecimalFormatting, false );
67  mLocaleAwareDecimalFormattingItem->setLabel( i18n("LocaleAwareDecimalFormatting") );
68  mLocaleAwareDecimalFormattingItem->setToolTip( i18nc("@info:tooltip", "If true, integers being displayed in decimal format will be formatted according to the current locale settings") );
69  mLocaleAwareDecimalFormattingItem->setWhatsThis( i18n("Whether to format integer values according to the current locale") );
70  addItem( mLocaleAwareDecimalFormattingItem, QLatin1String( "LocaleAwareDecimalFormatting" ) );
71  mFloatPrecisionItem = new KConfigSkeleton::ItemInt( currentGroup(), QLatin1String( "FloatPrecision" ), mFloatPrecision, 3 );
72  mFloatPrecisionItem->setMinValue(-1);
73  mFloatPrecisionItem->setMaxValue(100);
74  mFloatPrecisionItem->setLabel( i18n("FloatPrecision") );
75  mFloatPrecisionItem->setToolTip( i18nc("@info:tooltip", "The precision used for converting floating-point numbers to strings (number of decimal digits)") );
76  addItem( mFloatPrecisionItem, QLatin1String( "FloatPrecision" ) );
77 
78  setCurrentGroup( QLatin1String( "StructureSettings" ) );
79 
80  QList<KConfigSkeleton::ItemEnum::Choice2> valuesByteOrder;
81  {
82  KConfigSkeleton::ItemEnum::Choice2 choice;
83  choice.name = QLatin1String("BigEndian");
84  choice.label = i18nc("@item:inlistbox", "Big endian");
85  valuesByteOrder.append( choice );
86  }
87  {
88  KConfigSkeleton::ItemEnum::Choice2 choice;
89  choice.name = QLatin1String("LittleEndian");
90  choice.label = i18nc("@item:inlistbox", "Little endian");
91  valuesByteOrder.append( choice );
92  }
93  mByteOrderItem = new KConfigSkeleton::ItemEnum( currentGroup(), QLatin1String( "ByteOrder" ), mByteOrder, valuesByteOrder, QSysInfo::LittleEndian );
94  mByteOrderItem->setLabel( i18nc("@label:listbox", "Byte order") );
95  addItem( mByteOrderItem, QLatin1String( "ByteOrder" ) );
96  mLoadedStructuresItem = new KConfigSkeleton::ItemStringList( currentGroup(), QLatin1String( "LoadedStructures" ), mLoadedStructures );
97  mLoadedStructuresItem->setLabel( i18n("LoadedStructures") );
98  addItem( mLoadedStructuresItem, QLatin1String( "LoadedStructures" ) );
99 }
100 
101 StructViewPreferences::~StructViewPreferences()
102 {
103  if (!s_globalStructViewPreferences.isDestroyed()) {
104  s_globalStructViewPreferences->q = 0;
105  }
106 }
107 
Kasten2::StructViewPreferences::mLocaleAwareFloatFormatting
bool mLocaleAwareFloatFormatting
Definition: structviewpreferences.h:312
structviewpreferences.h
KConfigSkeleton
Kasten2::StructViewPreferences::mByteOrder
int mByteOrder
Definition: structviewpreferences.h:318
Kasten2::StructViewPreferences::StructViewPreferences
StructViewPreferences()
Definition: structviewpreferences.cpp:35
Kasten2::StructViewPreferences::mUnsignedDisplayBase
int mUnsignedDisplayBase
Definition: structviewpreferences.h:308
Kasten2::StructViewPreferences::mCharDisplayBase
int mCharDisplayBase
Definition: structviewpreferences.h:310
Kasten2::StructViewPreferences::mShowCharNumericalValue
bool mShowCharNumericalValue
Definition: structviewpreferences.h:311
Kasten2::StructViewPreferences::mFloatPrecision
int mFloatPrecision
Definition: structviewpreferences.h:315
Kasten2::StructViewPreferences::mLocaleAwareDecimalFormatting
bool mLocaleAwareDecimalFormatting
Definition: structviewpreferences.h:314
Kasten2::StructViewPreferences
Definition: structviewpreferences.h:13
Kasten2::StructViewPreferences::mShortTypeNames
bool mShortTypeNames
Definition: structviewpreferences.h:313
Kasten2::StructViewPreferences::mLoadedStructures
QStringList mLoadedStructures
Definition: structviewpreferences.h:319
LittleEndian
Definition: endianness.h:32
Kasten2::StructViewPreferences::~StructViewPreferences
~StructViewPreferences()
Definition: structviewpreferences.cpp:101
Kasten2::StructViewPreferences::mSignedDisplayBase
int mSignedDisplayBase
Definition: structviewpreferences.h:309
QList
Definition: bookmarkable.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:04:09 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

okteta

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

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

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