Re-defined QMainWindow that contains all the GUI elements such as GLWidget, menu bars, tool bars and other widgets.
More...
#include <MainWindow.h>
|
void | onSetTabletActivity (bool active) |
|
void | onRequestUpdate () |
|
void | onAutoSwitchMode (cher::MOUSE_MODE mode) |
|
void | onRequestBookmarkSet (int row) |
|
void | onDeleteBookmark (const QModelIndex &index) |
|
void | onDeleteCanvas (const QModelIndex &index) |
|
void | onDeletePhoto (const QModelIndex &index) |
|
void | onVisibilitySetCanvas (int index) |
|
void | onMoveBookmark (const QModelIndex &index) |
|
void | onApplyStateBookmark (const QModelIndex &index) |
|
void | onBookmarkAddedToWidget (const QModelIndex &, int first, int last) |
|
void | onBookmarkRemovedFromWidget (const QModelIndex &, int first, int last) |
|
void | onMouseModeSet (cher::MOUSE_MODE mode) |
|
void | onPhotoTransparencyPlus (const QModelIndex &index) |
|
void | onPhotoTransparencyMinus (const QModelIndex &index) |
|
void | onPhotoPushed (int parent, int start, int, int destination, int) |
|
void | onRequestSceneData (entity::SceneState *state) |
|
void | onRequestSceneStateSet (entity::SceneState *state) |
|
void | onRequestSceneToolStatus (bool &visibility) |
|
void | onImportPhoto (const QString &path, const QString &fileName) |
|
void | onRequestCanvasCreate (const osg::Vec3f &eye, const osg::Vec3f ¢er, const osg::Vec3f &up) |
|
void | onCanvasClicked (const QModelIndex &index) |
|
|
void | onFileNew () |
|
void | onFileOpen () |
|
void | onFileSave () |
|
void | onFileSaveAs () |
|
void | onFileExport () |
|
void | onFileImage () |
|
void | onFilePhotoBase () |
|
void | onFileClose () |
|
void | onFileExit () |
|
void | onCut () |
|
void | onCopy () |
|
void | onPaste () |
|
void | onTools () |
|
void | onCameraOrbit () |
|
void | onCameraZoom () |
|
void | onCameraPan () |
|
void | onCameraAperture () |
|
void | onHomeView () |
|
void | onViewAllCanvas () |
|
void | onSelect () |
|
void | onSelect3d () |
|
void | onErase () |
|
void | onDelete () |
|
void | onSketch () |
|
void | onPolygon () |
|
void | onLineSegment () |
|
void | onNewCanvasClone () |
|
void | onNewCanvasXY () |
|
void | onNewCanvasYZ () |
|
void | onNewCanvasZY () |
|
void | onNewCanvasXZ () |
|
void | onNewCanvasOrtho () |
|
void | onNewCanvasSeparate () |
|
void | onNewCanvasStandard () |
|
void | onNewCanvasCoaxial () |
|
void | onNewCanvasParallel () |
|
void | onNewCanvasRing () |
|
void | onCanvasEdit () |
|
void | onImageMove () |
|
void | onImageRotate () |
|
void | onImageScale () |
|
void | onImageFlipH () |
|
void | onImageFlipV () |
|
void | onStrokesPush () |
|
void | onBookmark () |
|
void | onBookmarkNew () |
|
void | onBookmarkSketch () |
|
void | onBookmarkEdit (const QString &name) |
|
void | onStrokeFogFactor () |
|
|
void | initializeActions () |
|
void | initializeMenus () |
|
void | initializeToolbars () |
|
void | initializeCallbacks () |
|
bool | loadSceneFromFile () |
|
bool | importPhoto (QString &fileName) |
|
void | setSceneState (const entity::SceneState *state) |
|
void | addMenuBookmark (const QString &name) |
|
|
QMdiArea * | m_mdiArea |
|
QTabWidget * | m_tabWidget |
|
BookmarkWidget * | m_bookmarkWidget |
|
CanvasPhotoWidget * | m_canvasWidget |
|
PhotoWidget * | m_photoWidget |
|
PhotoModel * | m_photoModel |
|
QUndoStack * | m_undoStack |
|
QMenuBar * | m_menuBar |
|
QMenu * | m_submenuBookmarks |
|
osg::ref_ptr< RootScene > | m_rootScene |
|
QUndoStack * | m_viewStack |
|
GLWidget * | m_glWidget |
|
QAction * | m_actionNewFile |
|
QAction * | m_actionClose |
|
QAction * | m_actionExit |
|
QAction * | m_actionImportImage |
|
QAction * | m_actionOpenFile |
|
QAction * | m_actionSaveFile |
|
QAction * | m_actionSaveAsFile |
|
QAction * | m_actionExportAs |
|
QAction * | m_actionPhotoBase |
|
QAction * | m_actionUndo |
|
QAction * | m_actionRedo |
|
QAction * | m_actionCut |
|
QAction * | m_actionCopy |
|
QAction * | m_actionPaste |
|
QAction * | m_actionDelete |
|
QAction * | m_actionTools |
|
QAction * | m_actionOrbit |
|
QAction * | m_actionPan |
|
QAction * | m_actionZoom |
|
QAction * | m_actionPrevView |
|
QAction * | m_actionNextView |
|
QAction * | m_actionBookmark |
|
QAction * | m_actionBookmarkSketch |
|
QAction * | m_actionCameraSettings |
|
QAction * | m_actionHomeView |
|
QAction * | m_actionViewAllCanvas |
|
QAction * | m_actionSketch |
|
QAction * | m_actionEraser |
|
QAction * | m_actionSelect |
|
QAction * | m_actionSelect3d |
|
QAction * | m_actionPolygon |
|
QAction * | m_actionLinesegment |
|
QAction * | m_actionCanvasClone |
|
QAction * | m_actionCanvasXY |
|
QAction * | m_actionCanvasYZ |
|
QAction * | m_actionCanvasZY |
|
QAction * | m_actionCanvasXZ |
|
QAction * | m_actionCanvasOrtho |
|
QAction * | m_actionCanvasSeparate |
|
QAction * | m_actionSetStandard |
|
QAction * | m_actionCanvasEdit |
|
QAction * | m_actionStrokesPush |
|
QAction * | m_actionStrokeFogFactor |
|
CameraProperties * | m_cameraProperties |
|
QColorDialog * | m_colorDialog |
|
Re-defined QMainWindow that contains all the GUI elements such as GLWidget, menu bars, tool bars and other widgets.
§ MainWindow()
MainWindow::MainWindow |
( |
QWidget * |
parent = 0 , |
|
|
Qt::WindowFlags |
flags = 0 |
|
) |
| |
|
explicit |
Constructor: initialies the GUI elements and scene graph structure.
§ ~MainWindow()
MainWindow::~MainWindow |
( |
| ) |
|
Destructor: annulates singlton-related pointer.
§ addMenuBookmark()
void MainWindow::addMenuBookmark |
( |
const QString & |
name | ) |
|
|
protected |
UI Method to add name of editable bookmark into bookmark's submenu. Has to be run whenever the new bookmark is added throught the SVM method, or when opening new file. Has to be cleared when the scene is cleared, or certain elements deleted when the corresponding bookmark is deleted.
§ getBookmarkWidget()
A method to obtain a pointer on bookmark widget.
§ getCamera()
osg::Camera * MainWindow::getCamera |
( |
| ) |
const |
- Returns
- pointer on a camera used within GLWidget.
§ getCanvasCurrent()
A method to obtain pointer on current canvas, if there is one present.
§ getCurrentColor()
osg::Vec4f MainWindow::getCurrentColor |
( |
| ) |
const |
A method to obtain current color of the color dialog (for polygon drawing).
§ getFOV2()
double MainWindow::getFOV2 |
( |
| ) |
const |
A method to obtain current camera's FOV.
- Returns
- full angle FOV (not half angle).
§ getRootScene()
const RootScene * MainWindow::getRootScene |
( |
| ) |
const |
§ getScreenshot()
QPixmap MainWindow::getScreenshot |
( |
const osg::Vec3d & |
eye, |
|
|
const osg::Vec3d & |
center, |
|
|
const osg::Vec3d & |
up |
|
) |
| |
A method to obtain a scene screenshot with the given camera position.
§ getStrokeFogFactor()
bool MainWindow::getStrokeFogFactor |
( |
| ) |
const |
- Returns
- state of the button responsible for whether fog factor is on (true) or off (false).
§ getViewportHeight()
int MainWindow::getViewportHeight |
( |
| ) |
const |
§ getViewportWidth()
int MainWindow::getViewportWidth |
( |
| ) |
const |
§ instance()
Singleton design pattern.
§ onApplyStateBookmark
void MainWindow::onApplyStateBookmark |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Slot called when user presses on cog icon to change the state set of the bookmark.
§ onAutoSwitchMode
Slot called when user performs switch of mouse mode automatically, e.g. by doing double-click.
§ onBookmarkAddedToWidget
void MainWindow::onBookmarkAddedToWidget |
( |
const QModelIndex & |
, |
|
|
int |
first, |
|
|
int |
last |
|
) |
| |
|
slot |
Slot called when BookmarkWidget content had changed, i.e., new row was inserted.
§ onBookmarkRemovedFromWidget
void MainWindow::onBookmarkRemovedFromWidget |
( |
const QModelIndex & |
, |
|
|
int |
first, |
|
|
int |
last |
|
) |
| |
|
slot |
Slot called when BookmarkWidget content had changed, i.e., a row was removed.
§ onCanvasClicked
void MainWindow::onCanvasClicked |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Slot is called whenever user right clicks on Canvas within canvas widget. Called after similar slot of user scene. This slot is only for photo re-scaling mouse mode.
§ onDeleteBookmark
void MainWindow::onDeleteBookmark |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Slot called when user requested to delete bookmark from the BookmarkWidget.
§ onDeleteCanvas
void MainWindow::onDeleteCanvas |
( |
const QModelIndex & |
index | ) |
|
|
slot |
§ onDeletePhoto
void MainWindow::onDeletePhoto |
( |
const QModelIndex & |
index | ) |
|
|
slot |
§ onImportPhoto
void MainWindow::onImportPhoto |
( |
const QString & |
path, |
|
|
const QString & |
fileName |
|
) |
| |
|
slot |
§ onMouseModeSet
Slot called when mouse mode is changed.
§ onMoveBookmark
void MainWindow::onMoveBookmark |
( |
const QModelIndex & |
index | ) |
|
|
slot |
Slot called when user changed order of bookmarks within BookmarkWidget.
§ onPhotoPushed
void MainWindow::onPhotoPushed |
( |
int |
parent, |
|
|
int |
start, |
|
|
int |
, |
|
|
int |
destination, |
|
|
int |
|
|
) |
| |
|
slot |
Slot called when push photo is performed.
§ onPhotoTransparencyMinus
void MainWindow::onPhotoTransparencyMinus |
( |
const QModelIndex & |
index | ) |
|
|
slot |
§ onPhotoTransparencyPlus
void MainWindow::onPhotoTransparencyPlus |
( |
const QModelIndex & |
index | ) |
|
|
slot |
§ onRequestBookmarkSet
void MainWindow::onRequestBookmarkSet |
( |
int |
row | ) |
|
|
slot |
Slot called when a bookmark was added to scene graph.
§ onRequestCanvasCreate
void MainWindow::onRequestCanvasCreate |
( |
const osg::Vec3f & |
eye, |
|
|
const osg::Vec3f & |
center, |
|
|
const osg::Vec3f & |
up |
|
) |
| |
|
slot |
Slot called when bookmark position is finished editing. The slot requests from user whether new canvas should be created within the FOV of the camera position.
- Parameters
-
eye | is eye position of the camera, |
center | is the center position of camera, |
up | is up vector of camera position. |
§ onRequestSceneData
Slot called so that to request a data of SceneState, e.g. when setting up a bookmark.
§ onRequestSceneStateSet
Slot called when scene state change was requested, e.g. when setting up a bookmark.
§ onRequestSceneToolStatus
void MainWindow::onRequestSceneToolStatus |
( |
bool & |
visibility | ) |
|
|
slot |
Slot called to obtain status of global tools visibilities.
§ onRequestUpdate
void MainWindow::onRequestUpdate |
( |
| ) |
|
|
slot |
Slot called whenver we need to update GLWidget, e.g., when scene graph is changed.
§ onSetTabletActivity
void MainWindow::onSetTabletActivity |
( |
bool |
active | ) |
|
|
slot |
§ onVisibilitySetCanvas
void MainWindow::onVisibilitySetCanvas |
( |
int |
index | ) |
|
|
slot |
Slot called when user requested to set canvas visibility by using controls of CanvasPhotoWidget.
§ openFile()
void MainWindow::openFile |
( |
const QString & |
fname | ) |
|
A method would normally be called when file name is provided as command line argument.
§ setCameraView()
void MainWindow::setCameraView |
( |
const osg::Vec3d & |
eye, |
|
|
const osg::Vec3d & |
center, |
|
|
const osg::Vec3d & |
up, |
|
|
const double & |
fov2 |
|
) |
| |
A method to setup camera position and parameters within GLWidget.
- Parameters
-
fov2 | is the full angle (not half angle) FOV, in degrees. |
The documentation for this class was generated from the following files: