summaryrefslogtreecommitdiff
path: root/src/tabbar.h
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2009-10-09 02:08:01 +0200
committerAndrea Diamantini <adjam7@gmail.com>2009-10-09 02:08:01 +0200
commit9ca2eb6a61ea5307923cab67c789e1c0ba2086d5 (patch)
treec9e79ffcd2c0e2a777bdd883757cfba8af5586b4 /src/tabbar.h
parent- Some things in the right position (diff)
downloadrekonq-9ca2eb6a61ea5307923cab67c789e1c0ba2086d5.tar.xz
HUGE COMMIT
1) moved lionel preview implementation to tabbar class. This to simplify MainView management AND to use TabBar::tabSizeHint(). Now previews are of the same width of the tab :) 2) cleaned a bit TabBar code 3) fixed scrollButton bug, via a "rude" HACK: an hidden toolbutton shown when tabs are more than.. a number! 4) Changed tabbar::tabsizehint implementation using 2 stupid constants: BASE_WIDTH_DIVISOR and MIN_WIDTH_DIVISOR. Just play with them to modify tab dimension and resize quite all :) Good night, guys!
Diffstat (limited to 'src/tabbar.h')
-rw-r--r--src/tabbar.h23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/tabbar.h b/src/tabbar.h
index 56e2d230..dd08f7b8 100644
--- a/src/tabbar.h
+++ b/src/tabbar.h
@@ -31,12 +31,22 @@
#define TABBAR_H
+// Local Includes
+#include "mainview.h"
+
+// Qt Includes
+#include <QPointer>
+
// KDE Includes
#include <KTabBar>
// Forward Declarations
class QPoint;
class QToolButton;
+class QMouseEvent;
+class QEvent;
+
+class KPassivePopup;
/**
@@ -49,9 +59,11 @@ class TabBar : public KTabBar
Q_OBJECT
public:
- TabBar(QWidget *parent = 0);
+ TabBar(MainView *parent = 0);
~TabBar();
+ void showTabPreview(int tab);
+
signals:
void cloneTab(int index);
void closeTab(int index);
@@ -65,7 +77,9 @@ protected:
*/
virtual QSize tabSizeHint(int index) const;
virtual void tabLayoutChange();
-
+ virtual void mouseMoveEvent(QMouseEvent *event);
+ virtual void leaveEvent(QEvent *event);
+
private slots:
void cloneTab();
void closeTab();
@@ -77,13 +91,16 @@ private slots:
private:
void setTabButtonPosition();
- QWidget *m_parent;
+ MainView *m_parent;
QToolButton *m_addTabButton;
/**
* the index in which we are seeing a Context menu
*/
int m_actualIndex;
+
+ QPointer<KPassivePopup> m_previewPopup;
+ int m_currentTabPreview;
};
#endif