Cleanup a little CMakeLists.txt
[kdeartwork.git] / kscreensaver / kpartsaver / kpartsaver.h
blobe9b6e2bb27ce7fe005cc11469b4cb89ef746ce64
1 /*
2 * Copyright (C) 2001 Stefan Schimanski <1Stein@gmx.de>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the Free
16 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 #ifndef KPARTSAVER_H_INCLUDED
20 #define KPARTSAVER_H_INCLUDED
22 #include <kscreensaver.h>
24 #include "configwidget.h"
25 #include <Q3ValueList>
26 #include <QStringList>
27 class QTimer;
28 class QLabel;
29 namespace KParts { class ReadOnlyPart; }
31 class SaverConfig : public ConfigWidget {
32 Q_OBJECT
34 public:
35 SaverConfig( QWidget* parent = 0, const char* name = 0 );
36 ~SaverConfig();
38 protected slots:
39 void apply();
40 void add();
41 void remove();
42 void select();
43 void up();
44 void down();
48 class KPartSaver : public KScreenSaver {
49 Q_OBJECT
51 public:
52 KPartSaver( WId id=0 );
53 virtual ~KPartSaver();
55 public slots:
56 void next( bool random );
57 void queue( KUrl url );
58 void timeout();
59 void closeURL();
61 protected:
62 struct Medium {
63 KUrl url;
64 bool failed;
67 bool openURL( KUrl url );
69 Q3ValueList<Medium> m_media;
70 QTimer *m_timer;
71 KParts::ReadOnlyPart *m_part;
72 int m_current;
74 bool m_single;
75 bool m_random;
76 int m_delay;
77 QStringList m_files;
78 QLabel *m_back;
81 #endif