From: Kevin Krammer Date: Mon, 21 Jan 2013 20:13:22 +0000 (+0100) Subject: Ported scroll bar X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d1e9f9e0d9eb916038a4dbd7612d8e42a53c1043;p=konrad%2FDeclarativeWidgets.git Ported scroll bar --- diff --git a/lib/declarativescrollbar.cpp b/lib/declarativescrollbar.cpp deleted file mode 100644 index 0c242b4..0000000 --- a/lib/declarativescrollbar.cpp +++ /dev/null @@ -1,29 +0,0 @@ -/* - Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com - Author: Kevin Krammer, krake@kdab.com - Author: Tobias Koenig, tokoe@kdab.com - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#include "declarativescrollbar_p.h" - -DeclarativeScrollBar::DeclarativeScrollBar(QObject *parent) - : DeclarativeWidgetProxy(parent) -{ - connectAllSignals(m_proxiedObject, this); -} - -CUSTOM_METAOBJECT(DeclarativeScrollBar, QScrollBar) diff --git a/lib/declarativescrollbar_p.h b/lib/declarativescrollbar_p.h deleted file mode 100644 index 9046d52..0000000 --- a/lib/declarativescrollbar_p.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com - Author: Kevin Krammer, krake@kdab.com - Author: Tobias Koenig, tokoe@kdab.com - - 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*/ - -#ifndef DECLARATIVESCROLLBAR_P_H -#define DECLARATIVESCROLLBAR_P_H - -#include "declarativewidgetproxy_p.h" - -#include - -class DeclarativeScrollBar : public DeclarativeWidgetProxy -{ - DECLARATIVE_OBJECT - - public: - explicit DeclarativeScrollBar(QObject *parent = 0); -}; - -#endif diff --git a/lib/declarativewidgetsdocument.cpp b/lib/declarativewidgetsdocument.cpp index b0958ef..8c98bfd 100644 --- a/lib/declarativewidgetsdocument.cpp +++ b/lib/declarativewidgetsdocument.cpp @@ -42,7 +42,6 @@ #include "declarativemessagebox_p.h" #include "declarativeprogressbar_p.h" #include "declarativescrollareaextension_p.h" -#include "declarativescrollbar_p.h" #include "declarativeseparator_p.h" #include "declarativestackedlayout_p.h" #include "declarativestackedwidgetextension_p.h" @@ -74,6 +73,7 @@ #include #include #include +#include #include #include #include @@ -112,7 +112,6 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject qmlRegisterType("QtGui", 1, 0, "Label"); qmlRegisterType("QtGui", 1, 0, "LCDNumber"); qmlRegisterType("QtGui", 1, 0, "ProgressBar"); - qmlRegisterType("QtGui", 1, 0, "ScrollBar"); qmlRegisterType(); qmlRegisterType(); qmlRegisterType("QtGui", 1, 0, "TextBrowser"); @@ -163,6 +162,7 @@ DeclarativeWidgetsDocument::DeclarativeWidgetsDocument(const QUrl &url, QObject qmlRegisterExtendedType("QtGui", 1, 0, "PushButton"); qmlRegisterExtendedType("QtGui", 1, 0, "RadioButton"); qmlRegisterExtendedType("QtGui", 1, 0, "ScrollArea"); + qmlRegisterExtendedType("QtGui", 1, 0, "ScrollBar"); qmlRegisterExtendedType("QtGui", 1, 0, "Slider"); qmlRegisterExtendedType("QtGui", 1, 0, "StackedWidget"); qmlRegisterExtendedType("QtGui", 1, 0, "SpinBox"); diff --git a/lib/lib.pro b/lib/lib.pro index c52804c..b408619 100644 --- a/lib/lib.pro +++ b/lib/lib.pro @@ -32,7 +32,6 @@ HEADERS = \ declarativeobjectproxy_p.h \ declarativeprogressbar_p.h \ declarativescrollareaextension_p.h \ - declarativescrollbar_p.h \ declarativeseparator_p.h \ declarativestackedlayout_p.h \ declarativestackedwidgetextension_p.h \ @@ -75,7 +74,6 @@ SOURCES = \ declarativeobjectextension.cpp \ declarativeprogressbar.cpp \ declarativescrollareaextension.cpp \ - declarativescrollbar.cpp \ declarativeseparator.cpp \ declarativestackedlayout.cpp \ declarativestackedwidgetextension.cpp \