Python view window.
#include <PyViewer_ViewWindow.h>
Public Types | |
enum | { NewId, OpenId, SaveId, SaveAsId, UndoId, RedoId, CutId, CopyId, PasteId, DeleteId, SelectAllId, PreferencesId, HelpId } |
Public Member Functions | |
PyViewer_ViewWindow (SUIT_Desktop *=0) | |
Constructor. More... | |
~PyViewer_ViewWindow () | |
Destructor. More... | |
Public Member Functions inherited from SUIT_ViewWindow | |
SUIT_ViewWindow (SUIT_Desktop *) | |
virtual | ~SUIT_ViewWindow () |
virtual void | setViewManager (SUIT_ViewManager *) |
SUIT_ViewManager * | getViewManager () const |
bool | event (QEvent *) |
virtual QImage | dumpView () |
bool | dumpViewToFormat (const QString &fileName, const QString &format) |
bool | onAccelAction (int) |
bool | closable () const |
bool | setClosable (const bool) |
virtual QString | getVisualParameters () |
virtual void | setVisualParameters (const QString ¶meters) |
void | setDestructiveClose (const bool) |
int | getId () const |
QtxActionToolMgr * | toolMgr () const |
virtual void | setDropDownButtons (bool) |
Set buttons mode to drop-down (on = true ) or ligned (on = false ) More... | |
bool | dropDownButtons () const |
Get current buttons mode. More... | |
virtual SUIT_CameraProperties | cameraProperties () |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *) |
Manage window close request. More... | |
Protected Member Functions inherited from SUIT_ViewWindow | |
void | closeEvent (QCloseEvent *) |
virtual void | contextMenuEvent (QContextMenuEvent *) |
virtual QString | filter () const |
virtual bool | action (const int) |
virtual bool | dumpViewToFormat (const QImage &, const QString &fileName, const QString &format) |
virtual QAction * | synchronizeAction () |
Private Slots | |
void | onNew () |
void | onOpen () |
bool | onSave () |
bool | onSaveAs () |
void | onPreferences () |
void | onHelp () |
Private Member Functions | |
void | loadFile (const QString &) |
Open file. More... | |
bool | saveFile (const QString &) |
Saves file. More... | |
void | setCurrentFile (const QString &) |
Associate filePath with the current document. More... | |
bool | whetherSave () |
Check whether the file is modified. If it has the modifications then ask the user to save it. More... | |
QString | defaultName () const |
Private Attributes | |
PyEditor_Editor * | myTextEditor |
QString | myURL |
Additional Inherited Members | |
Public Slots inherited from SUIT_ViewWindow | |
virtual void | onDumpView () |
Signals inherited from SUIT_ViewWindow | |
void | tryClosing (SUIT_ViewWindow *) |
void | closing (SUIT_ViewWindow *) |
void | mousePressed (SUIT_ViewWindow *, QMouseEvent *) |
void | mouseReleased (SUIT_ViewWindow *, QMouseEvent *) |
void | mouseDoubleClicked (SUIT_ViewWindow *, QMouseEvent *) |
void | mouseMoving (SUIT_ViewWindow *, QMouseEvent *) |
void | wheeling (SUIT_ViewWindow *, QWheelEvent *) |
void | keyPressed (SUIT_ViewWindow *, QKeyEvent *) |
void | keyReleased (SUIT_ViewWindow *, QKeyEvent *) |
void | contextMenuRequested (QContextMenuEvent *e) |
void | viewModified (SUIT_ViewWindow *) |
Protected Slots inherited from SUIT_ViewWindow | |
void | updateSyncViews () |
void | onSynchronizeView (bool) |
virtual void | synchronize (SUIT_ViewWindow *) |
void | emitViewModified () |
Static Protected Member Functions inherited from SUIT_ViewWindow | |
static void | synchronizeView (SUIT_ViewWindow *viewWindow, int id) |
Protected Attributes inherited from SUIT_ViewWindow | |
SUIT_Desktop * | myDesktop |
SUIT_ViewManager * | myManager |
anonymous enum |
PyViewer_ViewWindow::PyViewer_ViewWindow | ( | SUIT_Desktop * | desktop = 0 | ) |
desktop | SALOME desktop window |
References SUIT_ViewWindow::action(), QtxActionToolMgr::append(), CopyId, QtxActionToolMgr::createToolBar(), CutId, DeleteId, HelpId, QtxResourceMgr::loadPixmap(), myTextEditor, NewId, onHelp(), onNew(), onOpen(), onPreferences(), onSave(), onSaveAs(), OpenId, PasteId, PreferencesId, RedoId, QtxActionMgr::registerAction(), SUIT_Session::resourceMgr(), SaveAsId, SaveId, SelectAllId, SUIT_Session::session(), setCurrentFile(), SUIT_ViewWindow::toolMgr(), and UndoId.
PyViewer_ViewWindow::~PyViewer_ViewWindow | ( | ) |
|
protectedvirtual |
event | close event |
References whetherSave().
|
private |
Get default name for Python file
|
private |
filePath | file path |
References myTextEditor, and setCurrentFile().
|
privateslot |
Slot, called when user clicks "Help" button in "Preferences" dialog box.
References SUIT_Session::activeApplication(), app, SUIT_Application::onHelpContextModule(), and SUIT_Session::session().
|
privateslot |
SLOT: Create new document
References myTextEditor, setCurrentFile(), and whetherSave().
|
privateslot |
SLOT: Open existing Python file
References SUIT_ViewWindow::filter(), loadFile(), and whetherSave().
|
privateslot |
SLOT: Open preferences dialog
References myTextEditor, and onHelp().
|
privateslot |
SLOT: Save current document
References myURL, onSaveAs(), and saveFile().
|
privateslot |
SLOT: Save current document under a new name
References defaultName(), SUIT_ViewWindow::filter(), myURL, and saveFile().
|
private |
theFilePath | file path |
References myTextEditor, and setCurrentFile().
|
private |
filePath | document's file path |
References myTextEditor, and myURL.
|
private |
References myTextEditor, and onSave().
|
private |
|
private |