~ubuntu-branches/ubuntu/karmic/ugene/karmic

« back to all changes in this revision

Viewing changes to src/plugins/biostruct3d_view/src/BioStruct3DViewPlugin.h

  • Committer: Bazaar Package Importer
  • Author(s): Morten Kjeldgaard
  • Date: 2009-06-16 13:20:00 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090616132000-a0eezpre9uvx91a5
Tags: 1.4.2+repack-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************
2
 
* Unipro UGENE - Integrated Bioinformatics Suite
3
 
* Copyright (C) 2008 Unipro, Russia (http://ugene.unipro.ru)
4
 
* All Rights Reserved
5
 
6
 
*     This source code is distributed under the terms of the
7
 
*     GNU General Public License. See the files COPYING and LICENSE
8
 
*     for details.
9
 
*****************************************************************/
10
 
 
11
 
#ifndef _GB2_BIOSTRUCT3D_VIEW_PLUGIN_H_
12
 
#define _GB2_BIOSTRUCT3D_VIEW_PLUGIN_H_
13
 
 
14
 
#include <core_api/PluginModel.h>
15
 
#include <core_api/AppContext.h>
16
 
#include <core_api/ObjectViewModel.h>
17
 
 
18
 
#include <QtCore/QMap>
19
 
#include <QtGui/QAction>
20
 
 
21
 
namespace GB2 {
22
 
 
23
 
class BioStruct3DSplitter;
24
 
class BioStruct3DObject;
25
 
 
26
 
class BioStruct3DViewPlugin : public Plugin {
27
 
    Q_OBJECT
28
 
public:
29
 
    BioStruct3DViewPlugin();
30
 
    ~BioStruct3DViewPlugin();
31
 
private:
32
 
    GObjectViewWindowContext* viewContext;
33
 
};
34
 
 
35
 
class BioStruct3DViewContext: public GObjectViewWindowContext {
36
 
    Q_OBJECT
37
 
        QMap<QString, BioStruct3DSplitter*> splitterMap;
38
 
public:
39
 
    BioStruct3DViewContext(QObject* p);
40
 
    
41
 
    virtual bool canHandle(GObjectView* v, GObject* o);
42
 
 
43
 
    virtual void onObjectAdded(GObjectView* v, GObject* obj);
44
 
    virtual void onObjectRemoved(GObjectView* v, GObject* obj);
45
 
 
46
 
protected:
47
 
    virtual void initViewContext(GObjectView* view);
48
 
 
49
 
    BioStruct3DSplitter* get3DView(GObjectView* view, bool create);
50
 
    void remove3DView(GObjectView* view);
51
 
 
52
 
    QAction* getClose3DViewAction(GObjectView* view);
53
 
 
54
 
 
55
 
protected slots:
56
 
    void sl_close3DView();
57
 
 
58
 
};
59
 
 
60
 
 
61
 
} //namespace
62
 
 
63
 
#endif
 
1
/*****************************************************************
 
2
* Unipro UGENE - Integrated Bioinformatics Suite
 
3
* Copyright (C) 2008 Unipro, Russia (http://ugene.unipro.ru)
 
4
* All Rights Reserved
 
5
 
6
*     This source code is distributed under the terms of the
 
7
*     GNU General Public License. See the files COPYING and LICENSE
 
8
*     for details.
 
9
*****************************************************************/
 
10
 
 
11
#ifndef _GB2_BIOSTRUCT3D_VIEW_PLUGIN_H_
 
12
#define _GB2_BIOSTRUCT3D_VIEW_PLUGIN_H_
 
13
 
 
14
#include <core_api/PluginModel.h>
 
15
#include <core_api/AppContext.h>
 
16
#include <core_api/ObjectViewModel.h>
 
17
 
 
18
#include <QtCore/QMap>
 
19
#include <QtGui/QAction>
 
20
 
 
21
namespace GB2 {
 
22
 
 
23
class BioStruct3DSplitter;
 
24
class BioStruct3DObject;
 
25
 
 
26
class BioStruct3DViewPlugin : public Plugin {
 
27
    Q_OBJECT
 
28
public:
 
29
    BioStruct3DViewPlugin();
 
30
    ~BioStruct3DViewPlugin();
 
31
private:
 
32
    GObjectViewWindowContext* viewContext;
 
33
};
 
34
 
 
35
class BioStruct3DViewContext: public GObjectViewWindowContext {
 
36
    Q_OBJECT
 
37
        QMap<QString, BioStruct3DSplitter*> splitterMap;
 
38
public:
 
39
    BioStruct3DViewContext(QObject* p);
 
40
    
 
41
    virtual bool canHandle(GObjectView* v, GObject* o);
 
42
 
 
43
    virtual void onObjectAdded(GObjectView* v, GObject* obj);
 
44
    virtual void onObjectRemoved(GObjectView* v, GObject* obj);
 
45
 
 
46
protected:
 
47
    virtual void initViewContext(GObjectView* view);
 
48
 
 
49
    BioStruct3DSplitter* get3DView(GObjectView* view, bool create);
 
50
    void remove3DView(GObjectView* view);
 
51
 
 
52
    QAction* getClose3DViewAction(GObjectView* view);
 
53
 
 
54
 
 
55
protected slots:
 
56
    void sl_close3DView();
 
57
 
 
58
};
 
59
 
 
60
 
 
61
} //namespace
 
62
 
 
63
#endif