Back to index

kdeartwork  4.3.2
Public Slots | Signals | Public Member Functions | Protected Slots | Private Attributes
CdeConfig Class Reference

#include <config.h>

List of all members.

Public Slots

void load (KConfig *conf)
void save (KConfig *conf)
void defaults ()


void changed ()

Public Member Functions

 CdeConfig (KConfig *conf, QWidget *parent)
 ~CdeConfig ()

Protected Slots

void slotSelectionChanged ()
void slotSelectionChanged (int)

Private Attributes

KConfig * cdeConfig
QCheckBox * cbColorBorder
KHBox * groupBox
Q3GroupBox * gbSlider
Q3ButtonGroup * bgAlign

Detailed Description

Definition at line 22 of file config.h.

Constructor & Destructor Documentation

CdeConfig::CdeConfig ( KConfig *  conf,
QWidget *  parent 

Definition at line 29 of file config.cpp.

       : QObject( parent )
       cdeConfig = new KConfig("kwincderc");
       groupBox = new KVBox( parent );
       bgAlign = new Q3ButtonGroup( 3, Qt::Horizontal, i18n("Text &Alignment"), groupBox );
       bgAlign->setExclusive( true );
       bgAlign->setWhatsThis( i18n("Use these buttons to set the alignment of the titlebar caption text.") );
       new QRadioButton( i18n("Left"), bgAlign, "AlignLeft" );
       QRadioButton *radio2 = new QRadioButton( i18n("Centered"), bgAlign, "AlignHCenter" );
       radio2->setChecked( true );
       new QRadioButton( i18n("Right"), bgAlign, "AlignRight" );
       cbColorBorder = new QCheckBox( i18n("Draw window frames using &titlebar colors"), groupBox );
       cbColorBorder->setWhatsThis( i18n("When selected, the window decoration borders "
                                        "are drawn using the titlebar colors. Otherwise, they are "
                                        "drawn using normal border colors instead.") );
//     cbTitlebarButton = new QCheckBox( i18n("Titlebar acts like a &pushbutton when clicked"), groupBox );
//     QWhatsThis::add( cbTitlebarButton, i18n("When selected, this option causes the window titlebar to behave "
//                                        "as if it was a pushbutton when you click it to move the window.") );
       (void) new QLabel( i18n("Tip: If you want the look of the original Motif(tm) Window Manager,\n"
                            "click the \"Buttons\" tab above and remove the help\n"
                            "and close buttons from the titlebar."), groupBox );
       // Load configuration options
       load( conf );

       // Ensure we track user changes properly
       connect( cbColorBorder, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
//     connect( cbTitlebarButton, SIGNAL(clicked()), SLOT(slotSelectionChanged()) );
       connect( bgAlign, SIGNAL(clicked(int)), SLOT(slotSelectionChanged(int)) );

       // Make the widgets visible in kwindecoration

Here is the call graph for this function:

Definition at line 71 of file config.cpp.

       delete bgAlign;
       delete groupBox;
       delete cdeConfig;

Member Function Documentation

void CdeConfig::changed ( ) [signal]

Here is the caller graph for this function:

void CdeConfig::defaults ( ) [slot]

Definition at line 126 of file config.cpp.

       QRadioButton *button = (QRadioButton*)bgAlign->child( "AlignHCenter" );
       if ( button )
           button->setChecked( true );

       cbColorBorder->setChecked( true );
//     cbTitlebarButton->setChecked( true );
void CdeConfig::load ( KConfig *  conf) [slot]

Definition at line 91 of file config.cpp.


       QString value = cdeConfig->readEntry( "TextAlignment", "AlignHCenter" );
       QRadioButton *button = (QRadioButton*)bgAlign->child( (const char *)value.latin1() );
       if ( button )
           button->setChecked( true );

       bool coloredFrame = cdeConfig->readEntry( "UseTitleBarBorderColors", true );
       cbColorBorder->setChecked( coloredFrame );

//     bool titlebarButton = cdeConfig->readBoolEntry( "TitlebarButtonMode", true );
//     cbTitlebarButton->setChecked( titlebarButton );

Here is the caller graph for this function:

void CdeConfig::save ( KConfig *  conf) [slot]

Definition at line 109 of file config.cpp.


       QRadioButton *button = (QRadioButton*)bgAlign->selected();
       if ( button )
           cdeConfig->writeEntry( "TextAlignment", QString(button->name()) );

       cdeConfig->writeEntry( "UseTitleBarBorderColors", cbColorBorder->isChecked() );
//     cdeConfig->writeEntry( "TitlebarButtonMode", cbTitlebarButton->isChecked() );
       // Ensure others trying to read this config get updated
void CdeConfig::slotSelectionChanged ( ) [protected, slot]

Definition at line 79 of file config.cpp.

       emit changed();

Here is the call graph for this function:

Here is the caller graph for this function:

void CdeConfig::slotSelectionChanged ( int  ) [protected, slot]

Definition at line 84 of file config.cpp.

       emit changed();

Here is the call graph for this function:

Member Data Documentation

Q3ButtonGroup* CdeConfig::bgAlign [private]

Definition at line 49 of file config.h.

QCheckBox* CdeConfig::cbColorBorder [private]

Definition at line 45 of file config.h.

KConfig* CdeConfig::cdeConfig [private]

Definition at line 44 of file config.h.

Q3GroupBox* CdeConfig::gbSlider [private]

Definition at line 48 of file config.h.

KHBox* CdeConfig::groupBox [private]

Definition at line 47 of file config.h.

The documentation for this class was generated from the following files: