kspread_selection.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __kspread_selection_h__
00021 #define __kspread_selection_h__
00022
00023 #include <qrect.h>
00024 #include "kspread_util.h"
00025
00026 class KSpreadSheet;
00027 class KSpreadView;
00028
00029 class KSPREAD_EXPORT KSpreadSelection
00030 {
00031 public:
00032
00033 KSpreadSelection(KSpreadView* view);
00034
00035 virtual ~KSpreadSelection();
00036
00040
00041
00042
00048 QPoint marker() const;
00049
00055 QRect selection(bool extend = true) const;
00056
00060 bool singleCellSelection() const;
00061
00065 QRect selectionHandleArea() const;
00066
00067 void setSelection( const QPoint &marker, const QPoint &anchor,
00068 KSpreadSheet* sheet );
00069
00070 void setMarker( const QPoint &point, KSpreadSheet* sheet );
00071
00075 QPoint selectionAnchor()const;
00076
00090 bool setCursorPosition(const QPoint &position);
00091
00097 QPoint cursorPosition() const;
00098
00099
00100 void setChooseAnchor( const QPoint &chooseAnchor )
00101 { m_chooseAnchor = chooseAnchor; }
00102 void setChooseMarker( const QPoint &chooseMarker )
00103 { m_chooseMarker = chooseMarker; }
00104 void setChooseCursor( KSpreadSheet* sheet, const QPoint &chooseCursor )
00105 { m_chooseSheet = sheet; m_chooseCursor = chooseCursor; }
00106 void setChooseSheet(KSpreadSheet* sheet) { m_chooseSheet = sheet; }
00107
00108 QRect getChooseRect()const;
00109 QPoint getChooseCursor()const { return m_chooseCursor; }
00110 QPoint getChooseMarker()const { return m_chooseMarker; }
00111 QPoint getChooseAnchor()const { return m_chooseAnchor; }
00112
00113 KSpreadSheet* getChooseSheet()const { return m_chooseSheet; }
00114
00115
00116 private:
00124
00125 QPoint m_marker;
00126 QPoint m_cursorPosition;
00127 QPoint m_anchor;
00128
00129 QPoint m_chooseMarker;
00130 QPoint m_chooseAnchor;
00131 QPoint m_chooseCursor;
00132
00133 KSpreadSheet* m_chooseSheet;
00134 KSpreadView* m_pView;
00135
00136 private:
00137
00138 QRect extendToMergedAreas(QRect area) const;
00139
00140 };
00141
00142
00143 #endif
This file is part of the documentation for kspread Library Version 1.4.2.