Back to index

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

#include <gravity.h>

Collaboration diagram for KGravitySetup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 KGravitySetup (QWidget *parent=0L)
 ~KGravitySetup ()

Protected Member Functions

void readSettings ()

Private Slots

void slotOkPressed ()
void aboutPressed ()

Private Attributes

KGravitySaversaver
float size
float stars
float zoom
float speed

Detailed Description

Definition at line 118 of file gravity.h.


Constructor & Destructor Documentation

KGravitySetup::KGravitySetup ( QWidget *  parent = 0L)

Definition at line 67 of file gravity.cpp.

        : QDialog(parent)
{
       setupUi(this);
       readSettings();

       preview->setFixedSize( 220, 170 );
        {
            QPalette palette;
            palette.setColor( preview->backgroundRole(), Qt::black );
            preview->setPalette( palette );
           preview->setAutoFillBackground(true);
        }
#ifdef Q_WS_X11
       preview->show();    // otherwise saver does not get correct size
#endif
       saver = new KGravitySaver( preview->winId() );
;
       connect( PushButton1, SIGNAL( clicked() ), SLOT( slotOkPressed() ) );
       connect( PushButton2, SIGNAL( clicked() ), SLOT( reject() ) );
       connect( PushButton3, SIGNAL( clicked() ), SLOT( aboutPressed() ) );
       connect(  SpinBox1, SIGNAL( valueChanged(int)), saver, SLOT( updateSize(int)));
       connect( RadioButton1, SIGNAL( toggled(bool)), saver, SLOT( doStars(bool)));

}

Here is the call graph for this function:

Definition at line 93 of file gravity.cpp.

{
    delete saver;
}

Member Function Documentation

void KGravitySetup::aboutPressed ( ) [private, slot]

Definition at line 141 of file gravity.cpp.

{
    KMessageBox::about(this,
        i18n("<h3>Gravity</h3>\n<p>Particle Gravity Screen Saver for KDE</p>\nCopyright (c)  Ian Reinhart Geiser 2001<br>\n\n<p>KConfig code and KScreenSaver \"Setup...\" improvements by Nick Betcher <nbetcher@usinternet.com> 2001</p>"));
}

Here is the caller graph for this function:

void KGravitySetup::readSettings ( ) [protected]

Definition at line 99 of file gravity.cpp.

{
       KConfig config("kssgravityrc", KConfig::NoGlobals);
        KConfigGroup grp = config.group( "Settings" );

       bool boolval = grp.readEntry( "Stars", false );
       if (boolval) {
              RadioButton1->setChecked(true);
       } else {
              if (!boolval)
              {
                     RadioButton1_2->setChecked(true);
              }
       }

       int starammount = grp.readEntry("StarSize", 75);
       SpinBox1->setValue(starammount);

}

Here is the caller graph for this function:

void KGravitySetup::slotOkPressed ( ) [private, slot]

Definition at line 120 of file gravity.cpp.

{
       KConfig _config("kssgravityrc", KConfig::NoGlobals);
       KConfigGroup config(&_config, "Settings" );

       if (RadioButton1->isChecked() == true)
       {
              config.writeEntry( "Stars", true );
       } else {
              if (RadioButton1_2->isChecked() == true)
              {
                     config.writeEntry( "Stars", false );
              }
       }
       config.writeEntry( "StarSize", SpinBox1->value() );

       config.sync();

       accept();
}

Here is the caller graph for this function:


Member Data Documentation

Definition at line 132 of file gravity.h.

float KGravitySetup::size [private]

Definition at line 133 of file gravity.h.

float KGravitySetup::speed [private]

Definition at line 136 of file gravity.h.

float KGravitySetup::stars [private]

Definition at line 134 of file gravity.h.

float KGravitySetup::zoom [private]

Definition at line 135 of file gravity.h.


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