File: BrowserObjectDiagram.h

package info (click to toggle)
bouml 4.21-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 73,336 kB
  • ctags: 55,459
  • sloc: cpp: 290,644; makefile: 228; sh: 13
file content (114 lines) | stat: -rw-r--r-- 4,122 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// *************************************************************************
//
// Copyright 2004-2010 Bruno PAGES  .
//
// This file is part of the BOUML Uml Toolkit.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
// e-mail : bouml@free.fr
// home   : http://bouml.free.fr
//
// *************************************************************************

#ifndef BROWSER_OBJECTDIAGRAM_H
#define BROWSER_OBJECTDIAGRAM_H

#include "BrowserDiagram.h"
#include "Settings.h"

class QPixmap;
class ObjectDiagramWindow;
class SimpleData;

class BrowserObjectDiagram : public BrowserDiagram {
  friend class StereotypesDialog;
  
  protected:
    static QList<BrowserObjectDiagram> imported;
    static QValueList<int> imported_ids;
    static QStringList its_default_stereotypes;
  
    SimpleData * def;
    ObjectDiagramWindow * window;
    ObjectDiagramSettings settings;
    ObjectDiagramSettings * used_settings;
    UmlColor note_color;
    UmlColor fragment_color;
    UmlColor package_color;
    UmlColor class_instance_color;

    BrowserObjectDiagram(BrowserObjectDiagram * model, BrowserNode * p);
    BrowserObjectDiagram(int id);
    void make();
    void exec_menu_choice(int rank);

  public:
    BrowserObjectDiagram(QString s, BrowserNode * p, int id = 0);
    virtual ~BrowserObjectDiagram();
      
    virtual void delete_it();
    virtual BrowserNode * duplicate(BrowserNode * p,
				    QString name = QString::null);
  
    virtual const QPixmap* pixmap (int) const;
    virtual void draw_svg() const;
  
    virtual void menu();
    virtual void apply_shortcut(QString s);
    virtual void open(bool);
    virtual void on_close();
    virtual void read_session(char * & st);
    virtual UmlCode get_type() const;
    virtual QString get_stype() const;
    virtual int get_identifier() const;
    virtual const char * help_topic() const;
    virtual BasicData * get_data() const;
    virtual void set_name(const char * s);
    virtual void update_drawing_settings();
    virtual void get_objectdiagramsettings(ObjectDiagramSettings &) const;
    virtual bool get_auto_label_position() const;    
    virtual void package_settings(BooL & name_in_tab, ShowContextMode & show_context) const;
    virtual UmlColor get_color(UmlCode) const;
    virtual bool get_shadow() const;
    virtual bool get_draw_all_relations() const;
    virtual void dont_draw_all_relations();
    virtual bool get_show_stereotype_properties() const;
    virtual bool get_classinstwritehorizontally() const;
    virtual ShowContextMode get_classinstshowmode() const;
    virtual bool tool_cmd(ToolCom * com, const char * args);
    virtual bool api_compatible(unsigned v) const;
    virtual void save(QTextStream &, bool ref, QString & warning);
    static BrowserObjectDiagram * read(char * &, char *, BrowserNode *);
    static BrowserObjectDiagram * read_ref(char * & st, char * k);
    static BrowserNode * get_it(const char * k, int id);
    
    void edit_settings();
    
    static BrowserObjectDiagram * add_object_diagram(BrowserNode * future_parent);
    
    static const QStringList & default_stereotypes();
    static void read_stereotypes(char * &, char * & k);
    static void save_stereotypes(QTextStream &);
    
    virtual void renumber(int phase);
    static void open_all();
    static void import();
    
    static void compute_referenced_by(QList<BrowserNode> & l, BrowserNode *,
				      const char * kc, char const * kr);
};

#endif