kspread Library API Documentation

KSpreadView Class Reference

The KSpreadView class displays a KSpread document. More...

#include <kspread_view.h>

List of all members.

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 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 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 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 showCommentIndicator (bool b)
void popupTabBarMenu (const QPoint &)
void handleDamages (const QValueList< KSpread::Damage * > &damages)
void runInternalTests ()
void runInspector ()
void slotRefreshView ()
void slotUpdateView (KSpreadSheet *_sheet)
void slotUpdateView (KSpreadSheet *_sheet, const QRect &)
void slotUpdateHBorder (KSpreadSheet *_sheet)
void slotUpdateVBorder (KSpreadSheet *_sheet)
void slotChangeSelection (KSpreadSheet *_sheet, const QRect &oldSelection, const QPoint &_oldMarker)
void slotAddSheet (KSpreadSheet *_sheet)
void slotRemoveChild (KSpreadChild *_child)
void slotUpdateChildGeometry (KSpreadChild *_child)
void slotSheetRenamed (KSpreadSheet *sheet, const QString &old_name)
void slotSheetHidden (KSpreadSheet *_sheet)
void slotSheetShown (KSpreadSheet *_sheet)
void slotSheetRemoved (KSpreadSheet *_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

Signals

void sig_selectionChanged (KSpreadSheet *_sheet, const QRect &_selection)
void sig_chooseSelectionChanged (KSpreadSheet *sheet, const QRect &_selection)

Public Member Functions

 KSpreadView (QWidget *_parent, const char *_name, KSpreadDoc *doc)
 ~KSpreadView ()
KSpreadDocdoc ()
KSpreadCanvascanvasWidget () const
KSpreadHBorder * hBorderWidget () const
KSpreadVBorder * vBorderWidget () const
QScrollBarhorzScrollBar () const
QScrollBarvertScrollBar () const
KSpreadEditWidgeteditWidget () const
KSpreadComboboxLocationEditWidget * posWidget () const
KoTabBar * tabBar () const
void setZoom (int zoom, bool updateViews)
void addSheet (KSpreadSheet *_t)
void removeAllSheets ()
void setActiveSheet (KSpreadSheet *_t, bool updatesheet=true)
const KSpreadSheet * activeSheet () const
KSpreadSheet * activeSheet ()
void openPopupMenu (const QPoint &_global)
void popupRowMenu (const QPoint &_point)
void popupColumnMenu (const QPoint &_point)
void setText (const QString &_text)
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 QWidgetcanvas ()
virtual int canvasXOffset () const
virtual int canvasYOffset () const
KoDocument * hitTest (const QPoint &pos)
void initConfig ()
bool isLoading () const
void resultOfCalc ()
void initCalcMenu ()
void changeNbOfRecentFiles (int _nb)
void updateBorderButton ()
void removeSheet (KSpreadSheet *_t)
void insertSheet (KSpreadSheet *sheet)
QColor borderColor () const
KSpreadSelection * selectionInfo () const
QRect selection (bool extend=true) const
QPoint marker () const
void updateShowSheetMenu ()
void paintUpdates ()
void resetInsertHandle ()
bool showSheet (const QString &sheetName)
QPoint markerFromSheet (KSpreadSheet *_sheet) const
void saveCurrentSheetSelection ()

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 slotChildSelected (KoDocumentChild *ch)
void slotChildUnselected (KoDocumentChild *)

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *_ev)
virtual void resizeEvent (QResizeEvent *_ev)
virtual QWMatrix matrix () const
void activateFormulaEditor ()
virtual void updateReadWrite (bool readwrite)
virtual void guiActivateEvent (KParts::GUIActivateEvent *ev)
void initFindReplace ()
KSpreadCellfindNextCell ()

Friends

class KSpreadCanvas


Detailed Description

The KSpreadView class displays a KSpread document.

KSpreadView 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:

Definition at line 79 of file kspread_view.h.


Constructor & Destructor Documentation

KSpreadView::KSpreadView QWidget _parent,
const char *  _name,
KSpreadDoc doc
 

Creates a new view.

Definition at line 1358 of file kspread_view.cc.

References commandExecuted(), and popupChildMenu().

KSpreadView::~KSpreadView  ) 
 

Destroys the view.

Definition at line 1471 of file kspread_view.cc.

References deleteEditor().


Member Function Documentation

KSpreadCanvas * KSpreadView::canvasWidget  )  const
 

Returns the canvas of the view.

Definition at line 1622 of file kspread_view.cc.

Referenced by KSpreadCell::paintCell(), KSpreadDoc::paintCellRegions(), slotHighlight(), and slotPopupAdjustColumn().

KSpreadHBorder * KSpreadView::hBorderWidget  )  const
 

Returns the column header.

Definition at line 1627 of file kspread_view.cc.

KSpreadVBorder * KSpreadView::vBorderWidget  )  const
 

Returns the row header.

Definition at line 1632 of file kspread_view.cc.

QScrollBar * KSpreadView::horzScrollBar  )  const
 

Returns the horizontal scrollbar.

Definition at line 1637 of file kspread_view.cc.

QScrollBar * KSpreadView::vertScrollBar  )  const
 

Returns the vertical scrollbar.

Definition at line 1642 of file kspread_view.cc.

KSpreadEditWidget * KSpreadView::editWidget  )  const
 

Returns the editor widget.

Definition at line 1647 of file kspread_view.cc.

Referenced by refreshView(), slotActivateTool(), slotItemSelected(), updateEditWidget(), and updateEditWidgetOnPress().

KSpreadComboboxLocationEditWidget * KSpreadView::posWidget  )  const
 

Returns the location widget.

Definition at line 1652 of file kspread_view.cc.

KoTabBar * KSpreadView::tabBar  )  const
 

Returns the tab bar.

Definition at line 1657 of file kspread_view.cc.

void KSpreadView::setText const QString _text  ) 
 

Used by KSpreadEditWidget.

Sets the text of the active cell.

Definition at line 5977 of file kspread_view.cc.

References KSpreadCell::isFormula(), and KSpreadCell::value().

void KSpreadView::insertChart const QRect _geometry,
KoDocumentEntry &  _entry
 

Called by KSpreadInsertHandler.

Parameters:
_geometry is the zoomed geometry of the new child.

Definition at line 4319 of file kspread_view.cc.

References insertChart().

Referenced by insertChart().

void KSpreadView::insertChild const QRect _geometry,
KoDocumentEntry &  _entry
 

Called by KSpreadInsertHandler.

Parameters:
_geometry is the geometry of the new child.

Definition at line 4350 of file kspread_view.cc.

void KSpreadView::updateEditWidget  ) 
 

Fills the KSpreadEditWidget with the current cells content.

This function is usually called after the cursor moved.

Definition at line 2328 of file kspread_view.cc.

References editWidget(), KSpreadCell::strOutText(), and KSpreadCell::text().

Referenced by changeSheet(), and commandExecuted().

void KSpreadView::updateEditWidgetOnPress  ) 
 

Same as updateEditEidget() but no update of menus and toolbars.

Definition at line 2306 of file kspread_view.cc.

References editWidget(), KSpreadCell::strOutText(), and KSpreadCell::text().

void KSpreadView::deleteEditor bool  saveChanges = true  ) 
 

Called before saving, to finish the current edition (if any).

Definition at line 6312 of file kspread_view.cc.

Referenced by ~KSpreadView().

KoDocument * KSpreadView::hitTest const QPoint pos  ) 
 

Definition at line 4722 of file kspread_view.cc.

bool KSpreadView::isLoading  )  const
 

Returns true if document is being loaded.

It is useful to be checked for when doing view update.

Definition at line 1662 of file kspread_view.cc.

void KSpreadView::resultOfCalc  ) 
 

write in statusBar result of calc (Min, or Max, average, sum, count)

Definition at line 6127 of file kspread_view.cc.

References KSpread::ValueCalc::avg(), KSpread::ValueCalc::count(), KSpread::ValueCalc::countA(), KSpread::ValueCalc::max(), KSpread::ValueCalc::min(), and KSpread::ValueCalc::sum().

Referenced by commandExecuted().

void KSpreadView::paintUpdates  ) 
 

Repaint any cell with the paintDirty flag that is visible in this view.

Definition at line 6458 of file kspread_view.cc.

void KSpreadView::resetInsertHandle  ) 
 

Resets the internal handle pointer, called from KSpreadInsertHandler destructor.

Definition at line 1682 of file kspread_view.cc.

void KSpreadView::refreshView  )  [slot]
 

refresh view when you hide/show vertical scrollbar

Definition at line 4792 of file kspread_view.cc.

References editWidget(), showFormulaBar(), showStatusBar(), and showTabBar().

Referenced by showCommentIndicator(), showFormulaBar(), showStatusBar(), and showTabBar().

void KSpreadView::createTemplate  )  [slot]
 

Actions.

Definition at line 2416 of file kspread_view.cc.

void KSpreadView::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 3715 of file kspread_view.cc.

void KSpreadView::dissociateCell  )  [slot]
 

Breaks merged cell.

Obviously this can be done only on merged cells.

See also:
mergeCell

Definition at line 3740 of file kspread_view.cc.

void KSpreadView::sheetProperties  )  [slot]
 

Shows the sheet properties dialog.

Definition at line 3468 of file kspread_view.cc.

References SheetPropertiesCommand::execute(), SheetPropertiesCommand::setAutoCalc(), SheetPropertiesCommand::setCapitalizeFirstLetter(), SheetPropertiesCommand::setColumnAsNumber(), SheetPropertiesCommand::setHideZero(), SheetPropertiesCommand::setLayoutDirection(), SheetPropertiesCommand::setLcMode(), SheetPropertiesCommand::setShowFormula(), SheetPropertiesCommand::setShowFormulaIndicator(), SheetPropertiesCommand::setShowGrid(), and SheetPropertiesCommand::setShowPageBorders().

void KSpreadView::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 3428 of file kspread_view.cc.

References updateEditWidget().

void KSpreadView::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 4649 of file kspread_view.cc.

void KSpreadView::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 4661 of file kspread_view.cc.

void KSpreadView::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 4673 of file kspread_view.cc.

void KSpreadView::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 4685 of file kspread_view.cc.

void KSpreadView::showStatusBar bool  b  )  [slot]
 

Shows the status bar if b is true, otherwise the status bar will be hidden.

Definition at line 4560 of file kspread_view.cc.

References refreshView().

Referenced by refreshView().

void KSpreadView::showTabBar bool  b  )  [slot]
 

Shows the tab bar if b is true, otherwise the tab bar will be hidden.

Definition at line 4566 of file kspread_view.cc.

References refreshView().

Referenced by refreshView().

void KSpreadView::showFormulaBar bool  b  )  [slot]
 

Shows the formula bar if b is true, otherwise the formula bar will be hidden.

Definition at line 4572 of file kspread_view.cc.

References refreshView().

Referenced by refreshView().

void KSpreadView::showCommentIndicator bool  b  )  [slot]
 

If b is true, a red triangle is displayed on the corner of cells which have comments.

Definition at line 4578 of file kspread_view.cc.

References refreshView().

void KSpreadView::popupTabBarMenu const QPoint  )  [slot]
 

Shows context menu when tabbar is double-clicked.

Definition at line 6366 of file kspread_view.cc.

void KSpreadView::slotActivateTool int  _id  )  [protected, slot]
 

Popup menu.

Definition at line 5262 of file kspread_view.cc.

References editWidget(), and KSpreadCell::text().

void KSpreadView::popupChildMenu KoChild *  ,
const QPoint global_pos
[protected, slot]
 

Invoked if the popup menu for an embedded document should be opened.

Definition at line 4856 of file kspread_view.cc.

Referenced by KSpreadView().

void KSpreadView::slotPopupAdjustColumn  )  [protected, slot]
 

Border popup menu.

Definition at line 4961 of file kspread_view.cc.

References canvasWidget().

void KSpreadView::slotItemSelected int   )  [protected, slot]
 

list from list choose

Definition at line 5139 of file kspread_view.cc.

References editWidget(), KSpreadCell::formatType(), KSpreadCell::setCellText(), and KSpreadCell::text().

void KSpreadView::slotHighlight const QString text,
int  matchingIndex,
int  matchedLength
[protected, slot]
 

Called by find/replace (findNext) when it found a match.

Definition at line 4081 of file kspread_view.cc.

References canvasWidget().

void KSpreadView::slotReplace const QString newText,
int  ,
int  ,
int 
[protected, slot]
 

Called when replacing text in a cell.

Definition at line 4095 of file kspread_view.cc.

References KSpreadCell::clearDisplayDirtyFlag(), KSpreadCell::setCellText(), and KSpreadCell::setDisplayDirtyFlag().

void KSpreadView::commandExecuted  )  [slot]
 

Updates the view and the action.

This is typically connected to KoCommandHistory::commandExecuted() signal.

Definition at line 6466 of file kspread_view.cc.

References resultOfCalc(), and updateEditWidget().

Referenced by KSpreadView().

void KSpreadView::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 2375 of file kspread_view.cc.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kspread Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:43:48 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003