kspread
KSpread::View Class Reference
#include <kspread_view.h>
Inherits KoView.
Detailed Description
The View class displays a KSpread document.View is used to display a spreadsheet document and provide the interface for the user to perform editing and data analysis.
A view consists of several parts:
- canvas to display cells in a sheet
- line editor to display and edit cell contents
- location editor to show marker and/or selection
- column header to show columns
- row header to show rows
- horizontal and vertical scrollbars for navigation
- tab bar to select active worksheet
Definition at line 186 of file kspread_view.h.
Public Slots | |
void | refreshView () |
void | initialPosition () |
void | createTemplate () |
void | transformPart () |
void | copySelection () |
void | cutSelection () |
void | deleteSelection () |
void | clearTextSelection () |
void | clearCommentSelection () |
void | clearValiditySelection () |
void | clearConditionalSelection () |
void | fillRight () |
void | fillLeft () |
void | fillUp () |
void | fillDown () |
void | recalcWorkBook () |
void | recalcWorkSheet () |
void | paste () |
void | specialPaste () |
void | editCell () |
void | setAreaName () |
void | showAreaName () |
void | adjust () |
void | defaultSelection () |
void | paperLayoutDlg () |
void | styleDialog () |
void | definePrintRange () |
void | resetPrintRange () |
void | insertObject () |
void | insertFromDatabase () |
void | insertFromTextfile () |
void | insertFromClipboard () |
void | insertSpecialChar () |
void | togglePageBorders (bool) |
void | toggleProtectSheet (bool) |
void | toggleProtectDoc (bool) |
void | viewZoom (const QString &) |
void | find () |
void | findNext () |
void | findPrevious () |
void | replace () |
void | conditional () |
void | validity () |
void | insertSeries () |
void | sort () |
void | insertHyperlink () |
void | removeHyperlink () |
void | goalSeek () |
void | multipleOperations () |
void | subtotals () |
void | textToColumns () |
void | consolidate () |
void | insertSheet () |
void | removeSheet () |
void | hideSheet () |
void | showSheet () |
void | helpUsing () |
void | insertChart () |
void | insertPicture () |
void | moneyFormat (bool b) |
void | alignLeft (bool b) |
void | alignRight (bool b) |
void | alignCenter (bool b) |
void | alignTop (bool b) |
void | alignMiddle (bool b) |
void | alignBottom (bool b) |
void | wrapText (bool b) |
void | precisionMinus () |
void | precisionPlus () |
void | createStyleFromCell () |
void | styleSelected (const QString &) |
void | setSelectionPrecision (int delta) |
void | percent (bool b) |
void | fontSelected (const QString &_font) |
void | fontSizeSelected (int size) |
void | bold (bool b) |
void | italic (bool b) |
void | underline (bool b) |
void | strikeOut (bool b) |
void | deleteColumn () |
void | insertColumn () |
void | deleteRow () |
void | insertRow () |
void | hideRow () |
void | showRow () |
void | showSelRows () |
void | hideColumn () |
void | showColumn () |
void | showSelColumns () |
void | insertMathExpr () |
void | formulaSelection (const QString &_math) |
void | changeTextColor () |
void | changeBackgroundColor () |
void | sortInc () |
void | sortDec () |
void | layoutDlg () |
void | extraProperties () |
void | borderBottom () |
void | borderRight () |
void | borderLeft () |
void | borderTop () |
void | borderOutline () |
void | borderAll () |
void | borderRemove () |
void | changeBorderColor () |
void | sheetFormat () |
void | autoSum () |
void | resizeRow () |
void | resizeColumn () |
void | increaseFontSize () |
void | decreaseFontSize () |
void | setSelectionFontSize (int size) |
void | setSelectionTextColor (const QColor &txtColor) |
void | setSelectionBackgroundColor (const QColor &bgColor) |
void | setSelectionBorderColor (const QColor &bdColor) |
void | setSelectionLeftBorderColor (const QColor &color) |
void | setSelectionRightBorderColor (const QColor &color) |
void | setSelectionTopBorderColor (const QColor &color) |
void | setSelectionBottomBorderColor (const QColor &color) |
void | setSelectionAllBorderColor (const QColor &color) |
void | setSelectionOutlineBorderColor (const QColor &color) |
void | upper () |
void | lower () |
void | equalizeColumn () |
void | equalizeRow () |
void | preference () |
void | firstLetterUpper () |
void | verticalText (bool) |
void | addModifyComment () |
void | setSelectionComment (QString comment) |
void | removeComment () |
void | changeAngle () |
void | setSelectionAngle (int angle) |
void | mergeCell () |
void | mergeCellHorizontal () |
void | mergeCellVertical () |
void | dissociateCell () |
void | gotoCell () |
void | increaseIndent () |
void | decreaseIndent () |
void | copyAsText () |
void | moveSheet (unsigned sheet, unsigned target) |
void | sheetProperties () |
void | changeSheet (const QString &_name) |
void | nextSheet () |
void | previousSheet () |
void | firstSheet () |
void | lastSheet () |
void | sortList () |
void | statusBarClicked (int _id) |
void | menuCalc (bool) |
void | showStatusBar (bool b) |
void | showTabBar (bool b) |
void | showFormulaBar (bool b) |
void | popupTabBarMenu (const QPoint &) |
void | handleDamages (const QValueList< Damage * > &damages) |
void | runInternalTests () |
void | runInspector () |
void | initialiseMarkerFromSheet (Sheet *_sheet, const QPoint &point) |
void | calcStatusBarOp () |
void | slotRefreshView () |
void | slotUpdateView (Sheet *_sheet) |
void | slotUpdateView (Sheet *_sheet, const Region &) |
void | slotUpdateView (EmbeddedObject *obj) |
void | slotUpdateHBorder (Sheet *_sheet) |
void | slotUpdateVBorder (Sheet *_sheet) |
void | slotChangeSelection (const Region &) |
void | slotChangeChoice (const Region &) |
void | slotScrollChoice (const Region &) |
void | slotAddSheet (Sheet *_sheet) |
void | slotUpdateChildGeometry (EmbeddedKOfficeObject *_child) |
void | slotSheetRenamed (Sheet *sheet, const QString &old_name) |
void | slotSheetHidden (Sheet *_sheet) |
void | slotSheetShown (Sheet *_sheet) |
void | slotSheetRemoved (Sheet *_sheet) |
void | refreshLocale () |
void | extraSpelling () |
void | spellCheckerReady () |
void | spellCheckerMisspelling (const QString &, const QStringList &, unsigned int) |
void | spellCheckerCorrected (const QString &, const QString &, unsigned int) |
void | spellCheckerDone (const QString &) |
void | spellCheckerFinished () |
void | spellCheckerIgnoreAll (const QString &word) |
void | spellCheckerReplaceAll (const QString &, const QString &) |
void | startKSpell () |
void | commandExecuted () |
virtual int | leftBorder () const |
virtual int | rightBorder () const |
virtual int | topBorder () const |
virtual int | bottomBorder () const |
Public Member Functions | |
View (QWidget *_parent, const char *_name, Doc *doc) | |
~View () | |
Doc * | doc () const |
Canvas * | canvasWidget () const |
HBorder * | hBorderWidget () const |
VBorder * | vBorderWidget () const |
QScrollBar * | horzScrollBar () const |
QScrollBar * | vertScrollBar () const |
KSpread::EditWidget * | editWidget () const |
ComboboxLocationEditWidget * | posWidget () const |
KoTabBar * | tabBar () const |
void | setZoom (int zoom, bool updateViews) |
void | addSheet (Sheet *_t) |
void | removeAllSheets () |
void | setActiveSheet (Sheet *_t, bool updatesheet=true) |
const Sheet * | activeSheet () const |
Sheet * | activeSheet () |
void | openPopupMenu (const QPoint &_global) |
void | popupRowMenu (const QPoint &_point) |
void | popupColumnMenu (const QPoint &_point) |
void | setText (const QString &_text, bool array=false) |
void | enableUndo (bool _b) |
void | enableRedo (bool _b) |
void | enableInsertColumn (bool _b) |
void | enableInsertRow (bool _b) |
void | insertChart (const QRect &_geometry, KoDocumentEntry &_entry) |
void | insertChild (const QRect &_geometry, KoDocumentEntry &_entry) |
virtual void | print (KPrinter &printer) |
virtual void | setupPrinter (KPrinter &printer) |
void | updateEditWidget () |
void | updateEditWidgetOnPress () |
void | deleteEditor (bool saveChanges=true) |
void | closeEditor () |
virtual DCOPObject * | dcopObject () |
virtual QWidget * | canvas () const |
virtual int | canvasXOffset () const |
virtual int | canvasYOffset () const |
KoDocument * | hitTest (const QPoint &pos) |
void | initConfig () |
void | initCalcMenu () |
void | changeNbOfRecentFiles (int _nb) |
void | updateBorderButton () |
void | removeSheet (Sheet *_t) |
void | insertSheet (Sheet *sheet) |
QColor | borderColor () const |
Selection * | selectionInfo () const |
Selection * | choice () const |
void | updateShowSheetMenu () |
void | markSelectionAsDirty () |
void | paintUpdates () |
void | resetInsertHandle () |
bool | isInsertingObject () |
bool | showSheet (const QString &sheetName) |
QPoint | markerFromSheet (Sheet *sheet) const |
KoPoint | offsetFromSheet (Sheet *sheet) const |
void | saveCurrentSheetSelection () |
void | deleteSelectedObjects () |
Static Public Member Functions | |
static QColor | highlightColor () |
Protected Slots | |
void | slotActivateTool (int _id) |
void | slotInsert () |
void | slotInsertCellCopy () |
void | slotRemove () |
void | slotRename () |
void | popupChildMenu (KoChild *, const QPoint &global_pos) |
void | slotPopupDeleteChild () |
void | slotPopupAdjustColumn () |
void | slotPopupAdjustRow () |
void | slotItemSelected (int) |
void | slotListChoosePopupMenu () |
void | slotHighlight (const QString &text, int matchingIndex, int matchedLength) |
void | slotReplace (const QString &newText, int, int, int) |
void | slotSpecialChar (QChar c, const QString &_font) |
void | slotSpecialCharDlgClosed () |
void | propertiesOk () |
void | objectSelectedChanged () |
void | slotChildSelected (KoDocumentChild *ch) |
void | slotChildUnselected (KoDocumentChild *) |
Protected Member Functions | |
virtual void | keyPressEvent (QKeyEvent *_ev) |
virtual void | resizeEvent (QResizeEvent *_ev) |
virtual QWMatrix | matrix () const |
KoPoint | markerDocumentPosition () |
void | activateFormulaEditor () |
virtual void | updateReadWrite (bool readwrite) |
virtual void | guiActivateEvent (KParts::GUIActivateEvent *ev) |
void | initFindReplace () |
Cell * | findNextCell () |
Friends | |
class | Canvas |
class | Private |
Constructor & Destructor Documentation
KSpread::View::View | ( | QWidget * | _parent, | |
const char * | _name, | |||
Doc * | doc | |||
) |
KSpread::View::~View | ( | ) |
Member Function Documentation
Canvas * KSpread::View::canvasWidget | ( | ) | const |
HBorder * KSpread::View::hBorderWidget | ( | ) | const |
VBorder * KSpread::View::vBorderWidget | ( | ) | const |
QScrollBar * KSpread::View::horzScrollBar | ( | ) | const |
QScrollBar * KSpread::View::vertScrollBar | ( | ) | const |
EditWidget * KSpread::View::editWidget | ( | ) | const |
ComboboxLocationEditWidget * KSpread::View::posWidget | ( | ) | const |
KoTabBar * KSpread::View::tabBar | ( | ) | const |
void KSpread::View::setText | ( | const QString & | _text, | |
bool | array = false | |||
) |
Used by EditWidget.
Sets the text of the active cell(s).
Definition at line 6877 of file kspread_view.cc.
void KSpread::View::insertChart | ( | const QRect & | _geometry, | |
KoDocumentEntry & | _entry | |||
) |
- Parameters:
-
_geometry is the zoomed geometry of the new child. _entry is the entry to insert.
- Todo:
- check validity of
_entry
docs.
Definition at line 5054 of file kspread_view.cc.
void KSpread::View::insertChild | ( | const QRect & | _geometry, | |
KoDocumentEntry & | _entry | |||
) |
- Parameters:
-
_geometry is the geometry of the new child. _entry is the entry to insert.
- Todo:
- check validity of
_entry
docs.
Definition at line 5076 of file kspread_view.cc.
void KSpread::View::updateEditWidget | ( | ) |
Fills the EditWidget with the current cells content.
This function is usually called after the cursor moved.
Definition at line 2753 of file kspread_view.cc.
void KSpread::View::updateEditWidgetOnPress | ( | ) |
Same as updateEditEidget() but no update of menus and toolbars.
Definition at line 2728 of file kspread_view.cc.
void KSpread::View::deleteEditor | ( | bool | saveChanges = true |
) |
Called before saving, to finish the current edition (if any).
Definition at line 7266 of file kspread_view.cc.
KoDocument * KSpread::View::hitTest | ( | const QPoint & | pos | ) |
void KSpread::View::markSelectionAsDirty | ( | ) |
Mark all selected cells / regions of cells as 'dirty' (ie.
requiring a repaint) They will be repainted on the next call to paintUpdates()
Definition at line 7423 of file kspread_view.cc.
void KSpread::View::paintUpdates | ( | ) |
Repaint any cell with the paintDirty flag that is visible in this view.
Definition at line 7431 of file kspread_view.cc.
void KSpread::View::resetInsertHandle | ( | ) |
Resets the internal handle pointer, called from InsertHandler destructor.
Definition at line 2077 of file kspread_view.cc.
QPoint KSpread::View::markerFromSheet | ( | Sheet * | sheet | ) | const |
KoPoint KSpread::View::offsetFromSheet | ( | Sheet * | sheet | ) | const |
void KSpread::View::saveCurrentSheetSelection | ( | ) |
Save current sheet selection.
Call when we change sheet, or before save in OpenDocument format.
Definition at line 7464 of file kspread_view.cc.
QColor KSpread::View::highlightColor | ( | ) | [static] |
Returns the default color for highlighting cells and column / row headers.
Definition at line 7538 of file kspread_view.cc.
void KSpread::View::refreshView | ( | ) | [slot] |
void KSpread::View::createTemplate | ( | ) | [slot] |
void KSpread::View::mergeCell | ( | ) | [slot] |
Merges selected cells into one cell.
This will not work if only one cell is selected. An entire row or column can't be merged as well.
- See also:
- dissociateCell
Definition at line 4294 of file kspread_view.cc.
void KSpread::View::dissociateCell | ( | ) | [slot] |
Breaks merged cell.
Obviously this can be done only on merged cells.
- See also:
- mergeCell
Definition at line 4318 of file kspread_view.cc.
void KSpread::View::sheetProperties | ( | ) | [slot] |
void KSpread::View::changeSheet | ( | const QString & | _name | ) | [slot] |
Switch the active sheet to the name.
This slot is connected to the tab bar and activated when the user selects a new sheet in the tab bar.
Definition at line 3896 of file kspread_view.cc.
void KSpread::View::nextSheet | ( | ) | [slot] |
Switch the active sheet to the next visible sheet.
Does nothing if the current active sheet is the last visible sheet in the workbook.
Definition at line 5385 of file kspread_view.cc.
void KSpread::View::previousSheet | ( | ) | [slot] |
Switch the active sheet to the previous visible sheet.
Does nothing if the current active sheet is the first visible sheet in the workbook.
Definition at line 5399 of file kspread_view.cc.
void KSpread::View::firstSheet | ( | ) | [slot] |
Switch the active sheet to the first visible sheet in the workbook.
Does nothing if the current active sheet is already the first one.
Definition at line 5413 of file kspread_view.cc.
void KSpread::View::lastSheet | ( | ) | [slot] |
Switch the active sheet to the last visible sheet in the workbook.
Does nothing if the current active sheet is already the last one.
Definition at line 5427 of file kspread_view.cc.
void KSpread::View::showStatusBar | ( | bool | b | ) | [slot] |
Shows the status bar if b is true, otherwise the status bar will be hidden.
Definition at line 5306 of file kspread_view.cc.
void KSpread::View::showTabBar | ( | bool | b | ) | [slot] |
Shows the tab bar if b is true, otherwise the tab bar will be hidden.
Definition at line 5312 of file kspread_view.cc.
void KSpread::View::showFormulaBar | ( | bool | b | ) | [slot] |
Shows the formula bar if b is true, otherwise the formula bar will be hidden.
Definition at line 5318 of file kspread_view.cc.
void KSpread::View::popupTabBarMenu | ( | const QPoint & | _point | ) | [slot] |
void KSpread::View::calcStatusBarOp | ( | ) | [slot] |
write in statusBar result of calc (Min, or Max, average, sum, count)
Definition at line 7078 of file kspread_view.cc.
void KSpread::View::slotActivateTool | ( | int | _id | ) | [protected, slot] |
void KSpread::View::popupChildMenu | ( | KoChild * | child, | |
const QPoint & | global_pos | |||
) | [protected, slot] |
Invoked if the popup menu for an embedded document should be opened.
Definition at line 5596 of file kspread_view.cc.
void KSpread::View::slotPopupDeleteChild | ( | ) | [protected, slot] |
Invoked when the "Delete Embedded Document" option from an embedded document's popup menu is selected.
Definition at line 5613 of file kspread_view.cc.
void KSpread::View::slotPopupAdjustColumn | ( | ) | [protected, slot] |
void KSpread::View::slotItemSelected | ( | int | id | ) | [protected, slot] |
void KSpread::View::slotHighlight | ( | const QString & | text, | |
int | matchingIndex, | |||
int | matchedLength | |||
) | [protected, slot] |
Called by find/replace (findNext) when it found a match.
Definition at line 4736 of file kspread_view.cc.
void KSpread::View::slotReplace | ( | const QString & | newText, | |
int | , | |||
int | , | |||
int | ||||
) | [protected, slot] |
void KSpread::View::commandExecuted | ( | ) | [slot] |
Updates the view and the action.
This is typically connected to KoCommandHistory::commandExecuted() signal.
Definition at line 7439 of file kspread_view.cc.
KoPoint KSpread::View::markerDocumentPosition | ( | ) | [protected] |
Returns the position of the top-left point of the currently selected cell in document coordinates.
This is used when inserting some types of objects or pasting images into the document (so that the newly pasted object's top-left point will be aligned with the top-left point of the currently selected cell)
Definition at line 5090 of file kspread_view.cc.
void KSpread::View::activateFormulaEditor | ( | ) | [protected] |
Activates the formula editor for the current cell.
This function is usually called if the user presses a button in the formula toolbar.
Definition at line 2803 of file kspread_view.cc.
The documentation for this class was generated from the following files: