kspread

KSpread::View Class Reference

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

#include <View.h>

Inheritance diagram for KSpread::View:

List of all members.

Public Slots

void aboutToModify (const Region &region)
void calcStatusBarOp ()
void changeSheet (const QString &_name)
void copyAsText ()
void createTemplate ()
void deleteSheet ()
void duplicateSheet ()
void editDeleteSelection ()
void firstSheet ()
void handleDamages (const QList< Damage * > &damages)
void helpUsing ()
void hideSheet ()
void initialiseMarkerFromSheet (Sheet *_sheet, const QPoint &point)
void initialPosition ()
void insertSheet ()
void lastSheet ()
void menuCalc (bool)
void moveSheet (unsigned sheet, unsigned target)
void nextSheet ()
void optionsNotifications ()
void paperLayoutDlg ()
void popupTabBarMenu (const QPoint &)
void preference ()
void previousSheet ()
void recalcWorkBook ()
void recalcWorkSheet ()
void refreshSelection (const Region &region)
void refreshSheetViews ()
void refreshView ()
void resetPrintRange ()
void setActiveSheet (Sheet *sheet, bool updatesheet=true)
void setSelectionAllBorderColor (const QColor &color)
void setSelectionBackgroundColor (const QColor &bgColor)
void setSelectionBorderColor (const QColor &bdColor)
void setSelectionBottomBorderColor (const QColor &color)
void setSelectionComment (const QString &comment)
void setSelectionLeftBorderColor (const QColor &color)
void setSelectionOutlineBorderColor (const QColor &color)
void setSelectionRightBorderColor (const QColor &color)
void setSelectionTextColor (const QColor &txtColor)
void setSelectionTopBorderColor (const QColor &color)
void setShapeAnchoring (const QString &mode)
void shapeSelectionChanged ()
void sheetProperties ()
void showColumnHeader (bool enable)
void showHorizontalScrollBar (bool enable)
void showRowHeader (bool enable)
void showSheet ()
void showStatusBar (bool b)
void showTabBar (bool b)
void showVerticalScrollBar (bool enable)
void slotAddSheet (Sheet *_sheet)
void slotChangeSelection (const Region &)
void slotRefreshView ()
void slotScrollChoice (const Region &)
void slotSheetHidden (Sheet *_sheet)
void slotSheetRemoved (Sheet *_sheet)
void slotSheetRenamed (Sheet *sheet, const QString &old_name)
void slotSheetShown (Sheet *_sheet)
void slotUpdateColumnHeader (Sheet *_sheet)
void slotUpdateRowHeader (Sheet *_sheet)
void slotUpdateView (Sheet *_sheet, const Region &)
void slotUpdateView (Sheet *_sheet)
void statusBarClicked (const QPoint &pos)
void togglePageBorders (bool)
void toggleProtectDoc (bool)
void toggleProtectSheet (bool)
void viewZoom (KoZoomMode::Mode mode, qreal zoom)

Signals

void documentReadWriteToggled (bool readwrite)
void sheetProtectionToggled (bool protect)

Public Member Functions

 View (QWidget *_parent, Doc *doc)
 ~View ()
SheetactiveSheet ()
const SheetactiveSheet () const
void addSheet (Sheet *_t)
QColor borderColor () const
virtual int bottomBorder () const
virtual QWidgetcanvas () const
KoCanvasController * canvasController () const
CanvascanvasWidget () const
void changeNbOfRecentFiles (int _nb)
ColumnHeadercolumnHeader () const
Docdoc () const
QScrollBarhorzScrollBar () const
void initCalcMenu ()
void initConfig ()
bool isLoading () const
virtual int leftBorder () const
QPoint markerFromSheet (Sheet *sheet) const
void markSelectionAsDirty ()
virtual QMatrix matrix () const
QPointF offsetFromSheet (Sheet *sheet) const
void paintUpdates ()
void removeAllSheets ()
virtual int rightBorder () const
RowHeaderrowHeader () const
void saveCurrentSheetSelection ()
Selectionselection () const
void setZoom (int zoom, bool updateViews)
SheetViewsheetView (const Sheet *sheet) const
bool showSheet (const QString &sheetName)
TabBartabBar () const
virtual int topBorder () const
void updateBorderButton ()
void updateShowSheetMenu ()
QScrollBarvertScrollBar () const
virtual KoZoomController * zoomController () const
KoZoomHandler * zoomHandler () const

Protected Slots

void slotRename ()

Protected Member Functions

void activateFormulaEditor ()
virtual KoPrintJob * createPrintJob ()
virtual void guiActivateEvent (KParts::GUIActivateEvent *ev)
virtual void keyPressEvent (QKeyEvent *_ev)
virtual void resizeEvent (QResizeEvent *_ev)
virtual void updateReadWrite (bool readwrite)

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 85 of file View.h.


Constructor & Destructor Documentation

KSpread::View::View ( QWidget _parent,
Doc doc 
)

Creates a new view.

Definition at line 605 of file View.cpp.

KSpread::View::~View (  ) 

Destroys the view.

Definition at line 660 of file View.cpp.


Member Function Documentation

void KSpread::View::aboutToModify ( const Region region  )  [slot]

Definition at line 959 of file View.cpp.

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 1175 of file View.cpp.

Sheet * KSpread::View::activeSheet (  ) 

Definition at line 912 of file View.cpp.

const Sheet * KSpread::View::activeSheet (  )  const

Definition at line 907 of file View.cpp.

void KSpread::View::addSheet ( Sheet _t  ) 

Definition at line 1347 of file View.cpp.

QColor KSpread::View::borderColor (  )  const

Definition at line 2481 of file View.cpp.

int KSpread::View::bottomBorder (  )  const [virtual]

Definition at line 1965 of file View.cpp.

void KSpread::View::calcStatusBarOp (  )  [slot]

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

Definition at line 2263 of file View.cpp.

QWidget * KSpread::View::canvas (  )  const [virtual]

Definition at line 2380 of file View.cpp.

KoCanvasController * KSpread::View::canvasController (  )  const

Returns the canvas controller of the view.

Definition at line 862 of file View.cpp.

Canvas * KSpread::View::canvasWidget (  )  const

Returns the canvas of the view.

Definition at line 852 of file View.cpp.

void KSpread::View::changeNbOfRecentFiles ( int  _nb  ) 

Definition at line 1014 of file View.cpp.

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 1477 of file View.cpp.

ColumnHeader * KSpread::View::columnHeader (  )  const

Returns the column header.

Definition at line 867 of file View.cpp.

void KSpread::View::copyAsText (  )  [slot]

Definition at line 1640 of file View.cpp.

KoPrintJob * KSpread::View::createPrintJob (  )  [protected, virtual]

Definition at line 2614 of file View.cpp.

void KSpread::View::createTemplate (  )  [slot]

Actions.

Definition at line 1205 of file View.cpp.

void KSpread::View::deleteSheet (  )  [slot]

Definition at line 2092 of file View.cpp.

Doc * KSpread::View::doc (  )  const

Definition at line 697 of file View.cpp.

void KSpread::View::documentReadWriteToggled ( bool  readwrite  )  [signal]
void KSpread::View::duplicateSheet (  )  [slot]

Definition at line 1589 of file View.cpp.

void KSpread::View::editDeleteSelection (  )  [slot]

Definition at line 1104 of file View.cpp.

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 1910 of file View.cpp.

void KSpread::View::guiActivateEvent ( KParts::GUIActivateEvent *  ev  )  [protected, virtual]

Definition at line 2385 of file View.cpp.

void KSpread::View::handleDamages ( const QList< Damage * > &  damages  )  [slot]

Definition at line 2544 of file View.cpp.

void KSpread::View::helpUsing (  )  [slot]

Definition at line 1266 of file View.cpp.

void KSpread::View::hideSheet (  )  [slot]

Definition at line 1608 of file View.cpp.

QScrollBar * KSpread::View::horzScrollBar (  )  const

Returns the horizontal scrollbar.

Definition at line 877 of file View.cpp.

void KSpread::View::initCalcMenu (  ) 

Definition at line 1020 of file View.cpp.

void KSpread::View::initConfig (  ) 

Definition at line 965 of file View.cpp.

void KSpread::View::initialiseMarkerFromSheet ( Sheet _sheet,
const QPoint point 
) [slot]

Definition at line 2507 of file View.cpp.

void KSpread::View::initialPosition (  )  [slot]

Definition at line 1109 of file View.cpp.

void KSpread::View::insertSheet (  )  [slot]

Definition at line 1568 of file View.cpp.

bool KSpread::View::isLoading (  )  const
Returns:
true if document is being loaded. It is useful to suppress scrolling while the "View loading" process.

Definition at line 897 of file View.cpp.

void KSpread::View::keyPressEvent ( QKeyEvent _ev  )  [protected, virtual]

Definition at line 1938 of file View.cpp.

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 1924 of file View.cpp.

int KSpread::View::leftBorder (  )  const [virtual]

Definition at line 1950 of file View.cpp.

QPoint KSpread::View::markerFromSheet ( Sheet sheet  )  const
Returns:
marker for sheet

Definition at line 2513 of file View.cpp.

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 2494 of file View.cpp.

QMatrix KSpread::View::matrix (  )  const [virtual]

Definition at line 2371 of file View.cpp.

void KSpread::View::menuCalc ( bool   )  [slot]

Definition at line 2338 of file View.cpp.

void KSpread::View::moveSheet ( unsigned  sheet,
unsigned  target 
) [slot]

Definition at line 1501 of file View.cpp.

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 1882 of file View.cpp.

QPointF KSpread::View::offsetFromSheet ( Sheet sheet  )  const
Returns:
scroll offset for sheet

Definition at line 2520 of file View.cpp.

void KSpread::View::optionsNotifications (  )  [slot]

Definition at line 1844 of file View.cpp.

void KSpread::View::paintUpdates (  ) 

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

Definition at line 2499 of file View.cpp.

void KSpread::View::paperLayoutDlg (  )  [slot]

Definition at line 2028 of file View.cpp.

void KSpread::View::popupTabBarMenu ( const QPoint _point  )  [slot]

Shows context menu when tabbar is double-clicked.

Definition at line 2406 of file View.cpp.

void KSpread::View::preference (  )  [slot]

Definition at line 1849 of file View.cpp.

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 1896 of file View.cpp.

void KSpread::View::recalcWorkBook (  )  [slot]

Definition at line 1053 of file View.cpp.

void KSpread::View::recalcWorkSheet (  )  [slot]

Definition at line 1058 of file View.cpp.

void KSpread::View::refreshSelection ( const Region region  )  [slot]

Definition at line 954 of file View.cpp.

void KSpread::View::refreshSheetViews (  )  [slot]

Definition at line 935 of file View.cpp.

void KSpread::View::refreshView (  )  [slot]

refresh view when you hide/show vertical scrollbar

Definition at line 1970 of file View.cpp.

void KSpread::View::removeAllSheets (  ) 

Definition at line 1383 of file View.cpp.

void KSpread::View::resetPrintRange (  )  [slot]

Definition at line 2050 of file View.cpp.

void KSpread::View::resizeEvent ( QResizeEvent _ev  )  [protected, virtual]

Definition at line 2024 of file View.cpp.

int KSpread::View::rightBorder (  )  const [virtual]

Definition at line 1955 of file View.cpp.

RowHeader * KSpread::View::rowHeader (  )  const

Returns the row header.

Definition at line 872 of file View.cpp.

void KSpread::View::saveCurrentSheetSelection (  ) 

Save current sheet selection.

Call when we change sheet, or before save in OpenDocument format.

Definition at line 2527 of file View.cpp.

Selection * KSpread::View::selection (  )  const

Definition at line 902 of file View.cpp.

void KSpread::View::setActiveSheet ( Sheet sheet,
bool  updatesheet = true 
) [slot]

Definition at line 1389 of file View.cpp.

void KSpread::View::setSelectionAllBorderColor ( const QColor color  )  [slot]

Definition at line 1332 of file View.cpp.

void KSpread::View::setSelectionBackgroundColor ( const QColor bgColor  )  [slot]

Definition at line 1247 of file View.cpp.

void KSpread::View::setSelectionBorderColor ( const QColor bdColor  )  [slot]

Definition at line 1257 of file View.cpp.

void KSpread::View::setSelectionBottomBorderColor ( const QColor color  )  [slot]

Definition at line 1271 of file View.cpp.

void KSpread::View::setSelectionComment ( const QString comment  )  [slot]

Definition at line 1859 of file View.cpp.

void KSpread::View::setSelectionLeftBorderColor ( const QColor color  )  [slot]

Definition at line 1294 of file View.cpp.

void KSpread::View::setSelectionOutlineBorderColor ( const QColor color  )  [slot]

Definition at line 1319 of file View.cpp.

void KSpread::View::setSelectionRightBorderColor ( const QColor color  )  [slot]

Definition at line 1281 of file View.cpp.

void KSpread::View::setSelectionTextColor ( const QColor txtColor  )  [slot]

Definition at line 1237 of file View.cpp.

void KSpread::View::setSelectionTopBorderColor ( const QColor color  )  [slot]

Definition at line 1309 of file View.cpp.

void KSpread::View::setShapeAnchoring ( const QString mode  )  [slot]

Switches the shape anchoring.

Shapes can either be anchored to cells or to the sheet/page.

Parameters:
mode string indicating cell or sheet anchoring

Definition at line 1648 of file View.cpp.

void KSpread::View::setZoom ( int  zoom,
bool  updateViews 
)

Definition at line 1797 of file View.cpp.

void KSpread::View::shapeSelectionChanged (  )  [slot]

Definition at line 1065 of file View.cpp.

void KSpread::View::sheetProperties (  )  [slot]

Shows the sheet properties dialog.

Definition at line 1515 of file View.cpp.

void KSpread::View::sheetProtectionToggled ( bool  protect  )  [signal]
SheetView * KSpread::View::sheetView ( const Sheet sheet  )  const
Returns:
the SheetView for sheet

Definition at line 917 of file View.cpp.

void KSpread::View::showColumnHeader ( bool  enable  )  [slot]

Shows the column header, if enable is true, otherwise it will be hidden.

Definition at line 1808 of file View.cpp.

void KSpread::View::showHorizontalScrollBar ( bool  enable  )  [slot]

Shows the horizontal scrollbar, if enable is true, otherwise it will be hidden.

Definition at line 1820 of file View.cpp.

void KSpread::View::showRowHeader ( bool  enable  )  [slot]

Shows the column header, if enable is true, otherwise it will be hidden.

Definition at line 1814 of file View.cpp.

void KSpread::View::showSheet (  )  [slot]

Definition at line 1631 of file View.cpp.

bool KSpread::View::showSheet ( const QString sheetName  ) 

Definition at line 1869 of file View.cpp.

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 1832 of file View.cpp.

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 1838 of file View.cpp.

void KSpread::View::showVerticalScrollBar ( bool  enable  )  [slot]

Shows the vertical scrollbar, if enable is true, otherwise it will be hidden.

Definition at line 1826 of file View.cpp.

void KSpread::View::slotAddSheet ( Sheet _sheet  )  [slot]

Definition at line 2169 of file View.cpp.

void KSpread::View::slotChangeSelection ( const Region changedRegion  )  [slot]

Definition at line 2225 of file View.cpp.

void KSpread::View::slotRefreshView (  )  [slot]

Definition at line 2174 of file View.cpp.

void KSpread::View::slotRename (  )  [protected, slot]

Definition at line 2120 of file View.cpp.

void KSpread::View::slotScrollChoice ( const Region changedRegion  )  [slot]

Definition at line 2255 of file View.cpp.

void KSpread::View::slotSheetHidden ( Sheet _sheet  )  [slot]

Definition at line 1466 of file View.cpp.

void KSpread::View::slotSheetRemoved ( Sheet _sheet  )  [slot]

Definition at line 1374 of file View.cpp.

void KSpread::View::slotSheetRenamed ( Sheet sheet,
const QString old_name 
) [slot]

Definition at line 1461 of file View.cpp.

void KSpread::View::slotSheetShown ( Sheet _sheet  )  [slot]

Definition at line 1471 of file View.cpp.

void KSpread::View::slotUpdateColumnHeader ( Sheet _sheet  )  [slot]

Definition at line 2203 of file View.cpp.

void KSpread::View::slotUpdateRowHeader ( Sheet _sheet  )  [slot]

Definition at line 2214 of file View.cpp.

void KSpread::View::slotUpdateView ( Sheet _sheet,
const Region region 
) [slot]

Definition at line 2192 of file View.cpp.

void KSpread::View::slotUpdateView ( Sheet _sheet  )  [slot]

Definition at line 2183 of file View.cpp.

void KSpread::View::statusBarClicked ( const QPoint pos  )  [slot]

Definition at line 2330 of file View.cpp.

TabBar * KSpread::View::tabBar (  )  const

Returns the tab bar.

Definition at line 887 of file View.cpp.

void KSpread::View::togglePageBorders ( bool  mode  )  [slot]

Definition at line 1782 of file View.cpp.

void KSpread::View::toggleProtectDoc ( bool  mode  )  [slot]

Definition at line 1661 of file View.cpp.

void KSpread::View::toggleProtectSheet ( bool  mode  )  [slot]

Definition at line 1718 of file View.cpp.

int KSpread::View::topBorder (  )  const [virtual]

Definition at line 1960 of file View.cpp.

void KSpread::View::updateBorderButton (  ) 

Definition at line 2451 of file View.cpp.

void KSpread::View::updateReadWrite ( bool  readwrite  )  [protected, virtual]

Definition at line 1179 of file View.cpp.

void KSpread::View::updateShowSheetMenu (  ) 

Definition at line 2486 of file View.cpp.

QScrollBar * KSpread::View::vertScrollBar (  )  const

Returns the vertical scrollbar.

Definition at line 882 of file View.cpp.

void KSpread::View::viewZoom ( KoZoomMode::Mode  mode,
qreal  zoom 
) [slot]

Definition at line 1790 of file View.cpp.

KoZoomController * KSpread::View::zoomController (  )  const [virtual]

Definition at line 857 of file View.cpp.

KoZoomHandler * KSpread::View::zoomHandler (  )  const
Returns:
the zoom handler

Definition at line 892 of file View.cpp.


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