author | leseb <leseb> | 2002-07-15 23:22:50 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-07-15 23:22:50 (UTC) |
commit | 72eb74051ed8f1b7696041e241ab99df3af5b08d (patch) (side-by-side diff) | |
tree | bf9beee9469bc4384cb8178fbd6565cf161b4708 /noncore/apps/opie-write/qtextedit.h | |
parent | dcea0e50a00ed9efb988ded5abf5d39de1bea393 (diff) | |
download | opie-72eb74051ed8f1b7696041e241ab99df3af5b08d.zip opie-72eb74051ed8f1b7696041e241ab99df3af5b08d.tar.gz opie-72eb74051ed8f1b7696041e241ab99df3af5b08d.tar.bz2 |
Sync with Qt 3.0.5
Diffstat (limited to 'noncore/apps/opie-write/qtextedit.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-write/qtextedit.h | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/noncore/apps/opie-write/qtextedit.h b/noncore/apps/opie-write/qtextedit.h index b4e5701..64e8f45 100644 --- a/noncore/apps/opie-write/qtextedit.h +++ b/noncore/apps/opie-write/qtextedit.h @@ -58,15 +58,17 @@ class QPopupMenu; namespace Qt3 { class QTextString; class QTextDocument; class QTextCursor; class QTextCommand; -class QTextParag; +class QTextParagraph; class QTextFormat; +class QTextEdit; class QTextBrowser; +class QTextString; class QTextEditPrivate; class Q_EXPORT QTextEdit : public QScrollView { friend class QTextBrowser; @@ -193,18 +195,23 @@ public: QString family() const; int pointSize() const; QColor color() const; QFont font() const; int alignment() const; int undoDepth() const; + + // do not use, will go away virtual bool getFormat( int para, int index, QFont *font, QColor *color, VerticalAlignment *verticalAlignment ); + // do not use, will go away virtual bool getParagraphFormat( int para, QFont *font, QColor *color, VerticalAlignment *verticalAlignment, int *alignment, QStyleSheetItem::DisplayMode *displayMode, QStyleSheetItem::ListStyle *listStyle, int *listDepth ); + + bool isOverwriteMode() const { return overWrite; } QColor paragraphBackgroundColor( int para ) const; bool isUndoRedoEnabled() const; bool eventFilter( QObject *o, QEvent *e ); @@ -254,13 +261,16 @@ public slots: virtual void setFamily( const QString &f ); virtual void setPointSize( int s ); virtual void setColor( const QColor &c ); virtual void setFont( const QFont &f ); virtual void setVerticalAlignment( VerticalAlignment a ); virtual void setAlignment( int a ); + + // do not use, will go away virtual void setParagType( QStyleSheetItem::DisplayMode dm, QStyleSheetItem::ListStyle listStyle ); + virtual void setCursorPosition( int parag, int index ); virtual void setSelection( int parag_from, int index_from, int parag_to, int index_to, int selNum = 0 ); virtual void setSelectionAttributes( int selNum, const QColor &back, bool invertText ); virtual void setModified( bool m ); virtual void resetFormat(); virtual void setUndoDepth( int d ); @@ -343,13 +353,13 @@ private slots: void setModified(); void startDrag(); void documentWidthChanged( int w ); private: struct Q_EXPORT UndoRedoInfo { - enum Type { Invalid, Insert, Delete, Backspace, Return, RemoveSelected, Format, Alignment, ParagType }; + enum Type { Invalid, Insert, Delete, Backspace, Return, RemoveSelected, Format, Style }; UndoRedoInfo( QTextDocument *dc ); ~UndoRedoInfo(); void clear(); bool valid() const; @@ -359,53 +369,49 @@ private: int eid; int eindex; QTextFormat *format; int flags; Type type; QTextDocument *doc; - QMemArray<int> oldAligns; - int newAlign; - bool list; - QStyleSheetItem::ListStyle listStyle; - QValueList< QPtrVector<QStyleSheetItem> > oldStyles; - QValueList<QStyleSheetItem::ListStyle> oldListStyles; + QByteArray styleInformation; }; private: void updateCursor( const QPoint & pos ); void handleMouseMove( const QPoint& pos ); void drawContents( QPainter * ); virtual bool linksEnabled() const { return FALSE; } void init(); void checkUndoRedoInfo( UndoRedoInfo::Type t ); void updateCurrentFormat(); bool handleReadOnlyKeyEvent( QKeyEvent *e ); - void makeParagVisible( QTextParag *p ); + void makeParagVisible( QTextParagraph *p ); #ifndef QT_NO_MIME QCString pickSpecial(QMimeSource* ms, bool always_ask, const QPoint&); #endif #ifndef QT_NO_MIMECLIPBOARD void pasteSpecial(const QPoint&); #endif void setFontInternal( const QFont &f ); virtual void emitHighlighted( const QString & ) {} virtual void emitLinkClicked( const QString & ) {} - void readFormats( QTextCursor &c1, QTextCursor &c2, int oldLen, QTextString &text, bool fillStyles = FALSE ); + void readFormats( QTextCursor &c1, QTextCursor &c2, QTextString &text, bool fillStyles = FALSE ); void clearUndoRedo(); void paintDocument( bool drawAll, QPainter *p, int cx = -1, int cy = -1, int cw = -1, int ch = -1 ); void moveCursor( CursorAction action ); - void ensureFormatted( QTextParag *p ); + void ensureFormatted( QTextParagraph *p ); void placeCursor( const QPoint &pos, QTextCursor *c, bool link ); + void updateMicroFocusHint(); private: QTextDocument *doc; QTextCursor *cursor; QTimer *formatTimer, *scrollTimer, *changeIntervalTimer, *blinkTimer, *dragStartTimer; - QTextParag *lastFormatted; + QTextParagraph *lastFormatted; int interval; UndoRedoInfo undoRedoInfo; QTextFormat *currentFormat; int currentAlignment; QPoint oldMousePos, mousePos; QPoint dragStartPos; |