~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/Panel/krviewfactory.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-08-08 13:47:36 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20110808134736-8e630ivgd2c3sgg5
Tags: 1:2.4.0~beta1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
class KrView;
40
40
class KConfig;
41
 
class KrMainWindow;
42
41
 
43
42
class KrViewInstance
44
43
{
63
62
        return m_shortcut;
64
63
    }
65
64
 
66
 
    virtual KrView *create(QWidget *w, const bool &left, KConfig *cfg) = 0;
 
65
    virtual KrView *create(QWidget *w, KConfig *cfg) = 0;
67
66
 
68
67
protected:
69
68
    int                            m_id;
82
81
    KrViewInstanceImpl(int id, QString name, QString desc, QString icon, QKeySequence shortcut) :
83
82
        KrViewInstance(id, name, desc, icon, shortcut) {}
84
83
 
85
 
    virtual KrView *create(QWidget *w, const bool &left, KConfig *cfg) {
86
 
        return new T(w, *this, left, cfg);
 
84
    virtual KrView *create(QWidget *w, KConfig *cfg) {
 
85
        return new T(w, *this, cfg);
87
86
    }
88
87
};
89
88
 
91
90
{
92
91
    friend class KrViewInstance;
93
92
public:
94
 
    static KrView *                createView(int id, QWidget * widget, const bool &left, KConfig *cfg);
 
93
    static KrView *                createView(int id, QWidget * widget, KConfig *cfg);
95
94
    static KrViewInstance *        viewInstance(int id);
96
95
    static const QList<KrViewInstance*>& registeredViews() {
97
96
        return self().m_registeredViews;
99
98
    static int                     defaultViewId()         {
100
99
        return self().m_defaultViewId;
101
100
    }
102
 
    static void                    init();
103
101
 
104
102
private:
105
 
    KrViewFactory() : m_defaultViewId(-1) {}
 
103
    KrViewFactory();
106
104
 
107
105
    static KrViewFactory &         self();
 
106
    static void                    init();
108
107
    static void                    registerView(KrViewInstance *);
109
108
 
110
109
    QList<KrViewInstance *>        m_registeredViews;