2
Copyright (c) 2008 Bertjan Broeksema <b.broeksema@kdemail.org>
3
Copyright (c) 2008 Volker Krause <vkrause@kde.org>
4
Copyright (c) 2010 David Jarvie <djarvie@kde.org>
6
This library is free software; you can redistribute it and/or modify it
7
under the terms of the GNU Library General Public License as published by
8
the Free Software Foundation; either version 2 of the License, or (at your
9
option) any later version.
11
This library is distributed in the hope that it will be useful, but WITHOUT
12
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14
License for more details.
16
You should have received a copy of the GNU Library General Public License
17
along with this library; see the file COPYING.LIB. If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
#ifndef AKONADI_SINGLEFILERESOURCECONFIGDIALOGBASE_H
23
#define AKONADI_SINGLEFILERESOURCECONFIGDIALOGBASE_H
25
#include "ui_singlefileresourceconfigdialog.h"
27
#include <KDE/KDialog>
31
class KConfigDialogManager;
35
class SingleFileResourceConfigWidget;
38
* Base class for the configuration dialog for single file based resources.
39
* @see SingleFileResourceConfigDialog
41
class SingleFileResourceConfigDialogBase : public KDialog
45
explicit SingleFileResourceConfigDialogBase( WId windowId );
48
* Adds @param page to the tabwidget. This can be used to add custom
49
* settings for a specific single file resource.
51
void addPage( const QString &title, QWidget *page );
54
* Set file extension filter.
56
void setFilter( const QString &filter );
59
* Enable and show, or disable and hide, the monitor option.
60
* If the option is disabled, its value will not be saved.
61
* By default, the monitor option is enabled.
63
void setMonitorEnabled( bool enable );
66
* Return the file URL.
73
void setUrl( const KUrl& url );
76
* Specify whether the file must be local.
77
* The default is to allow both local and remote files.
79
void setLocalFileOnly( bool local );
82
virtual void save() = 0;
85
Ui::SingleFileResourceConfigDialog ui;
86
KConfigDialogManager* mManager;
89
void validated( bool ok );
92
SingleFileResourceConfigWidget* mConfigWidget;