33#include <tqstringlist.h>
34#include <tqvaluelist.h>
37#include <tdeprint/kprintdialogpage.h>
48class SheetSelectWidget;
80class KPSheetSelectPage :
public KPrintDialogPage
85 KPSheetSelectPage( TQWidget *parent = 0 );
92 void getOptions( TQMap<TQString,TQString>& opts,
bool incldef =
false );
97 void setOptions(
const TQMap<TQString,TQString>& opts );
165 SheetSelectWidget* gui;
187class KSPREAD_EXPORT
View :
public KoView
196 View( TQWidget *_parent,
const char *_name,
228 void setZoom(
int zoom,
bool updateViews );
230 void addSheet( Sheet *_t );
232 void removeAllSheets();
233 void setActiveSheet( Sheet *_t,
bool updatesheet=
true );
235 const Sheet* activeSheet()
const;
236 Sheet* activeSheet();
238 void openPopupMenu(
const TQPoint &_global );
239 void popupRowMenu(
const TQPoint & _point ) ;
240 void popupColumnMenu(
const TQPoint & _point);
247 void setText(
const TQString& _text,
bool array =
false );
249 void enableUndo(
bool _b );
250 void enableRedo(
bool _b );
251 void enableInsertColumn(
bool _b );
252 void enableInsertRow(
bool _b );
261 void insertChart(
const TQRect& _geometry, KoDocumentEntry& _entry );
269 void insertChild(
const TQRect& _geometry, KoDocumentEntry& _entry );
273 virtual void print( KPrinter &printer );
274 virtual void setupPrinter( KPrinter &printer );
293 virtual DCOPObject* dcopObject();
295 virtual TQWidget *canvas()
const;
296 virtual int canvasXOffset()
const;
297 virtual int canvasYOffset()
const;
302 KoDocument *
hitTest(
const TQPoint &pos );
310 void changeNbOfRecentFiles(
int _nb);
312 void updateBorderButton();
314 void removeSheet( Sheet *_t );
315 void insertSheet( Sheet* sheet );
316 TQColor borderColor()
const;
318 Selection* selectionInfo()
const;
319 Selection* choice()
const;
321 void updateShowSheetMenu();
339 bool isInsertingObject();
341 bool showSheet(
const TQString& sheetName);
359 void deleteSelectedObjects();
371 void initialPosition();
376 void transformPart();
377 void copySelection();
379 void deleteSelection();
380 void clearTextSelection();
381 void clearCommentSelection();
382 void clearValiditySelection();
383 void clearConditionalSelection();
388 void recalcWorkBook();
389 void recalcWorkSheet();
396 void defaultSelection();
397 void paperLayoutDlg();
399 void definePrintRange();
400 void resetPrintRange();
402 void insertFromDatabase();
403 void insertFromTextfile();
404 void insertFromClipboard();
405 void insertSpecialChar();
406 void togglePageBorders(
bool );
407 void toggleProtectSheet(
bool );
408 void toggleProtectDoc(
bool );
409 void viewZoom(
const TQString & );
418 void insertHyperlink();
419 void removeHyperlink();
421 void multipleOperations();
423 void textToColumns();
431 void insertPicture();
432 void moneyFormat(
bool b);
433 void alignLeft(
bool b );
434 void alignRight(
bool b );
435 void alignCenter(
bool b );
436 void alignTop(
bool b );
437 void alignMiddle(
bool b );
438 void alignBottom(
bool b );
439 void wrapText(
bool b );
440 void precisionMinus();
441 void precisionPlus();
442 void createStyleFromCell();
443 void styleSelected(
const TQString & );
444 void setSelectionPrecision(
int delta);
445 void percent(
bool b);
446 void fontSelected(
const TQString &_font );
447 void fontSizeSelected(
int size );
449 void italic(
bool b );
450 void underline(
bool b );
451 void strikeOut(
bool b );
461 void showSelColumns();
462 void insertMathExpr();
463 void formulaSelection(
const TQString &_math );
464 void changeTextColor();
465 void changeBackgroundColor();
469 void extraProperties();
474 void borderOutline();
477 void changeBorderColor();
482 void increaseFontSize();
483 void decreaseFontSize();
484 void setSelectionFontSize(
int size);
486 void setSelectionTextColor(
const TQColor &txtColor);
487 void setSelectionBackgroundColor(
const TQColor &bgColor);
488 void setSelectionBorderColor(
const TQColor &bdColor);
490 void setSelectionLeftBorderColor(
const TQColor &color);
491 void setSelectionRightBorderColor(
const TQColor &color);
492 void setSelectionTopBorderColor(
const TQColor &color);
493 void setSelectionBottomBorderColor(
const TQColor &color);
494 void setSelectionAllBorderColor(
const TQColor &color);
495 void setSelectionOutlineBorderColor(
const TQColor &color);
499 void equalizeColumn();
502 void firstLetterUpper();
503 void verticalText(
bool );
504 void addModifyComment();
505 void setSelectionComment(TQString comment);
506 void removeComment();
508 void setSelectionAngle(
int angle);
517 void mergeCellHorizontal();
518 void mergeCellVertical();
529 void increaseIndent();
530 void decreaseIndent();
533 void moveSheet(
unsigned sheet,
unsigned target );
572 void statusBarClicked(
int _id);
595 void handleDamages(
const TQValueList<Damage*>& damages );
597 void runInternalTests();
600 void initialiseMarkerFromSheet( Sheet *_sheet,
const TQPoint &point );
613 void slotInsertCellCopy();
632 void slotPopupAdjustRow();
638 void slotListChoosePopupMenu( );
643 void slotHighlight(
const TQString &text,
int matchingIndex,
int matchedLength );
647 void slotReplace(
const TQString &newText,
int,
int,
int );
649 void slotSpecialChar( TQChar c,
const TQString & _font );
650 void slotSpecialCharDlgClosed();
654 void objectSelectedChanged();
657 void slotChildSelected( KoDocumentChild* ch );
658 void slotChildUnselected( KoDocumentChild* );
662 void slotRefreshView();
663 void slotUpdateView( Sheet *_sheet );
664 void slotUpdateView( Sheet *_sheet,
const Region& );
666 void slotUpdateHBorder( Sheet *_sheet );
667 void slotUpdateVBorder( Sheet *_sheet );
668 void slotChangeSelection(
const Region&);
669 void slotChangeChoice(
const Region&);
670 void slotScrollChoice(
const Region&);
671 void slotAddSheet( Sheet *_sheet );
673 void slotSheetRenamed( Sheet* sheet,
const TQString& old_name );
674 void slotSheetHidden( Sheet*_sheet );
675 void slotSheetShown( Sheet*_sheet );
676 void slotSheetRemoved( Sheet*_sheet );
677 void refreshLocale();
678 void extraSpelling();
680 void spellCheckerReady();
681 void spellCheckerMisspelling(
const TQString &,
const TQStringList &,
unsigned int);
682 void spellCheckerCorrected(
const TQString &,
const TQString &,
unsigned int);
683 void spellCheckerDone(
const TQString & );
684 void spellCheckerFinished( );
685 void spellCheckerIgnoreAll(
const TQString & word);
686 void spellCheckerReplaceAll(
const TQString &,
const TQString &);
695 virtual int leftBorder()
const;
696 virtual int rightBorder()
const;
697 virtual int topBorder()
const;
698 virtual int bottomBorder()
const;
702 virtual void keyPressEvent ( TQKeyEvent * _ev );
703 virtual void resizeEvent( TQResizeEvent *_ev );
705 virtual TQWMatrix matrix()
const;
722 virtual void updateReadWrite(
bool readwrite );
724 virtual void guiActivateEvent( KParts::GUIActivateEvent *ev );
726 void initFindReplace();
727 Cell* findNextCell();
739 bool spellSwitchToOtherSheet();
746 bool isLoading()
const;
748 Cell* nextFindValidCell(
int col,
int row );
750 friend class Private;
The canvas builds a part of the GUI of KSpread.
For every cell in the spread sheet there is a Cell object.
This class holds the data that makes up a spreadsheet.
Holds an embedded koffice object.
Contains basic information for every object.
void prependSelectedSheet(const TQString &sheetname)
Inserts given sheet to the list of sheets for printing at the top.
void prependAvailableSheet(const TQString &sheetname)
Inserts given sheet to the list of available sheets.
TQStringList selectedSheets()
void getOptions(TQMap< TQString, TQString > &opts, bool incldef=false)
void clearSelection()
Removes all sheets from the list of selected sheets.
bool isValid(TQString &msg)
static TQString printOptionForIndex(unsigned int index)
The print order of the sheets is stored in the option map, using a prefix plus the index of the sheet...
void setOptions(const TQMap< TQString, TQString > &opts)
The one for all class for points and ranges.
The View class displays a KSpread document.
void slotActivateTool(int _id)
Popup menu.
void refreshView()
refresh view when you hide/show vertical scrollbar
void deleteEditor(bool saveChanges=true)
Called before saving, to finish the current edition (if any).
ComboboxLocationEditWidget * posWidget() const
Returns the location widget.
void sheetProperties()
Shows the sheet properties dialog.
KoPoint offsetFromSheet(Sheet *sheet) const
void mergeCell()
Merges selected cells into one cell.
static TQColor highlightColor()
Returns the default color for highlighting cells and column / row headers.
void dissociateCell()
Breaks merged cell.
void showTabBar(bool b)
Shows the tab bar if b is true, otherwise the tab bar will be hidden.
KoTabBar * tabBar() const
Returns the tab bar.
Canvas * canvasWidget() const
Returns the canvas of the view.
void slotItemSelected(int)
list from list choose
void previousSheet()
Switch the active sheet to the previous visible sheet.
void popupTabBarMenu(const TQPoint &)
Shows context menu when tabbar is double-clicked.
void createTemplate()
Actions.
void slotPopupAdjustColumn()
Border popup menu.
void slotPopupDeleteChild()
Invoked when the "Delete Embedded Document" option from an embedded document's popup menu is selected...
TQScrollBar * vertScrollBar() const
Returns the vertical scrollbar.
void resetInsertHandle()
Resets the internal handle pointer, called from InsertHandler destructor.
void commandExecuted()
Updates the view and the action.
void changeSheet(const TQString &_name)
Switch the active sheet to the name.
TQScrollBar * horzScrollBar() const
Returns the horizontal scrollbar.
void markSelectionAsDirty()
Mark all selected cells / regions of cells as 'dirty' (ie.
void setText(const TQString &_text, bool array=false)
Used by EditWidget.
void slotHighlight(const TQString &text, int matchingIndex, int matchedLength)
Called by find/replace (findNext) when it found a match.
void paintUpdates()
Repaint any cell with the paintDirty flag that is visible in this view.
void calcStatusBarOp()
write in statusBar result of calc (Min, or Max, average, sum, count)
TQPoint markerFromSheet(Sheet *sheet) const
void slotReplace(const TQString &newText, int, int, int)
Called when replacing text in a cell.
void firstSheet()
Switch the active sheet to the first visible sheet in the workbook.
void popupChildMenu(KoChild *, const TQPoint &global_pos)
Invoked if the popup menu for an embedded document should be opened.
VBorder * vBorderWidget() const
Returns the row header.
KoDocument * hitTest(const TQPoint &pos)
void insertChart(const TQRect &_geometry, KoDocumentEntry &_entry)
void activateFormulaEditor()
Activates the formula editor for the current cell.
View(TQWidget *_parent, const char *_name, Doc *doc)
Creates a new view.
void nextSheet()
Switch the active sheet to the next visible sheet.
void lastSheet()
Switch the active sheet to the last visible sheet in the workbook.
HBorder * hBorderWidget() const
Returns the column header.
void updateEditWidget()
Fills the EditWidget with the current cells content.
KoPoint markerDocumentPosition()
Returns the position of the top-left point of the currently selected cell in document coordinates.
void insertChild(const TQRect &_geometry, KoDocumentEntry &_entry)
void showStatusBar(bool b)
Shows the status bar if b is true, otherwise the status bar will be hidden.
void saveCurrentSheetSelection()
Save current sheet selection.
void showFormulaBar(bool b)
Shows the formula bar if b is true, otherwise the formula bar will be hidden.
KSpread::EditWidget * editWidget() const
Returns the editor widget.
void updateEditWidgetOnPress()
Same as updateEditEidget() but no update of menus and toolbars.