Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PyViewer_ViewWindow Class Reference

Python view window.

#include <PyViewer_ViewWindow.h>

Inheritance diagram for PyViewer_ViewWindow:
Inheritance graph

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_ViewManagergetViewManager () 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 &parameters)
 
void setDestructiveClose (const bool)
 
int getId () const
 
QtxActionToolMgrtoolMgr () 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 QActionsynchronizeAction ()
 

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_DesktopmyDesktop
 
SUIT_ViewManagermyManager
 

Member Enumeration Documentation

anonymous enum
Enumerator
NewId 
OpenId 
SaveId 
SaveAsId 
UndoId 
RedoId 
CutId 
CopyId 
PasteId 
DeleteId 
SelectAllId 
PreferencesId 
HelpId 

Constructor & Destructor Documentation

PyViewer_ViewWindow::~PyViewer_ViewWindow ( )

Member Function Documentation

void PyViewer_ViewWindow::closeEvent ( QCloseEvent *  event)
protectedvirtual
Parameters
eventclose event

References whetherSave().

QString PyViewer_ViewWindow::defaultName ( ) const
private

Get default name for Python file

Returns
default name
void PyViewer_ViewWindow::loadFile ( const QString &  filePath)
private
Parameters
filePathfile path

References myTextEditor, and setCurrentFile().

void PyViewer_ViewWindow::onHelp ( )
privateslot

Slot, called when user clicks "Help" button in "Preferences" dialog box.

References SUIT_Session::activeApplication(), app, SUIT_Application::onHelpContextModule(), and SUIT_Session::session().

void PyViewer_ViewWindow::onNew ( )
privateslot

SLOT: Create new document

References myTextEditor, setCurrentFile(), and whetherSave().

void PyViewer_ViewWindow::onOpen ( )
privateslot

SLOT: Open existing Python file

References SUIT_ViewWindow::filter(), loadFile(), and whetherSave().

void PyViewer_ViewWindow::onPreferences ( )
privateslot

SLOT: Open preferences dialog

References myTextEditor, and onHelp().

bool PyViewer_ViewWindow::onSave ( )
privateslot

SLOT: Save current document

References myURL, onSaveAs(), and saveFile().

bool PyViewer_ViewWindow::onSaveAs ( )
privateslot

SLOT: Save current document under a new name

References defaultName(), SUIT_ViewWindow::filter(), myURL, and saveFile().

bool PyViewer_ViewWindow::saveFile ( const QString &  filePath)
private
Parameters
theFilePathfile path

References myTextEditor, and setCurrentFile().

void PyViewer_ViewWindow::setCurrentFile ( const QString &  filePath)
private
Parameters
filePathdocument's file path

References myTextEditor, and myURL.

bool PyViewer_ViewWindow::whetherSave ( )
private
Returns
true if the document is saved.

References myTextEditor, and onSave().

Member Data Documentation

PyEditor_Editor* PyViewer_ViewWindow::myTextEditor
private
QString PyViewer_ViewWindow::myURL
private

The documentation for this class was generated from the following files: