kitchensync

pluginpicker.h
1/*
2 This file is part of KitchenSync.
3
4 Copyright (c) 2005 Cornelius Schumacher <schumacher@kde.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 USA.
20*/
21#ifndef PLUGINPICKER_H
22#define PLUGINPICKER_H
23
24#include <libqopensync/plugin.h>
25
26#include <kdialogbase.h>
27#include <kwidgetlist.h>
28
29#include <tqwidget.h>
30
31class PluginItem : public KWidgetListItem
32{
33 public:
34 PluginItem( KWidgetList *, const QSync::Plugin & );
35
36 QSync::Plugin plugin() const { return mPlugin; }
37
38 private:
39 QSync::Plugin mPlugin;
40};
41
42class PluginPicker : public TQWidget
43{
44 Q_OBJECT
45
46
47 public:
48 PluginPicker( TQWidget *parent );
49
50 QSync::Plugin selectedPlugin() const;
51
52 signals:
53 void selected();
54
55 protected:
56 void updatePluginList();
57
58 private:
59 KWidgetList *mPluginList;
60};
61
62class PluginPickerDialog : public KDialogBase
63{
64 Q_OBJECT
65
66
67 public:
68 PluginPickerDialog( TQWidget *parent );
69
70 QSync::Plugin selectedPlugin() const;
71
72 static QSync::Plugin getPlugin( TQWidget *parent );
73
74 protected slots:
75 void slotOk();
76 void slotCancel();
77
78 private:
79 PluginPicker *mPicker;
80};
81
82#endif