Added build script of Debian
[qtrapids] / src / client / ColumnSelectorDialog.cpp
index 274b841..4fe9c30 100644 (file)
@@ -1,11 +1,9 @@
 /***************************************************************************
- *   Copyright (C) 2009 by Lassi Väätämöinen   *
- *   lassi.vaatamoinen@ixonos.com   *
+ *   Copyright (C) 2010 by Ixonos Plc   *
  *                                                                         *
  *   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  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
+ *   the Free Software Foundation; version 2 of the License.               *
  *                                                                         *
  *   This program is distributed in the hope that it will be useful,       *
  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
@@ -28,7 +26,7 @@
 #include <QAbstractButton>
 
 #ifdef Q_WS_MAEMO_5
-       #include <QtMaemo5/QMaemo5KineticScroller>
+       #include <QAbstractKineticScroller>
 #endif
 
 #include "ColumnSelectorDialog.h"
 
 ColumnSelectorDialog::ColumnSelectorDialog(QTreeWidget *treewidget, QWidget* parent, Qt::WindowFlags f) :
        QDialog(parent, f), // Superclass construct
-       dialogButtons_(0),
-       grid_(0),
+       dialogButtons_(NULL),
+       grid_(NULL),
        treeWidget_(treewidget),
+       scroller_(NULL),
        checkBoxes_()
 {
-       /// @TODO Kineticscrolling (Fingerscrollable does not work in Qt 4.6, only in 4.5)      
        QScrollArea *scrollArea = new QScrollArea(this);
 
 #ifdef Q_WS_MAEMO_5
-       new QMaemo5KineticScroller(scrollArea);
+       /// @todo Kineticscrolling (property "FingerScrollable" does not work in Qt 4.6, only in 4.5)   
+       scroller_ = scrollArea->property("kineticScroller").value<QAbstractKineticScroller*>();
+
+       if (!scroller_)                                                               
+               qFatal("This example only works with QMaemo5Style as the default style for all QAbstractScrollAreas"); 
 #endif
 
        scrollArea->setWidgetResizable(true);