# Hurricane Design Viewer

CellImage.h
1
2 // -*- C++ -*-
3 //
4 // This file is part of the Coriolis Software.
5 // Copyright (c) UPMC/LIP6 2012-2018, All Rights Reserved
6 //
7 // +-----------------------------------------------------------------+
8 // | H U R R I C A N E |
9 // | V L S I B a c k e n d D a t a - B a s e |
10 // | |
11 // | Author : Jean-Paul CHAPUT |
12 // | E-mail : Jean-Paul.Chaput@lip6.fr |
13 // | =============================================================== |
14 // | C++ Header : "./hurricane/viewer/CellImage.h" |
15 // +-----------------------------------------------------------------+
16
17
18 #ifndef HURRICANE_CELL_IMAGE_H
19 #define HURRICANE_CELL_IMAGE_H
20
21
22 #include <list>
23 using namespace std;
24
25 #include <QMainWindow>
26
27 class QEvent;
28 class QKeyEvent;
29 class QAction;
30 class QMenu;
31 class QPainter;
32 class QImage;
33
34 #include "hurricane/Commons.h"
35 #include "hurricane/Name.h"
36 #include "hurricane/viewer/CellWidget.h"
37
38
39 namespace Hurricane {
40
41
42 class Cell;
43 class PaletteWidget;
44
45
46 class CellImage : public QMainWindow {
47 Q_OBJECT;
48
49 public:
50 enum Flags { ShowScale=0x0001 };
51 public:
52 CellImage ( QWidget* parent=NULL );
53 virtual ~CellImage ();
54 inline CellWidget* getCellWidget ();
55 inline const CellWidget* getCellWidget () const;
56 void setScreenCellWidget ( CellWidget* );
57 inline void setMode ( int mode );
58 inline void setFitOnAbutmentBox ( bool );
59 void createLayout ();
60 inline bool fitOnAbutmentBox () const;
61 void pageDecorate ( QPainter& );
62 QImage* toImage ( unsigned int flags=0 );
63 virtual std::string _getString () const;
64
65 protected:
66 CellWidget* _screenCellWidget;
67 CellWidget* _cellWidget;
68 PaletteWidget* _palette;
69 QImage* _image;
70 int _mode;
71 unsigned int _flags;
72 bool _fitOnAbutmentBox;
73 int _drawingWidth;
74 int _drawingHeight;
75 };
76
77
78 // Inline Functions.
79 inline CellWidget* CellImage::getCellWidget () { return _cellWidget; }
80 inline const CellWidget* CellImage::getCellWidget () const { return _cellWidget; }
81 inline void CellImage::setMode ( int mode ) { _mode = mode; }
82 inline void CellImage::setFitOnAbutmentBox ( bool state ) { _fitOnAbutmentBox = state; }
83 inline bool CellImage::fitOnAbutmentBox () const { return _fitOnAbutmentBox; }
84
85
86 } // Hurricane namespace.
87
88
89 GETSTRING_POINTER_SUPPORT(Hurricane::CellImage)
90 IOSTREAM_POINTER_SUPPORT(Hurricane::CellImage)
91
92
93 #endif
std
STL namespace.
Hurricane::CellImage
Widget to generate Image files.
Definition: CellImage.h:46
Hurricane::CellImage::Flags
Flags
Definition: CellImage.h:50
Hurricane
Hurricane::CellWidget
The Widget to display a Cell.
Definition: CellWidget.h:84

Generated by doxygen 1.8.14 on Tue Jul 21 2020 | Return to top of page

Hurricane Design Viewer | Copyright © 2008-2016 UPMC All rights reserved