1 /***************************************************************************
2 * Copyright Ravikiran Rajagopal 2003 *
3 * ravi@ee.eng.ohio-state.edu *
4 * Copyright (c) 1998 Stefan Taferner <taferner@kde.org> *
6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License (version 2) as *
8 * published by the Free Software Foundation. *
10 ***************************************************************************/
11 #ifndef SPLASHINSTALLER_H
12 #define SPLASHINSTALLER_H
17 #include <QDragEnterEvent>
18 #include <QMouseEvent>
22 #include <klistwidget.h>
30 class SplashInstaller
: public QWidget
34 SplashInstaller(QWidget
*parent
=0, const char *aName
=0, bool aInit
=false);
39 virtual void defaults();
42 void changed( bool state
);
45 virtual void slotNew();
46 virtual void slotAdd();
47 virtual void slotRemove();
48 virtual void slotTest();
49 virtual void slotSetTheme(int);
50 void slotFilesDropped(const KUrl::List
&urls
);
53 /** Scan Themes directory for available theme packages */
54 virtual void readThemesList();
55 /** add a theme to the list, returns the list index */
56 int addTheme(const QString
&path
, const QString
&name
);
57 void addNewTheme(const KUrl
&srcURL
);
58 int findTheme( const QString
&theme
);
62 ThemeListBox
*mThemesList
;
63 QString mEngineOfSelected
;
64 QPushButton
*mBtnNew
, *mBtnAdd
, *mBtnRemove
, *mBtnTest
;
69 class ThemeListBox
: public KListWidget
73 ThemeListBox(QWidget
*parent
);
74 QMap
<QString
, QString
> text2path
;
77 void filesDropped(const KUrl::List
&urls
);
80 void dragEnterEvent(QDragEnterEvent
* event
);
81 void dragMoveEvent(QDragMoveEvent
* event
);
82 void dropEvent(QDropEvent
* event
);
83 void mouseMoveEvent(QMouseEvent
*e
);
84 void mousePressEvent(QMouseEvent
*e
);