PageRenderTime 42ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/src/uiview.h

https://bitbucket.org/chrisgr99/geosonix
C Header | 146 lines | 104 code | 14 blank | 28 comment | 0 complexity | 4074f3a1c035c9377b9e738573b4c637 MD5 | raw file
  1. /*******************************************************************************
  2. **
  3. ** GeoSonix
  4. **
  5. ** Copyright (C) 2011 Christopher Graham <chrisgr@geosonix.com>
  6. **
  7. ** This file is part of GeoSonix.
  8. **
  9. ** GeoSonix is free software: you can redistribute it and/or modify
  10. ** it under the terms of the GNU General Public License version 3
  11. ** as published by the Free Software Foundation, or (at your option)
  12. ** any later version.
  13. **
  14. ** GeoSonix is distributed in the hope that it will be useful,
  15. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ** GNU General Public License for more details.
  18. **
  19. ** You should have received a copy of the GNU General Public License
  20. ** along with GeoSonix. If not, see <http://www.gnu.org/licenses/>.
  21. **
  22. ** GeoSonix is a fork from version 0.8.22 of IanniX: http://www.iannix.org/
  23. ** Credits: http://www.iannix.org/en/about.php
  24. **
  25. ** The IanniX web site states:
  26. ** "IanniX is licensed under GPL 3, free and cross-platform."
  27. **
  28. *******************************************************************************/
  29. #ifndef UIVIEW_H
  30. #define UIVIEW_H
  31. #include <QMainWindow>
  32. #include "uitransport.h"
  33. #include "uiinspector.h"
  34. namespace Ui {
  35. class UiView;
  36. }
  37. class UiView : public QMainWindow {
  38. Q_OBJECT
  39. public:
  40. explicit UiView(QWidget *parent = 0);
  41. ~UiView();
  42. private:
  43. bool wasInspectorVisible, wasTransportVisible;
  44. public:
  45. UiRender* getRender() const;
  46. UiTransport* getTransport() const;
  47. UiInspector* getInspector() const;
  48. public slots:
  49. void actionFullscreen();
  50. void escFullscreen();
  51. void actionGrid();
  52. void actionToggle_Inspector() { emit(actionRouteToggle_Inspector()); }
  53. void actionToggle_Transport() { emit(actionRouteToggle_Transport()); }
  54. void actionToggle_Autosize() { emit(actionRouteToggle_Autosize()); }
  55. void actionPlay_pause() { emit(actionRoutePlay_pause()); }
  56. void actionFast_rewind() { emit(actionRouteFast_rewind()); }
  57. void actionZoom_in();
  58. void actionZoom_out();
  59. void actionZoom_initial();
  60. void actionDrawFreeCurve() { emit(actionRouteDrawFreeCurve()); }
  61. void actionDrawPointCurve() { emit(actionRouteDrawPointCurve()); }
  62. void actionDrawTrigger() { emit(actionRouteDrawTrigger()); }
  63. void actionSelectTriggers();
  64. void actionEnableDebugger();
  65. void actionSelectCurves();
  66. void actionSelectCursors();
  67. void actionAddFreeCursor() { emit(actionRouteAddFreeCursor()); }
  68. void actionCircleCurve() { emit(actionRouteCircleCurve()); }
  69. void actionSnapGrid() { emit(actionRouteSnapGrid()); }
  70. void actionHandTool();
  71. void actionToggleLabel();
  72. void setUpdate(); //These set and clear the toolbar button that indicates a web update is available
  73. void clearUpdate();
  74. void actionAbout() { emit(actionRouteAbout()); }
  75. void actionPatchbay() { emit(actionRoutePatchbay()); }
  76. void actionSelectExternalEditor() { emit(actionRouteSelectExternalEditor()); }
  77. void actionLoad_SVG_Drawing() { emit(actionRouteLoad_SVG_Drawing()); }
  78. void actionLoad_Background_Image() { emit(actionRouteLoad_Background_Image()); }
  79. void actionPlaySelected();
  80. void actionEdit3D();
  81. void actionRecord(); //{ emit(actionRouteRecord(ui-> actionEdit3D->isChecked())); }
  82. void toggleDraw(quint16 id);
  83. void unToggleDraw(quint16 id);
  84. void gridChange();
  85. void gridOpacityChange();
  86. void help() {
  87. QDesktopServices::openUrl(QUrl("file:///" + QFileInfo("Documentation/EN/intro.html").absoluteFilePath().replace("\\", "/"), QUrl::TolerantMode));
  88. }
  89. void webHelp() {
  90. emit(webHelpPressed());
  91. }
  92. void actionOpen_App_Folder() {
  93. QDesktopServices::openUrl(QUrl("file:///" + QDir::currentPath().replace("\\", "/"), QUrl::TolerantMode));
  94. }
  95. void actionQuit() {
  96. close();
  97. }
  98. signals:
  99. void actionRouteToggle_Inspector();
  100. void actionRouteToggle_Transport();
  101. void actionRouteToggle_Autosize();
  102. void actionRoutePlay_pause();
  103. void actionRouteFast_rewind();
  104. void actionRouteGrid();
  105. void actionRouteDrawFreeCurve();
  106. void actionRouteDrawPointCurve();
  107. void actionRouteDrawTrigger();
  108. void actionRouteSelectTriggers();
  109. void actionRouteSelectCurves();
  110. void actionRouteAddFreeCursor();
  111. void actionRouteCircleCurve();
  112. void actionRouteGridChange(qreal);
  113. void actionRouteGridOpacityChange(qreal);
  114. void actionRouteSnapGrid();
  115. void actionRouteAbout();
  116. void actionRoutePatchbay();
  117. void actionRouteSelectExternalEditor();
  118. void actionRouteLoad_Background_Image();
  119. void actionRouteLoad_SVG_Drawing();
  120. void actionRouteQuit();
  121. void actionRouteCloseEvent(QCloseEvent*);
  122. void actionRouteRecord(bool checked);
  123. void webHelpPressed();
  124. void actionRouteEnableDebugger(bool );
  125. protected:
  126. void changeEvent(QEvent *e);
  127. void keyPressEvent(QKeyEvent *event);
  128. void closeEvent(QCloseEvent *);
  129. private:
  130. Ui::UiView *ui;
  131. };
  132. #endif // UIVIEW_H