diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /ksplashml/kcmksplash/installer.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksplashml/kcmksplash/installer.h')
-rw-r--r-- | ksplashml/kcmksplash/installer.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/ksplashml/kcmksplash/installer.h b/ksplashml/kcmksplash/installer.h new file mode 100644 index 000000000..43e37d0fc --- /dev/null +++ b/ksplashml/kcmksplash/installer.h @@ -0,0 +1,87 @@ +/*************************************************************************** + * Copyright Ravikiran Rajagopal 2003 * + * ravi@ee.eng.ohio-state.edu * + * Copyright (c) 1998 Stefan Taferner <taferner@kde.org> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License (version 2) as * + * published by the Free Software Foundation. * + * * + ***************************************************************************/ +#ifndef SPLASHINSTALLER_H +#define SPLASHINSTALLER_H + +#include <qmap.h> +#include <qpoint.h> + +#include <klistbox.h> +#include <kurl.h> + +class QLabel; +class QTextEdit; +class QPushButton; +class ThemeListBox; + +class SplashInstaller : public QWidget +{ + Q_OBJECT +public: + SplashInstaller(QWidget *parent=0, const char *aName=0, bool aInit=FALSE); + ~SplashInstaller(); + + virtual void load(); + virtual void load( bool useDefaults ); + virtual void save(); + virtual void defaults(); + +signals: + void changed( bool state ); + +protected slots: + virtual void slotAdd(); + virtual void slotRemove(); + virtual void slotTest(); + virtual void slotSetTheme(int); + void slotFilesDropped(const KURL::List &urls); + +protected: + /** Scan Themes directory for available theme packages */ + virtual void readThemesList(); + /** add a theme to the list, returns the list index */ + int addTheme(const QString &path, const QString &name); + void addNewTheme(const KURL &srcURL); + int findTheme( const QString &theme ); + +private: + bool mGui; + ThemeListBox *mThemesList; + QPushButton *mBtnAdd, *mBtnRemove, *mBtnTest; + QTextEdit *mText; + QLabel *mPreview; +}; + +class ThemeListBox: public KListBox +{ + Q_OBJECT +public: + ThemeListBox(QWidget *parent); + QMap<QString, QString> text2path; + +signals: + void filesDropped(const KURL::List &urls); + +protected: + void dragEnterEvent(QDragEnterEvent* event); + void dropEvent(QDropEvent* event); + void mouseMoveEvent(QMouseEvent *e); + +protected slots: + void slotMouseButtonPressed(int button, QListBoxItem *item, const QPoint &p); + +private: + QString mDragFile; + QPoint mOldPos; + +}; + +#endif |