~ubuntu-branches/ubuntu/karmic/kst/karmic

« back to all changes in this revision

Viewing changes to kst/kst/kstplugindialog_i.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-30 19:11:30 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060630191130-acumuar75bz4puty
Tags: 1.2.1-1ubuntu1
Merge from debian unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#ifndef KSTPLUGINDIALOGI_H
19
19
#define KSTPLUGINDIALOGI_H
20
20
 
21
 
#include "kglobal.h"
22
 
 
23
21
#include "kstplugin.h"
24
22
 
25
 
#include "plugindialog.h"
26
 
 
27
 
static const QString& plugin_defaultTag = KGlobal::staticQString("<Auto Name>");
28
 
 
29
 
class KstPluginDialogI : public KstPluginDialog {
 
23
#include "kstdatadialog.h"
 
24
#include "kst_export.h"
 
25
 
 
26
class PluginDialogWidget;
 
27
 
 
28
class KST_EXPORT KstPluginDialogI : public KstDataDialog {
30
29
  Q_OBJECT
31
30
  public:
32
 
    KstPluginDialogI(QWidget* parent = 0, const char* name = 0,
33
 
        bool modal = FALSE, WFlags fl = 0 );
 
31
    KstPluginDialogI(QWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0);
34
32
    virtual ~KstPluginDialogI();
 
33
    static KstPluginDialogI *globalInstance();
 
34
    static const QString& plugin_defaultTag;
 
35
 
35
36
  public slots:
36
 
    /** update the entries in the plugin dialog to represent current plugins */
37
37
    void updateForm();
38
 
    virtual void update();
39
 
 
40
 
    virtual bool new_I();
41
 
    bool edit_I();
42
 
 
 
38
    void update();
 
39
    bool newObject();
 
40
    bool editObject();
43
41
    virtual void updatePluginList();
44
42
 
45
 
    static KstPluginDialogI *globalInstance();
46
 
 
47
43
  protected slots:
48
44
    void pluginChanged(int);
49
45
    void showPluginManager();
53
49
 
54
50
  protected:
55
51
    QStringList _pluginList;
56
 
    
57
 
    
 
52
 
58
53
    void fillVectorScalarCombos(KstSharedPtr<Plugin> pPtr);
59
54
    virtual bool saveInputs(KstPluginPtr plugin, KstSharedPtr<Plugin> p);
60
55
    bool saveOutputs(KstPluginPtr plugin, KstSharedPtr<Plugin> p);
61
56
    virtual void generateEntries(bool input, int& cnt, QWidget *parent,
62
57
        QGridLayout *grid, const QValueList<Plugin::Data::IOValue>& table);
63
58
 
64
 
    KstPluginPtr _getPtr(const QString &tagin);
65
 
 
66
59
    QMap<QString,QString> cacheInputs(const QValueList<Plugin::Data::IOValue>& table);
67
60
    void restoreInputs(const QValueList<Plugin::Data::IOValue>& table, const QMap<QString,QString>& v);
68
61
 
69
 
    bool _newDialog;
70
 
    KstPluginPtr DP;
71
 
    
72
62
    // layout items
73
63
    QGridLayout* _pluginInfoGrid;
74
64
    QGridLayout* _pluginInputOutputGrid;
75
 
    
76
65
    QValueList<QWidget*> _pluginWidgets;
77
 
    
 
66
 
78
67
  private:
79
68
    static QGuardedPtr<KstPluginDialogI> _inst;
80
69
 
81
 
    /***********************************/
82
 
    /** defined in dataobjectdialog.h **/
83
 
  public slots:
84
 
    void show_Edit(const QString &field);
85
 
    void show_New();
86
 
    void OK();
87
 
    void Init();
88
 
    void close();
89
 
    void reject();
90
70
  protected:
91
 
    void _fillFieldsForEdit();
92
 
    void _fillFieldsForNew();
 
71
    void fillFieldsForEdit();
 
72
    void fillFieldsForNew();
 
73
    PluginDialogWidget *_w;
93
74
};
94
75
 
95
76
#endif