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>
23using namespace std;
24
25#include <QMainWindow>
26
27class QEvent;
28class QKeyEvent;
29class QAction;
30class QMenu;
31class QPainter;
32class QImage;
33
34#include "hurricane/Commons.h"
35#include "hurricane/Name.h"
36#include "hurricane/viewer/CellWidget.h"
37
38
39namespace 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;
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
89GETSTRING_POINTER_SUPPORT(Hurricane::CellImage)
90IOSTREAM_POINTER_SUPPORT(Hurricane::CellImage)
91
92
93#endif
Widget to generate Image files.
Definition CellImage.h:46
void setScreenCellWidget(CellWidget *)
CellImage(QWidget *parent=NULL)
Flags
Definition CellImage.h:50
@ ShowScale
Definition CellImage.h:50
QImage * toImage(unsigned int flags=0)
void setMode(int mode)
Definition CellImage.h:81
The Widget to display a Cell.
Definition CellWidget.h:81


Generated by doxygen 1.16.1 on Return to top of page
Hurricane Design Viewer Copyright © 2008-2020 Sorbonne Universite All rights reserved