source: trunk/IPs/systemC/processor/Morpheo/Tools/Viewer/Graphics/include/window.h @ 20

Last change on this file since 20 was 20, checked in by chou, 17 years ago

1ere release du Viewer :

  • Parseur xml sur Base de données
  • Chargement d'un fichier de positions
  • Dessin du top-level
  • Dessin des ports du top level
  • Dessin des sous composants
  • Dessin des ports de ces sous composants

les valeurs de positions et de taille sont en %.

  • Property svn:executable set to *
File size: 2.7 KB
Line 
1/******************************************************/
2/*                                                    */
3/*  this class creates the application windows :      */
4/*  - the main window where composants are drawn,     */
5/*  - the parameters window,                          */
6/*  - and the informations window.                    */
7/*                                                    */
8/******************************************************/
9
10
11#ifndef WINDOW_H
12#define WINDOW_H
13
14
15#include <iostream>
16#include <qstring.h>
17#include <qapplication.h>
18#include <qmetaobject.h>
19#include <qmenu.h>
20#include <qmenubar.h>
21#include <qmainwindow.h>
22#include <qwidget.h>
23#include <qboxlayout.h> 
24#include <qpainter.h>
25#include <qcolor.h>
26#include <qlabel.h>
27#include <qstatusbar.h>
28#include <qpushbutton.h>
29#include <qmessagebox.h>
30#include <qlineedit.h>
31#include <qwindowsstyle.h>
32#include <qplastiquestyle.h>
33#include <qlist.h>
34#include <qrect.h>
35#include <string.h>
36#include <qtreeview.h>
37#include <qdirmodel.h>
38
39#include "Tools/Viewer/Parser/include/parser.h"
40
41
42#define NORTH 0
43#define SOUTH 1
44#define EAST 2
45#define WEST 3
46
47using namespace morpheo::tools::viewer::parser;
48using namespace morpheo::tools::viewer::bdd;
49using namespace std;
50
51namespace morpheo{
52  namespace tools{
53    namespace viewer{
54      namespace graphics{
55
56class Window : public QMainWindow
57{
58 
59  Q_OBJECT
60
61 public:
62
63  Window(QString name);
64  void _setParse(Parse *p); 
65  void _init_file();   
66 private slots:
67   
68  void _open();
69  void _open_end();
70  void _open_error();
71
72  void _save();
73  void _saveAs();
74  void _saveAsOk();
75  void _close();
76  void _quit();
77  void _quit2();
78  void _zoomIn();
79  void _zoomOut();
80  void _defautZoom();
81  void _level();
82  void _informations();
83  void _parameters();
84  void _about();
85
86 private:
87
88  void wparameters();
89  void winformations();
90  void paintEvent( QPaintEvent * );
91  void repaint();
92  void drawPort(int x,int y,int pos,string dir);
93
94  QList <Port> port_east;
95  QList <Port> port_west;
96  QList <Port> port_north;
97  QList <Port> port_south;
98  QList <Component> *compo;
99
100  QWidget *wparam;
101  QWidget *winfo;
102  QWidget *ws;
103  QWidget *wq;
104  QWidget *wo;
105  QWidget *wa;
106
107  Parse *parse;
108  BaseV *base;
109  BaseP p;
110  Entity *entity;
111  Coord *c;
112 
113  QPainter painter;
114
115  QStatusBar *status;
116
117  QLineEdit *file_name;
118  QString current_name;
119
120  int window_height;
121  int window_width;
122  int panel_heigth;
123  int panel_width;
124  int margeX;
125  int margeY;
126  int portX;
127  int portY;
128  int posX;
129  int posY;
130  int tailleX;
131  int tailleY;
132
133  bool save_as;
134  bool first_save;
135  bool info_open;
136  bool param_open;
137  bool is_save;
138  bool paint;
139  bool wq_open;
140  bool wo_open;
141  bool ws_open;
142  bool wa_open;
143  bool quit_demand;
144  bool file_open;
145  bool is_parse;
146};
147      };
148    };
149  };
150};
151
152#endif
Note: See TracBrowser for help on using the repository browser.