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 "ui_configwidget.h"
28 namespace KParts
{ class ReadOnlyPart
; }
30 class ConfigWidget
: public QDialog
, public Ui::ConfigWidget
33 ConfigWidget( QWidget
*parent
) : QDialog( parent
) {
39 class SaverConfig
: public ConfigWidget
{
43 SaverConfig( QWidget
* parent
= 0);
56 class KPartSaver
: public KScreenSaver
{
60 KPartSaver( WId id
=0 );
61 virtual ~KPartSaver();
64 void next( bool random
);
65 void queue( const KUrl
&url
);
73 inline bool operator==(const Medium
& other
) { return url
== other
.url
; }
74 inline bool operator!=(const Medium
& other
) { return !(*this == other
); }
77 bool openUrl( const KUrl
& url
);
79 QList
<Medium
> m_media
;
81 KParts::ReadOnlyPart
*m_part
;