# Unicorn Documentation

# Unicorn - Coriolis GUI

UnicornGui.h
1 // -*- C++ -*-
2 //
3 // This file is part of the Coriolis Software.
4 // Copyright (c) UPMC 2008-2018, All Rights Reserved
5 //
6 // +-----------------------------------------------------------------+
7 // | C O R I O L I S |
8 // | U n i c o r n - M a i n G U I |
9 // | |
10 // | Author : Jean-Paul CHAPUT |
11 // | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
12 // | =============================================================== |
13 // | C++ Header : "./unicorn/UnicornGui.h" |
14 // +-----------------------------------------------------------------+
15
16
17
18
19 #ifndef UNICORN_UNICORN_H
20 #define UNICORN_UNICORN_H
21
22 #include <set>
23 #include <iostream>
24 #include <functional>
25 #include <boost/any.hpp>
26 #include "hurricane/viewer/CellViewer.h"
27 #include "crlcore/Banner.h"
28 namespace CRL {
29 class GraphicTool;
30 class LibraryManager;
31 }
32
33 #include "unicorn/ImportCell.h"
34
35
36 namespace Unicorn {
37
38
39 using std::set;
40 using Hurricane::CellViewer;
41 using Hurricane::Cell;
42 using CRL::Banner;
43 using CRL::GraphicTool;
44 using CRL::LibraryManager;
45
46 class ImportCellDialog;
47 class ExportCellDialog;
48
49
50 class UnicornGui : public CellViewer {
51 Q_OBJECT;
52 public:
53 static UnicornGui* create ( QWidget* parent=NULL );
54 void destroy ();
55 static inline Banner& getBanner ();
56 virtual Cell* getCellFromDb ( const char* name );
57 inline ImportCell* getImportCell ();
58 void registerTool ( GraphicTool* );
59 virtual UnicornGui* vcreate () const;
60 virtual std::string _getString () const;
61 public slots:
62 void openCell ();
63 void saveCell ();
64 void importCell ();
65 void exportCell ();
66 protected:
67 UnicornGui ( QWidget* parent );
68 virtual ~UnicornGui ();
69 virtual void _postCreate ();
70 virtual void _preDestroy ();
71 void _runUnicornInit ();
72 protected:
73 static Banner _banner;
74 set<GraphicTool*> _tools;
75 ImportCell _importCell;
76 ImportCellDialog* _importDialog;
77 ExportCellDialog* _exportDialog;
78 LibraryManager* _libraryManager;
79 };
80
81
82 inline Banner& UnicornGui::getBanner () { return _banner; }
83 inline ImportCell* UnicornGui::getImportCell () { return &_importCell; }
84
85
86 } // End of Unicorn namespace.
87
88
89 GETSTRING_POINTER_SUPPORT(Unicorn::UnicornGui)
90 IOSTREAM_POINTER_SUPPORT(Unicorn::UnicornGui)
91
92
93 #endif // __UNICORN_UNICORN__
94
Unicorn
Namespace of Unicorn.
Definition: UnicornGui.h:36
Unicorn::UnicornGui
The Full Fledged GUI of Coriolis.
Definition: UnicornGui.h:50
Hurricane::Cell
Unicorn::UnicornGui::registerTool
void registerTool(GraphicTool *)
Unicorn::UnicornGui::getCellFromDb
virtual Cell * getCellFromDb(const char *name)
CRL::GraphicTool
Unicorn::UnicornGui::create
static UnicornGui * create(QWidget *parent=NULL)
Hurricane::CellViewer
CRL::Banner
Unicorn::UnicornGui::getBanner
static Banner & getBanner()
Definition: UnicornGui.h:82
CRL
Unicorn::UnicornGui::destroy
void destroy()