~ubuntu-branches/ubuntu/quantal/kdepim/quantal

« back to all changes in this revision

Viewing changes to kalarm/akonadi/kdepim-runtime/shared/singlefileresourceconfigdialogbase.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:51 UTC
  • mto: This revision was merged to the branch mainline in revision 193.
  • Revision ID: package-import@ubuntu.com-20111215141751-bmhdpiwl23wd9w26
Tags: upstream-4.7.90
ImportĀ upstreamĀ versionĀ 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
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>
5
 
 
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.
10
 
 
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.
15
 
 
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
19
 
    02110-1301, USA.
20
 
*/
21
 
 
22
 
#ifndef AKONADI_SINGLEFILERESOURCECONFIGDIALOGBASE_H
23
 
#define AKONADI_SINGLEFILERESOURCECONFIGDIALOGBASE_H
24
 
 
25
 
#include "ui_singlefileresourceconfigdialog.h"
26
 
 
27
 
#include <KDE/KDialog>
28
 
#include <KDE/KUrl>
29
 
 
30
 
class KTabWidget;
31
 
class KConfigDialogManager;
32
 
 
33
 
namespace Akonadi {
34
 
 
35
 
class SingleFileResourceConfigWidget;
36
 
 
37
 
/**
38
 
 * Base class for the configuration dialog for single file based resources.
39
 
 * @see SingleFileResourceConfigDialog
40
 
 */
41
 
class SingleFileResourceConfigDialogBase : public KDialog
42
 
{
43
 
    Q_OBJECT
44
 
  public:
45
 
    explicit SingleFileResourceConfigDialogBase( WId windowId );
46
 
 
47
 
    /**
48
 
     * Adds @param page to the tabwidget. This can be used to add custom
49
 
     * settings for a specific single file resource.
50
 
     */
51
 
    void addPage( const QString &title, QWidget *page );
52
 
 
53
 
    /**
54
 
     * Set file extension filter.
55
 
     */
56
 
    void setFilter( const QString &filter );
57
 
 
58
 
    /**
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.
62
 
     */
63
 
    void setMonitorEnabled( bool enable );
64
 
 
65
 
    /**
66
 
     * Return the file URL.
67
 
     */
68
 
    KUrl url() const;
69
 
 
70
 
    /**
71
 
     * Set the file URL.
72
 
     */
73
 
    void setUrl( const KUrl& url );
74
 
 
75
 
    /**
76
 
     * Specify whether the file must be local.
77
 
     * The default is to allow both local and remote files.
78
 
     */
79
 
    void setLocalFileOnly( bool local );
80
 
 
81
 
  protected Q_SLOTS:
82
 
    virtual void save() = 0;
83
 
 
84
 
  protected:
85
 
    Ui::SingleFileResourceConfigDialog ui;
86
 
    KConfigDialogManager* mManager;
87
 
 
88
 
  private Q_SLOTS:
89
 
    void validated( bool ok );
90
 
 
91
 
  private:
92
 
    SingleFileResourceConfigWidget* mConfigWidget;
93
 
};
94
 
 
95
 
}
96
 
 
97
 
#endif