• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

backgrounddialog.h

Go to the documentation of this file.
00001 /*
00002   Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
00003 
00004   This program is free software; you can redistribute it and/or modify
00005   it under the terms of the GNU General Public License as published by
00006   the Free Software Foundation; either version 2 of the License, or
00007   (at your option) any later version.
00008 */
00009 
00010 #ifndef BACKGROUNDDIALOG_H
00011 #define BACKGROUNDDIALOG_H
00012 
00013 #include <QSize>
00014 #include <QTimer>
00015 #include <KDialog>
00016 
00017 #include "backgroundpackage.h"
00018 #include "renderthread.h"
00019 
00020 #include "ui_BackgroundDialog.h"
00021 
00022 class BackgroundContainer;
00023 class ThemeModel;
00024 class BackgroundListModel;
00025 class QComboBox;
00026 class QLabel;
00027 class QListWidget;
00028 class QPushButton;
00029 class QTimeEdit;
00030 class QCheckBox;
00031 class KColorButton;
00032 class KFileDialog;
00033 class KSeparator;
00034 
00035 class BackgroundDialog : public KDialog, public Ui::BackgroundDialog
00036 {
00037 Q_OBJECT
00038 public:
00039     enum BackgroundMode {
00040         kStaticBackground,
00041         kSlideshowBackground,
00042         kNoBackground
00043     };
00044     
00045     // FIXME seems that we're leaking, make a destructor
00046     BackgroundDialog(const QSize &res, 
00047                      const KConfigGroup &config,
00048                      const KConfigGroup &globalConfig,
00049                      QWidget *parent = 0);
00050     
00051     void reloadConfig(const KConfigGroup &config, const KConfigGroup &globalConfig);
00052     void saveConfig(KConfigGroup config, KConfigGroup globalConfig);
00053     
00054     QString path() const;
00055     int mode();
00056 private:
00057     //QComboBox *m_mode;
00058     //QComboBox *m_view;
00059     BackgroundListModel *m_model;
00060     ThemeModel *m_themeModel;
00061     
00062     //QLabel *m_authorLabel;
00063     //QLabel *m_emailLabel;
00064     //QLabel *m_licenseLabel;
00065     //QLabel *m_authorLine;
00066     //QLabel *m_emailLine;
00067     //QLabel *m_licenseLine;
00068     QLabel *m_preview;
00069     
00070     //QPushButton *m_newStuff;
00071     
00072     //QComboBox *m_resizeMethod;
00073     //KColorButton *m_color;
00074     
00075     //QListWidget *m_dirlist;
00076     //QPushButton *m_addDir;
00077     //QPushButton *m_removeDir;
00078     //QTimeEdit *m_slideshowDelay;
00079     KFileDialog *m_dialog;
00080     
00081     QString m_img;
00082     QSize m_res;
00083     float m_ratio;
00084     
00085     QTimer m_preview_timer;
00086     QList<Background *> m_slideshowBackgrounds;
00087     int m_currentSlide;
00088     
00089     QStringList m_selected;
00090     
00091     RenderThread m_preview_renderer;
00092     int m_preview_token;
00093 
00094     //QCheckBox *m_alignToGrid;
00095     //QCheckBox *m_showIcons;
00096     
00097     bool setMetadata(QLabel *label,
00098                      const QString &text);
00099     void setPreview(const QString &img, Background::ResizeMethod method);
00100     virtual bool contains(const QString &path) const;
00101 private slots:
00102     void update();
00103     void getNewWallpaper();
00104     void getNewThemes();
00105     void browse();
00106     void showFileDialog();
00107     void enableButtons(bool enabled);
00108     
00109     void slotAddDir();
00110     void slotRemoveDir();
00111     void updateSlideshow();
00112     void updateSlideshowPreview();
00113     
00114     void changeBackgroundMode(int mode);
00115     void previewRenderingDone(int token, const QImage &pix);
00116     
00117     void updateScreenshot(QPersistentModelIndex index);
00118     void cleanup();
00119     void removeBackground(const QString &path);
00120 };
00121 
00122 #endif // BACKGROUNDDIALOG_H

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal