knotes
knoteconfig.h00001
00002
00003 #ifndef KNOTECONFIG_H
00004 #define KNOTECONFIG_H
00005
00006 #include <kglobal.h>
00007 #include <kconfigskeleton.h>
00008 #include <kdebug.h>
00009
00010 class KNoteConfig : public KConfigSkeleton
00011 {
00012 public:
00013
00014 KNoteConfig( KSharedConfig::Ptr config = KGlobal::sharedConfig() );
00015 ~KNoteConfig();
00016
00020 void setBgColor( const QColor & v )
00021 {
00022 if (!isImmutable( QString::fromLatin1( "BgColor" ) ))
00023 mBgColor = v;
00024 }
00025
00029 QColor bgColor() const
00030 {
00031 return mBgColor;
00032 }
00033
00037 void setFgColor( const QColor & v )
00038 {
00039 if (!isImmutable( QString::fromLatin1( "FgColor" ) ))
00040 mFgColor = v;
00041 }
00042
00046 QColor fgColor() const
00047 {
00048 return mFgColor;
00049 }
00050
00054 void setWidth( uint v )
00055 {
00056 if (!isImmutable( QString::fromLatin1( "Width" ) ))
00057 mWidth = v;
00058 }
00059
00063 uint width() const
00064 {
00065 return mWidth;
00066 }
00067
00071 void setHeight( uint v )
00072 {
00073 if (!isImmutable( QString::fromLatin1( "Height" ) ))
00074 mHeight = v;
00075 }
00076
00080 uint height() const
00081 {
00082 return mHeight;
00083 }
00084
00088 void setFont( const QFont & v )
00089 {
00090 if (!isImmutable( QString::fromLatin1( "Font" ) ))
00091 mFont = v;
00092 }
00093
00097 QFont font() const
00098 {
00099 return mFont;
00100 }
00101
00105 void setTitleFont( const QFont & v )
00106 {
00107 if (!isImmutable( QString::fromLatin1( "TitleFont" ) ))
00108 mTitleFont = v;
00109 }
00110
00114 QFont titleFont() const
00115 {
00116 return mTitleFont;
00117 }
00118
00122 void setAutoIndent( bool v )
00123 {
00124 if (!isImmutable( QString::fromLatin1( "AutoIndent" ) ))
00125 mAutoIndent = v;
00126 }
00127
00131 bool autoIndent() const
00132 {
00133 return mAutoIndent;
00134 }
00135
00139 void setRichText( bool v )
00140 {
00141 if (!isImmutable( QString::fromLatin1( "RichText" ) ))
00142 mRichText = v;
00143 }
00144
00148 bool richText() const
00149 {
00150 return mRichText;
00151 }
00152
00156 void setTabSize( uint v )
00157 {
00158 if (!isImmutable( QString::fromLatin1( "TabSize" ) ))
00159 mTabSize = v;
00160 }
00161
00165 uint tabSize() const
00166 {
00167 return mTabSize;
00168 }
00169
00173 void setReadOnly( bool v )
00174 {
00175 if (!isImmutable( QString::fromLatin1( "ReadOnly" ) ))
00176 mReadOnly = v;
00177 }
00178
00182 bool readOnly() const
00183 {
00184 return mReadOnly;
00185 }
00186
00190 void setVersion( double v )
00191 {
00192 if (!isImmutable( QString::fromLatin1( "Version" ) ))
00193 mVersion = v;
00194 }
00195
00199 double version() const
00200 {
00201 return mVersion;
00202 }
00203
00207 void setDesktop( int v )
00208 {
00209 if (!isImmutable( QString::fromLatin1( "Desktop" ) ))
00210 mDesktop = v;
00211 }
00212
00216 int desktop() const
00217 {
00218 return mDesktop;
00219 }
00220
00224 void setHideNote( bool v )
00225 {
00226 if (!isImmutable( QString::fromLatin1( "HideNote" ) ))
00227 mHideNote = v;
00228 }
00229
00233 bool hideNote() const
00234 {
00235 return mHideNote;
00236 }
00237
00241 void setPosition( const QPoint & v )
00242 {
00243 if (!isImmutable( QString::fromLatin1( "Position" ) ))
00244 mPosition = v;
00245 }
00246
00250 QPoint position() const
00251 {
00252 return mPosition;
00253 }
00254
00258 void setShowInTaskbar( bool v )
00259 {
00260 if (!isImmutable( QString::fromLatin1( "ShowInTaskbar" ) ))
00261 mShowInTaskbar = v;
00262 }
00263
00267 bool showInTaskbar() const
00268 {
00269 return mShowInTaskbar;
00270 }
00271
00275 void setKeepAbove( bool v )
00276 {
00277 if (!isImmutable( QString::fromLatin1( "KeepAbove" ) ))
00278 mKeepAbove = v;
00279 }
00280
00284 bool keepAbove() const
00285 {
00286 return mKeepAbove;
00287 }
00288
00292 void setKeepBelow( bool v )
00293 {
00294 if (!isImmutable( QString::fromLatin1( "KeepBelow" ) ))
00295 mKeepBelow = v;
00296 }
00297
00301 bool keepBelow() const
00302 {
00303 return mKeepBelow;
00304 }
00305
00306 protected:
00307
00308
00309 QColor mBgColor;
00310 QColor mFgColor;
00311 uint mWidth;
00312 uint mHeight;
00313
00314
00315 QFont mFont;
00316 QFont mTitleFont;
00317 bool mAutoIndent;
00318 bool mRichText;
00319 uint mTabSize;
00320 bool mReadOnly;
00321
00322
00323 double mVersion;
00324
00325
00326 int mDesktop;
00327 bool mHideNote;
00328 QPoint mPosition;
00329 bool mShowInTaskbar;
00330 bool mKeepAbove;
00331 bool mKeepBelow;
00332
00333 private:
00334 };
00335
00336 #endif
00337
|