#include <SpreadsheetView.h>

Public Member Functions

QModelIndex currentIndex () const
 
void deleteSelection ()
 
virtual void deleteSelf ()
 delete itself More...
 
const char * getName (void) const
 returns the name of the view (important for messages) More...
 
PyObjectgetPyObject (void)
 This method returns the Python wrapper for a C++ object. More...
 
Spreadsheet::SheetgetSheet ()
 
bool onHasMsg (const char *pMsg) const
 Message handler test. More...
 
bool onMsg (const char *pMsg, const char **ppReturn)
 Message handler. More...
 
QModelIndexList selectedIndexes () const
 
std::vector< App::RangeselectedRanges () const
 
 SheetView (Gui::Document *pcDocument, App::DocumentObject *docObj, QWidget *parent)
 
void updateCell (const App::Property *prop)
 
 ~SheetView ()
 
- Public Member Functions inherited from Gui::MDIView
virtual bool canClose (void)
 overwrite when checking on close state More...
 
 MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=0)
 View constructor Attach the view to the given document. More...
 
virtual void onRelabel (Gui::Document *pDoc)
 get called when the document is updated More...
 
virtual void viewAll ()
 
 ~MDIView ()
 View destructor Detach the view from the document, if attached. More...
 
virtual void print ()
 Print content of view. More...
 
virtual void printPdf ()
 Print to PDF file. More...
 
virtual void printPreview ()
 Show a preview dialog. More...
 
QSize minimumSizeHint () const
 
virtual void setCurrentViewMode (ViewMode mode)
 If b is set to FullScreen the MDI view is displayed in full screen mode, if b is set to TopLevel then it is displayed as an own top-level window, otherwise (Normal) as tabbed window. More...
 
ViewMode currentViewMode () const
 
template<typename _T >
_T getActiveObject (const char *name, App::DocumentObject **parent=0, std::string *subname=0) const
 access getter for the active object list More...
 
void setActiveObject (App::DocumentObject *o, const char *n, const char *subname=0)
 
bool hasActiveObject (const char *n) const
 
bool isActiveObject (App::DocumentObject *o, const char *n, const char *subname=0) const
 
virtual bool containsViewProvider (const ViewProvider *) const
 containsViewProvider Checks if the given view provider is part of this view. The default implementation returns false. More...
 
- Public Member Functions inherited from Gui::BaseView
 BaseView (Gui::Document *pcDocument=0)
 View constructor Attach the view to the given document. More...
 
virtual ~BaseView ()
 View destructor Detach the view from the document, if attached! More...
 
void setDocument (Gui::Document *pcDocument)
 sets the view to another document (called by Application) More...
 
void onClose (void)
 is sent from the document in order to close the document More...
 
Gui::DocumentgetGuiDocument () const
 returns the document the view is attached to More...
 
App::DocumentgetAppDocument () const
 returns the document the view is attached to More...
 
bool isPassive (void) const
 indicates if the view is in passive mode More...
 
virtual void onUpdate (void)
 get called when the document is updated More...
 
virtual void onRename (Gui::Document *)
 get called when the document is renamed (change of its internal name) More...
 
- Public Member Functions inherited from Base::BaseClass
 BaseClass ()
 Construction. More...
 
virtual Type getTypeId (void) const
 
bool isDerivedFrom (const Type type) const
 
virtual void setPyObject (PyObject *)
 
virtual ~BaseClass ()
 Destruction. More...
 

Protected Slots

void columnResized (int col, int oldSize, int newSize)
 
void columnResizeFinished ()
 
void currentChanged (const QModelIndex &current, const QModelIndex &previous)
 
void editingFinished ()
 
void modelUpdated (const QModelIndex &topLeft, const QModelIndex &bottomRight)
 
void rowResized (int row, int oldSize, int newSize)
 
void rowResizeFinished ()
 
- Protected Slots inherited from Gui::MDIView
virtual void windowStateChanged (MDIView *)
 This method gets called from the main window this view is attached to whenever the window state of the active view changes. More...
 

Protected Member Functions

void keyPressEvent (QKeyEvent *event)
 
void resizeColumn (int col, int newSize)
 
void resizeRow (int col, int newSize)
 
void setCurrentCell (QString str)
 
void updateAliasLine ()
 
void updateContentLine ()
 
- Protected Member Functions inherited from Gui::MDIView
void closeEvent (QCloseEvent *e)
 
void changeEvent (QEvent *e)
 

Protected Attributes

boost::signals2::scoped_connection columnWidthChangedConnection
 
SpreadsheetDelegatedelegate
 
SheetModelmodel
 
std::map< int, int > newColumnSizes
 
std::map< int, int > newRowSizes
 
boost::signals2::scoped_connection positionChangedConnection
 
boost::signals2::scoped_connection rowHeightChangedConnection
 
Spreadsheet::Sheetsheet
 
Ui::Sheet * ui
 
- Protected Attributes inherited from Gui::MDIView
PyObjectpythonObject
 
- Protected Attributes inherited from Gui::BaseView
bool bIsDetached
 
bool bIsPassive
 

Additional Inherited Members

- Public Types inherited from Gui::MDIView
enum  ViewMode { Child, TopLevel, FullScreen }
 MDI view mode enum. More...
 
- Public Slots inherited from Gui::MDIView
virtual void print (QPrinter *printer)
 
virtual void setOverrideCursor (const QCursor &)
 
virtual void restoreOverrideCursor ()
 
- Signals inherited from Gui::MDIView
void message (const QString &, int)
 
- Static Public Member Functions inherited from Base::BaseClass
static void * create (void)
 
static Type getClassTypeId (void)
 
static void init (void)
 
- Static Protected Member Functions inherited from Base::BaseClass
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr)
 

Constructor & Destructor Documentation

◆ SheetView()

SheetView::SheetView ( Gui::Document pcDocument,
App::DocumentObject docObj,
QWidget parent 
)

◆ ~SheetView()

SheetView::~SheetView ( )

Member Function Documentation

◆ columnResized

void SheetView::columnResized ( int  col,
int  oldSize,
int  newSize 
)
protectedslot

◆ columnResizeFinished

void SheetView::columnResizeFinished ( )
protectedslot

◆ currentChanged

void SheetView::currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
protectedslot

◆ currentIndex()

QModelIndex SheetView::currentIndex ( ) const

◆ deleteSelection()

void SheetView::deleteSelection ( )

◆ deleteSelf()

void SheetView::deleteSelf ( )
virtual

delete itself

Reimplemented from Gui::MDIView.

References Gui::MDIView::deleteSelf().

◆ editingFinished

◆ getName()

const char* SpreadsheetGui::SheetView::getName ( void  ) const
virtual

returns the name of the view (important for messages)

Reimplemented from Gui::BaseView.

◆ getPyObject()

PyObject * SheetView::getPyObject ( void  )
virtual

This method returns the Python wrapper for a C++ object.

It's in the responsibility of the programmer to do the correct reference counting. Basically there are two ways how to implement that: Either always return a new Python object then reference counting is not a matter or return always the same Python object then the reference counter must be incremented by one. However, it's absolutely forbidden to return always the same Python object without incrementing the reference counter.

The default implementation returns 'None'.

Reimplemented from Gui::MDIView.

References Gui::MDIView::getPyObject().

◆ getSheet()

◆ keyPressEvent()

void SheetView::keyPressEvent ( QKeyEvent *  event)
protected

◆ modelUpdated

void SheetView::modelUpdated ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
protectedslot

◆ onHasMsg()

bool SheetView::onHasMsg ( const char *  pMsg) const
virtual

Message handler test.

Reimplemented from Gui::MDIView.

◆ onMsg()

bool SheetView::onMsg ( const char *  pMsg,
const char **  ppReturn 
)
virtual

Message handler.

receive a message

Reimplemented from Gui::MDIView.

References Gui::Command::commitCommand(), Gui::Command::Doc, and Gui::Command::openCommand().

◆ resizeColumn()

void SheetView::resizeColumn ( int  col,
int  newSize 
)
protected

Referenced by SheetView().

◆ resizeRow()

void SheetView::resizeRow ( int  col,
int  newSize 
)
protected

Referenced by SheetView().

◆ rowResized

void SheetView::rowResized ( int  row,
int  oldSize,
int  newSize 
)
protectedslot

◆ rowResizeFinished

void SheetView::rowResizeFinished ( )
protectedslot

◆ selectedIndexes()

QModelIndexList SheetView::selectedIndexes ( ) const

◆ selectedRanges()

std::vector< Range > SheetView::selectedRanges ( ) const

◆ setCurrentCell()

void SheetView::setCurrentCell ( QString  str)
protected

◆ updateAliasLine()

void SheetView::updateAliasLine ( )
protected

◆ updateCell()

void SheetView::updateCell ( const App::Property prop)

◆ updateContentLine()

void SheetView::updateContentLine ( )
protected

Member Data Documentation

◆ columnWidthChangedConnection

boost::signals2::scoped_connection SpreadsheetGui::SheetView::columnWidthChangedConnection
protected

◆ delegate

SpreadsheetDelegate* SpreadsheetGui::SheetView::delegate
protected

◆ model

SheetModel* SpreadsheetGui::SheetView::model
protected

◆ newColumnSizes

std::map<int, int> SpreadsheetGui::SheetView::newColumnSizes
protected

◆ newRowSizes

std::map<int, int> SpreadsheetGui::SheetView::newRowSizes
protected

◆ positionChangedConnection

boost::signals2::scoped_connection SpreadsheetGui::SheetView::positionChangedConnection
protected

◆ rowHeightChangedConnection

boost::signals2::scoped_connection SpreadsheetGui::SheetView::rowHeightChangedConnection
protected

◆ sheet

Spreadsheet::Sheet* SpreadsheetGui::SheetView::sheet
protected

◆ ui

Ui::Sheet* SpreadsheetGui::SheetView::ui
protected

The documentation for this class was generated from the following files:
  • src/Mod/Spreadsheet/Gui/SpreadsheetView.h
  • src/Mod/Spreadsheet/Gui/SpreadsheetView.cpp