Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FullScreen.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OMNI_UI_FULLSCREEN_H_
21 #define OMNI_UI_FULLSCREEN_H_
22 
23 #include <QWidget>
24 #include <QScreen>
25 #include <omni/util.h>
26 #include "ScreenSetupDragWidget.h"
27 
28 namespace omni {
29  namespace ui {
30  /// Widget for fullscreen display
31  class FullScreen : public QWidget {
32  Q_OBJECT
33 
34  public:
35  FullScreen(const QScreen *_screen);
36  ~FullScreen();
37 
38  void hideDragWidget();
39  void showDragWidget(int _subIndex,
40  QColor const& _color);
41 
42  void attach(int _subIndex,
43  QWidget *_widget);
44  void detach(int _subIndex);
45  void detachAll();
46 
47  public slots:
48  void deleteIfScreenRemoved(QScreen*);
49 
50  protected:
51  void closeEvent(QCloseEvent *_event);
52  void resizeEvent(QResizeEvent *_event);
53 
54  private:
55  void setGeometry(QWidget *,
56  int _subIndex) const;
57 
58  QScreen const *screen_;
59  std::map<int, QWidget *> widgets_;
60  QUniquePtr<ScreenSetupDragWidget> dragWidget_;
61  };
62  }
63 }
64 
65 
66 #endif /* OMNI_UI_FULLSCREEN_H_ */
void deleteIfScreenRemoved(QScreen *)
Definition: FullScreen.cpp:41
QUniquePtr< ScreenSetupDragWidget > dragWidget_
Definition: FullScreen.h:60
QScreen const * screen_
Definition: FullScreen.h:58
void detachAll()
Definition: FullScreen.cpp:53
void setGeometry(QWidget *, int _subIndex) const
Definition: FullScreen.cpp:104
void resizeEvent(QResizeEvent *_event)
Definition: FullScreen.cpp:131
std::map< int, QWidget * > widgets_
Definition: FullScreen.h:59
void attach(int _subIndex, QWidget *_widget)
Definition: FullScreen.cpp:75
~FullScreen()
Definition: FullScreen.cpp:48
void showDragWidget(int _subIndex, QColor const &_color)
Definition: FullScreen.cpp:117
void hideDragWidget()
Definition: FullScreen.cpp:95
FullScreen(const QScreen *_screen)
Definition: FullScreen.cpp:27
Widget for fullscreen display.
Definition: FullScreen.h:31
void detach(int _subIndex)
Definition: FullScreen.cpp:64
void closeEvent(QCloseEvent *_event)
Definition: FullScreen.cpp:126