kotabbar.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef kotabbar_h
00026 #define kotabbar_h
00027
00028 #include <qwidget.h>
00029 #include <qstringlist.h>
00030 #include <koffice_export.h>
00031 class KoTabBarPrivate;
00032
00061 class KOFFICEUI_EXPORT KoTabBar : public QWidget
00062 {
00063 Q_OBJECT
00064
00065 Q_PROPERTY( QString activeTab READ activeTab WRITE setActiveTab )
00066 Q_PROPERTY( bool readOnly READ readOnly WRITE setReadOnly )
00067 Q_PROPERTY( QStringList tabs READ tabs WRITE setTabs )
00068 Q_PROPERTY( unsigned count READ count )
00069
00070 public:
00071
00075 KoTabBar( QWidget* parent = 0, const char *name = 0 );
00076
00080 virtual ~KoTabBar();
00081
00085 bool readOnly() const;
00086
00091 bool reverseLayout() const;
00092
00093
00094
00095
00096 QStringList tabs() const;
00097
00098
00099
00100
00101
00102 unsigned count() const;
00103
00104
00105
00106
00107 QString activeTab() const;
00108
00114 bool canScrollBack() const;
00115
00121 bool canScrollForward() const;
00122
00123 public slots:
00124
00128 void setTabs( const QStringList& list );
00129
00137 void setReadOnly( bool ro );
00138
00143 void setReverseLayout( bool reverse );
00144
00148 void addTab( const QString& text );
00149
00155 void removeTab( const QString& text );
00156
00160 void renameTab( const QString& old_name, const QString& new_name );
00161
00172 void moveTab( unsigned tab, unsigned target );
00173
00180 void scrollBack();
00181
00188 void scrollForward();
00189
00196 void scrollFirst();
00197
00204 void scrollLast();
00205
00209 void setActiveTab( const QString& text );
00210
00214 void clear();
00215
00216 QSize sizeHint() const;
00217
00218 signals:
00219
00223 void tabChanged( const QString& _text );
00224
00235 void tabMoved( unsigned tab, unsigned target );
00236
00241 void contextMenu( const QPoint& pos );
00242
00246 void doubleClicked();
00247
00248 protected slots:
00249 void autoScrollBack();
00250 void autoScrollForward();
00251
00252 protected:
00253 virtual void paintEvent ( QPaintEvent* ev );
00254 virtual void resizeEvent( QResizeEvent* ev );
00255 virtual void mousePressEvent ( QMouseEvent* ev );
00256 virtual void mouseReleaseEvent ( QMouseEvent* ev );
00257 virtual void mouseDoubleClickEvent ( QMouseEvent* ev );
00258 virtual void mouseMoveEvent( QMouseEvent* ev );
00259
00260 private:
00261 KoTabBarPrivate *d;
00262
00263
00264 KoTabBar( const KoTabBar& );
00265 KoTabBar& operator=( const KoTabBar& );
00266 };
00267
00268
00269 #endif // kotabbar_h
This file is part of the documentation for lib Library Version 1.4.2.