Back to index

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

#include <slideshow.h>

Collaboration diagram for kSlideShowSetup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 kSlideShowSetup (QWidget *parent=NULL)
 ~kSlideShowSetup ()

Protected Slots

void slotOk ()
void slotHelp ()
void writeSettings ()
void slotDirSelected (const QString &where)
void slotDirSelected (const KUrl &)

Protected Member Functions

void readSettings ()

Private Attributes

kSlideShowSavermSaver
SlideShowCfgcfg

Detailed Description

Definition at line 127 of file slideshow.h.


Constructor & Destructor Documentation

kSlideShowSetup::kSlideShowSetup ( QWidget *  parent = NULL)

Definition at line 938 of file slideshow.cpp.

  : KDialog(aParent)
{
  setCaption(i18n( "Setup Slide Show Screen Saver" ));
  setButtons(Ok|Cancel|Help);
  setDefaultButton(Ok);
  setModal(true);
  setButtonText( Help, i18n( "A&bout" ) );

  QWidget *main = new QWidget(this);
  setMainWidget(main);
  cfg = new SlideShowCfg();
  cfg->setupUi( main );

  cfg->mPreview->setFixedSize(220, 170);
  cfg->mPreview->show();    // otherwise saver does not get correct size
  mSaver = new kSlideShowSaver(cfg->mPreview->winId());

  cfg->mDirChooser->setMode(KFile::Directory | KFile::ExistingOnly);
  connect(cfg->mDirChooser, SIGNAL(returnPressed(const QString &)),
      SLOT(slotDirSelected(const QString &)));
  connect(cfg->mDirChooser, SIGNAL(urlSelected(const KUrl &)),
      SLOT(slotDirSelected(const KUrl &)));
  connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
  connect(this,SIGNAL(helpClicked()),this,SLOT(slotHelp()));
  readSettings();
}

Here is the call graph for this function:

Definition at line 966 of file slideshow.cpp.

{
    delete mSaver;
    delete cfg;
}

Member Function Documentation

void kSlideShowSetup::readSettings ( ) [protected]

Definition at line 973 of file slideshow.cpp.

{
    KConfigGroup config( KGlobal::config(), "Settings");

    cfg->mCbxRandom->setChecked(config.readEntry("ShowRandom", true));
    cfg->mCbxZoom->setChecked(config.readEntry("ZoomImages", false));
    cfg->mCbxShowName->setChecked(config.readEntry("PrintName", true));
    cfg->mDelay->setValue(config.readEntry("Delay", 20));
    cfg->mDirChooser->setPath(config.readPathEntry("Directory", QString()));
    cfg->mCbxSubdirectory->setChecked(config.readEntry("SubDirectory", false));
    cfg->mCbxRandomPosition->setChecked(config.readEntry("RandomPosition", false));
}

Here is the caller graph for this function:

void kSlideShowSetup::slotDirSelected ( const QString &  where) [protected, slot]

Definition at line 1017 of file slideshow.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void kSlideShowSetup::slotDirSelected ( const KUrl &  ) [protected, slot]

Definition at line 1012 of file slideshow.cpp.

Here is the call graph for this function:

void kSlideShowSetup::slotHelp ( ) [protected, slot]

Definition at line 1032 of file slideshow.cpp.

{
  KAboutApplicationDialog mAbout(s_aboutData, this);
  mAbout.exec();
}

Here is the caller graph for this function:

void kSlideShowSetup::slotOk ( ) [protected, slot]

Definition at line 1024 of file slideshow.cpp.

{
  writeSettings();
  accept();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void kSlideShowSetup::writeSettings ( ) [protected, slot]

Definition at line 988 of file slideshow.cpp.

{
  KConfigGroup config( KGlobal::config(), "Settings");

  config.writeEntry("ShowRandom", cfg->mCbxRandom->isChecked());
  config.writeEntry("ZoomImages", cfg->mCbxZoom->isChecked());
  config.writeEntry("PrintName",  cfg->mCbxShowName->isChecked());
  config.writeEntry("Delay", cfg->mDelay->value());
  config.writePathEntry("Directory", cfg->mDirChooser->url().path());
  config.writeEntry("SubDirectory", cfg->mCbxSubdirectory->isChecked());
  config.writeEntry("RandomPosition", cfg->mCbxRandomPosition->isChecked());

  config.sync();

  if (mSaver)
  {
    mSaver->readConfig();
    mSaver->restart();
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 145 of file slideshow.h.

Definition at line 144 of file slideshow.h.


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