#include <SpreadsheetView.h>
Public Member Functions | |
const char * | getName (void) const |
returns the name of the view (important for messages) More... | |
bool | onHasMsg (const char *pMsg) const |
Message handler test. More... | |
bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. More... | |
SheetView (Gui::Document *pcDocument, App::DocumentObject *docObj, QWidget *parent) | |
~SheetView () | |
Public Member Functions inherited from Gui::MDIView | |
virtual bool | canClose (void) |
overwrite when checking on close state More... | |
virtual void | deleteSelf () |
delete itself More... | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
MDIView (Gui::Document *pcDocument, QWidget *parent, Qt::WindowFlags wflags=Qt::WindowFlags()) | |
View constructor Attach the view to the given document. More... | |
virtual bool | onHasMsg (const char *pMsg) const |
Message handler test. More... | |
virtual bool | onMsg (const char *pMsg, const char **ppReturn) |
Message handler. 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 QStringList | undoActions () const |
virtual QStringList | redoActions () const |
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=nullptr, std::string *subname=nullptr) const |
access getter for the active object list More... | |
void | setActiveObject (App::DocumentObject *o, const char *n, const char *subname=nullptr) |
bool | hasActiveObject (const char *n) const |
bool | isActiveObject (App::DocumentObject *o, const char *n, const char *subname=nullptr) 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... | |
void | savePrinterSettings (QPrinter *printer) |
Save the printer configuration. More... | |
void | restorePrinterSettings (QPrinter *printer) |
Restore the printer configuration. More... | |
Public Member Functions inherited from Gui::BaseView | |
BaseView (Gui::Document *pcDocument=nullptr) | |
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::Document * | getGuiDocument () const |
returns the document the view is attached to More... | |
App::Document * | getAppDocument () 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... | |
BaseClass (const BaseClass &)=default | |
virtual PyObject * | getPyObject () |
This method returns the Python wrapper for a C++ object. More... | |
virtual Type | getTypeId () const |
bool | isDerivedFrom (const Type type) const |
BaseClass & | operator= (const BaseClass &)=default |
virtual void | setPyObject (PyObject *) |
virtual | ~BaseClass () |
Destruction. More... | |
Printing | |
Ui::Sheet * | ui |
Spreadsheet::Sheet * | sheet |
SpreadsheetDelegate * | delegate |
SheetModel * | model |
boost::signals2::scoped_connection | columnWidthChangedConnection |
boost::signals2::scoped_connection | rowHeightChangedConnection |
boost::signals2::scoped_connection | positionChangedConnection |
std::map< int, int > | newColumnSizes |
std::map< int, int > | newRowSizes |
void | print () |
Shows the printer dialog. More... | |
void | printPdf () |
Prints the document into a Pdf file. More... | |
void | printPreview () |
Show a preview dialog. More... | |
void | print (QPrinter *) |
void | updateCell (const App::Property *prop) |
Spreadsheet::Sheet * | getSheet () |
std::vector< App::Range > | selectedRanges () const |
QModelIndexList | selectedIndexes () const |
QModelIndexList | selectedIndexesRaw () const |
void | select (App::CellAddress cell, QItemSelectionModel::SelectionFlags flags) |
void | select (App::CellAddress topLeft, App::CellAddress bottomRight, QItemSelectionModel::SelectionFlags flags) |
QModelIndex | currentIndex () const |
void | setCurrentIndex (App::CellAddress cell) const |
void | deleteSelection () |
PyObject * | getPyObject (void) |
This method returns the Python wrapper for a C++ object. More... | |
virtual void | deleteSelf () |
delete itself More... | |
void | editingFinishedWithKey (int key, Qt::KeyboardModifiers modifiers) |
void | confirmAliasChanged (const QString &text) |
void | aliasChanged (const QString &text) |
void | confirmContentChanged (const QString &text) |
void | currentChanged (const QModelIndex ¤t, const QModelIndex &previous) |
void | columnResized (int col, int oldSize, int newSize) |
void | rowResized (int row, int oldSize, int newSize) |
void | columnResizeFinished () |
void | rowResizeFinished () |
void | modelUpdated (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
void | updateContentLine () |
void | updateAliasLine () |
void | setCurrentCell (QString str) |
void | resizeColumn (int col, int newSize) |
void | resizeRow (int col, int newSize) |
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 | 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 () |
static Type | getClassTypeId () |
static void | init () |
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 inherited from Gui::MDIView | |
void | closeEvent (QCloseEvent *e) |
void | changeEvent (QEvent *e) |
Static Protected Member Functions inherited from Base::BaseClass | |
static void | initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=nullptr) |
Protected Attributes inherited from Gui::MDIView | |
PyObject * | pythonObject |
Protected Attributes inherited from Gui::BaseView | |
bool | bIsDetached |
bool | bIsPassive |
SheetView::SheetView | ( | Gui::Document * | pcDocument, |
App::DocumentObject * | docObj, | ||
QWidget * | parent | ||
) |
SheetView::~SheetView | ( | ) |
References Gui::Application::detachView(), and Gui::Application::Instance.
|
protectedslot |
References Ui_Sheet::cellAlias, Spreadsheet::Sheet::isValidAlias(), sheet, Base::Tools::toStdString(), and ui.
References newColumnSizes.
|
protectedslot |
References newColumnSizes, Spreadsheet::Sheet::setColumnWidth(), and sheet.
|
protectedslot |
References Ui_Sheet::cellAlias, Ui_Sheet::cells, Gui::cmdAppDocument(), Gui::cmdAppObjectArgs(), Base::Console(), Base::ConsoleSingleton::Error(), Spreadsheet::Sheet::getCell(), App::DocumentObject::getDocument(), Spreadsheet::Sheet::isValidAlias(), Gui::ExpressionLineEdit::setDocumentObject(), sheet, Base::Tools::toStdString(), App::CellAddress::toString(), and ui.
|
protectedslot |
References Ui_Sheet::cells, and ui.
|
protectedslot |
References updateAliasLine(), and updateContentLine().
QModelIndex SheetView::currentIndex | ( | ) | const |
References Ui_Sheet::cells, and ui.
Referenced by SpreadsheetGui::SheetViewPy::currentIndex(), and updateCell().
void SheetView::deleteSelection | ( | ) |
References Ui_Sheet::cells, SpreadsheetGui::SheetTableView::deleteSelection(), and ui.
|
virtual |
|
protectedslot |
References Ui_Sheet::cells, SpreadsheetGui::SheetTableView::finishEditWithMove(), and ui.
|
virtual |
returns the name of the view (important for messages)
Reimplemented from Gui::BaseView.
|
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::pythonObject.
Spreadsheet::Sheet * SpreadsheetGui::SheetView::getSheet | ( | ) |
|
protectedslot |
References Ui_Sheet::cells, ui, updateAliasLine(), and updateContentLine().
|
virtual |
|
virtual |
Message handler.
receive a message
Reimplemented from Gui::MDIView.
References Ui_Sheet::cells, Gui::Command::commitCommand(), SpreadsheetGui::SheetTableView::copySelection(), SpreadsheetGui::SheetTableView::cutSelection(), Gui::Command::Doc, Gui::BaseView::getAppDocument(), Gui::BaseView::getGuiDocument(), Spreadsheet::Sheet::hasCell(), Gui::Command::openCommand(), SpreadsheetGui::SheetTableView::pasteClipboard(), draftutils.translate::QT_TRANSLATE_NOOP, Gui::Document::redo(), Gui::Document::save(), Gui::Document::saveAs(), selectedRanges(), sheet, ui, and Gui::Document::undo().
|
virtual |
Shows the printer dialog.
Reimplemented from Gui::MDIView.
References print().
Referenced by print(), printPdf(), and printPreview().
|
virtual |
Reimplemented from Gui::MDIView.
References Ui_Sheet::cells, SpreadsheetGui::SheetTableView::toHtml(), and ui.
|
virtual |
|
virtual |
Show a preview dialog.
Reimplemented from Gui::MDIView.
References draftgeoutils.intersections::connect(), and print().
References Ui_Sheet::cells, and ui.
References Ui_Sheet::cells, and ui.
References newRowSizes.
|
protectedslot |
References newRowSizes, Spreadsheet::Sheet::setRowHeight(), and sheet.
void SpreadsheetGui::SheetView::select | ( | App::CellAddress | cell, |
QItemSelectionModel::SelectionFlags | flags | ||
) |
References App::CellAddress::col(), and App::CellAddress::row().
Referenced by SpreadsheetGui::SheetViewPy::select().
void SpreadsheetGui::SheetView::select | ( | App::CellAddress | topLeft, |
App::CellAddress | bottomRight, | ||
QItemSelectionModel::SelectionFlags | flags | ||
) |
References App::CellAddress::col(), and App::CellAddress::row().
QModelIndexList SheetView::selectedIndexes | ( | ) | const |
References Ui_Sheet::cells, and ui.
Referenced by SpreadsheetGui::SheetViewPy::selectedCells().
QModelIndexList SheetView::selectedIndexesRaw | ( | ) | const |
References Ui_Sheet::cells, SpreadsheetGui::SheetTableView::selectedIndexesRaw(), and ui.
std::vector< Range > SheetView::selectedRanges | ( | ) | const |
|
protected |
References updateAliasLine(), and updateContentLine().
void SpreadsheetGui::SheetView::setCurrentIndex | ( | App::CellAddress | cell | ) | const |
References App::CellAddress::col(), and App::CellAddress::row().
Referenced by SpreadsheetGui::SheetViewPy::setCurrentIndex().
|
protected |
References Ui_Sheet::cellAlias, Ui_Sheet::cells, Spreadsheet::Sheet::getCell(), Gui::ExpressionLineEdit::setDocumentObject(), sheet, and ui.
Referenced by currentChanged(), modelUpdated(), setCurrentCell(), and updateCell().
void SheetView::updateCell | ( | const App::Property * | prop | ) |
|
protected |
References Ui_Sheet::cellContent, Ui_Sheet::cells, Spreadsheet::Sheet::getCell(), Gui::ExpressionLineEdit::setDocumentObject(), sheet, and ui.
Referenced by currentChanged(), modelUpdated(), setCurrentCell(), and updateCell().
|
protected |
|
protected |
|
protected |
Referenced by PathScripts.PathSetupSheetGui.OpTaskPanel::accept(), PathScripts.PathPocket.ObjectPocket::areaOpShapes(), PathScripts.PathVcarve.ObjectVcarve::buildPathMedial(), PathScripts.PathJobDlg.JobCreate::exec_(), PathScripts.PathOp.ObjectOp::execute(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::extensionsClear(), PathScripts.PathCircularHoleBase.ObjectOp::findAllHoles(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::forAllItemsCall(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::getFields(), PathScripts.PathJobDlg.JobCreate::item1ValueChanged(), PathScripts.PathEngrave.ObjectEngrave::opExecute(), PathScripts.PathVcarve.ObjectVcarve::opExecute(), PathScripts.PathDeburr.ObjectDeburr::opRejectAddBase(), PathScripts.PathPropertyBagGui.TaskPanel::propertyAdd(), PathScripts.PathPropertyBagGui.TaskPanel::propertyModifyIndex(), PathScripts.PathPropertyBagGui.TaskPanel::propertyRemove(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::registerSignalHandlers(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::restoreSelection(), PathScripts.PathOp.ObjectOp::setDefaultValues(), PathScripts.PathFeatureExtensionsGui.TaskPanelExtensionPage::setExtensions(), ArchMaterial.MultiMaterialDelegate::setModelData(), PathScripts.PathJobDlg.JobCreate::setupModel(), PathScripts.PathPropertyBagGui.TaskPanel::setupUi(), PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi(), PathScripts.PathJobDlg.JobCreate::updateData(), and PathScripts.PathSetupSheetGui.OpTaskPanel::updateData().
Referenced by columnResized(), and columnResizeFinished().
Referenced by rowResized(), and rowResizeFinished().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by draftguitools.gui_beziers.BezCurve::action(), draftguitools.gui_dimensions.Dimension::action(), draftguitools.gui_ellipses.Ellipse::action(), draftguitools.gui_labels.Label::action(), draftguitools.gui_lines.Line::action(), draftguitools.gui_mirror.Mirror::action(), draftguitools.gui_offset.Offset::action(), draftguitools.gui_rectangles.Rectangle::action(), draftguitools.gui_shapestrings.ShapeString::action(), draftguitools.gui_splines.BSpline::action(), draftguitools.gui_texts.Text::action(), draftguitools.gui_arcs.Arc::Activated(), draftguitools.gui_circulararray.CircularArray::Activated(), draftguitools.gui_clone.Clone::Activated(), draftguitools.gui_downgrade.Downgrade::Activated(), draftguitools.gui_draft2sketch.Draft2Sketch::Activated(), draftguitools.gui_ellipses.Ellipse::Activated(), draftguitools.gui_facebinders.Facebinder::Activated(), draftguitools.gui_join.Join::Activated(), draftguitools.gui_move.Move::Activated(), draftguitools.gui_orthoarray.OrthoArray::Activated(), draftguitools.gui_polararray.PolarArray::Activated(), draftguitools.gui_polygons.Polygon::Activated(), draftguitools.gui_rectangles.Rectangle::Activated(), draftguitools.gui_rotate.Rotate::Activated(), draftguitools.gui_scale.Scale::Activated(), draftguitools.gui_shape2dview.Shape2DView::Activated(), draftguitools.gui_shapestrings.ShapeString::Activated(), draftguitools.gui_split.Split::Activated(), draftguitools.gui_styles.ApplyStyle::Activated(), draftguitools.gui_texts.Text::Activated(), draftguitools.gui_upgrade.Upgrade::Activated(), draftguitools.gui_array_simple.Array::Activated(), draftguitools.gui_fillets.Fillet::Activated(), draftguitools.gui_stretch.Stretch::addPoint(), aliasChanged(), draftguitools.gui_ellipses.Ellipse::appendPoint(), draftguitools.gui_rectangles.Rectangle::appendPoint(), package_details.PackageDetails::branch_changed(), DraftGui.DraftToolBar::changeEvent(), draftguitools.gui_circulararray.CircularArray::click(), draftguitools.gui_orthoarray.OrthoArray::click(), draftguitools.gui_polararray.PolarArray::click(), confirmAliasChanged(), confirmContentChanged(), draftguitools.gui_dimensions.Dimension::createObject(), currentIndex(), deleteSelection(), package_details.PackageDetails::disable_clicked(), package_details.PackageDetails::display_repo_status(), draftguitools.gui_polygons.Polygon::drawPolygon(), editingFinishedWithKey(), package_details.PackageDetails::enable_clicked(), draftguitools.gui_edit.Edit::endEditing(), change_branch.ChangeBranchDialog::exec(), draftguitools.gui_base_original.DraftTool::finish(), draftguitools.gui_fillets.Fillet::finish(), draftguitools.gui_dimensions.Dimension::finish(), draftguitools.gui_edit.Edit::finish(), draftguitools.gui_trimex.Trimex::finish(), draftguitools.gui_arcs.Arc::finish(), draftguitools.gui_beziers.BezCurve::finish(), draftguitools.gui_beziers.CubicBezCurve::finish(), draftguitools.gui_ellipses.Ellipse::finish(), draftguitools.gui_lines.Line::finish(), draftguitools.gui_mirror.Mirror::finish(), draftguitools.gui_move.Move::finish(), draftguitools.gui_polygons.Polygon::finish(), draftguitools.gui_rectangles.Rectangle::finish(), draftguitools.gui_rotate.Rotate::finish(), draftguitools.gui_splines.BSpline::finish(), draftguitools.gui_texts.Text::finish(), draftguitools.gui_points.Point::finish(), draftguitools.gui_shapestrings.ShapeString::finish(), draftguitools.gui_move.Move::get_object_selection(), draftguitools.gui_rotate.Rotate::get_object_selection(), draftguitools.gui_scale.Scale::get_object_selection(), draftguitools.gui_subelements.SubelementHighlight::get_selection(), draftguitools.gui_base_original.DraftTool::getStrings(), draftguitools.gui_move.Move::handle_mouse_click_event(), package_details.PackageDetails::load_finished(), package_details.PackageDetails::load_progress(), package_details.PackageDetails::load_started(), package_details.PackageDetails::long_load_running(), package_details.PackageDetails::macro_readme_updated(), modelUpdated(), draftguitools.gui_circulararray.CircularArray::move(), draftguitools.gui_points.Point::move(), draftguitools.gui_polararray.PolarArray::move(), draftguitools.gui_move.Move::move(), draftguitools.gui_arcs.Arc::numericInput(), draftguitools.gui_polygons.Polygon::numericInput(), draftguitools.gui_rotate.Rotate::numericInput(), draftguitools.gui_shapestrings.ShapeString::numericInput(), draftguitools.gui_arcs.Arc::numericRadius(), draftguitools.gui_offset.Offset::numericRadius(), draftguitools.gui_rotate.Rotate::numericRadius(), onMsg(), print(), draftguitools.gui_edit.Edit::proceed(), draftguitools.gui_groups.AddToGroup::proceed(), draftguitools.gui_groups.SetAutoGroup::proceed(), resizeColumn(), resizeRow(), draftguitools.gui_rotate.Rotate::rotate(), package_details.PackageDetails::run_javascript(), selectedIndexes(), selectedIndexesRaw(), selectedRanges(), draftguitools.gui_fillets.Fillet::set_chamfer(), package_details.PackageDetails::set_change_branch_button_state(), draftguitools.gui_fillets.Fillet::set_delete(), package_details.PackageDetails::set_disable_button_state(), draftguitools.gui_move.Move::set_ghosts(), draftguitools.gui_rotate.Rotate::set_ghosts(), draftguitools.gui_rotate.Rotate::set_start_point(), package_list.PackageList::set_view_style(), package_details.PackageDetails::show_error_for(), package_details.PackageDetails::show_package(), package_details.PackageDetails::show_repo(), package_details.PackageDetails::show_workbench(), draftguitools.gui_edit.Edit::startEditing(), package_list.PackageList::update_text_filter(), updateAliasLine(), updateContentLine(), and draftguitools.gui_edit.Edit::updateTrackerAndGhost().