┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/ktreeview_p.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-05-08 20:44:26 +0000
committerPeter Penz <[email protected]>2008-05-08 20:44:26 +0000
commitfc97fa250d89c620a99d58d0a787a648d680fb31 (patch)
treeed638ca94b4c6751e0ed9d09abe7fd82367a8d80 /src/ktreeview_p.h
parenta9b29101258e949d388038f97fe714384320951c (diff)
* If one item is selected and the item is (at least partly) visible, assure that an automatic horizontal scrolling is done so that the item gets fully visible.
* Use QTimeLine instead of QTimer + value CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=805596
Diffstat (limited to 'src/ktreeview_p.h')
-rw-r--r--src/ktreeview_p.h50
1 files changed, 18 insertions, 32 deletions
diff --git a/src/ktreeview_p.h b/src/ktreeview_p.h
index eb71999f7..1cfa463cd 100644
--- a/src/ktreeview_p.h
+++ b/src/ktreeview_p.h
@@ -1,5 +1,6 @@
/***************************************************************************
* Copyright (C) 2008 by <haraldhv (at) stud.ntnu.no> *
+ * Copyright (C) 2008 by <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -17,47 +18,32 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
***************************************************************************/
-#ifndef _KTREEVIEW_P_H_
-#define _KTREEVIEW_P_H_
+#ifndef KTREEVIEW_P_H
+#define KTREEVIEW_P_H
-#include <QTimer>
#include <QObject>
#include "ktreeview.h"
+class QTimer;
+class QTimeLine;
+
class KTreeView::KTreeViewPrivate : public QObject
{
- Q_OBJECT
-
-
-
- public Q_SLOTS:
- void autoScrollTimeout();
- void considerAutoScroll();
-
- public:
-
- KTreeViewPrivate(KTreeView *parent);
- //~KTreeViewPrivate();
- KTreeView *parent;
-
- //Function for start scrolling towards a certain position
- void setScrollTowards( int scrollTowards );
-
- //Privates for doing the scrolling
- QTimer scrollTimer;
- QTimer considerDelayTimer;
- bool autoHorizontalScroll;
- int scrollTowards;
+ Q_OBJECT
- //Constants
- const int scrollPixels;
- const int scrollDelay;
- const int leftSideMargin;
- const int considerDelay;
- const QPoint topLeftPoint;
+public Q_SLOTS:
+ void startScrolling();
+ void updateVerticalScrollBar(int value);
+public:
+ KTreeViewPrivate(KTreeView *parent);
+ KTreeView *parent;
+ void setScrollTowards( int scrollTowards );
+ bool autoHorizontalScroll;
+ QTimeLine *timeLine;
+ QTimer *startScrollTimer;
};
-#endif /* ifndef _KTREEVIEW_P_H_ */
+#endif /* ifndef KTREEVIEW_P_H */