install tablet specific components in platformcomponents

This commit is contained in:
Marco Martin 2011-11-07 18:06:18 +01:00
parent 2e5afa765b
commit 06bbb405c5
5 changed files with 202 additions and 1 deletions

View File

@ -24,3 +24,25 @@ target_link_libraries(plasmacomponentsplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARA
install(TARGETS plasmacomponentsplugin DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/components)
install(DIRECTORY qml/ DESTINATION ${IMPORTS_INSTALL_DIR}/org/kde/plasma/components)
ADD_DEFINITIONS(-DTOUCH)
set(plasmacomponentstouch_SRCS
plasmacomponentsplugin.cpp
qrangemodel.cpp
enums.cpp
qmenu.cpp
qmenuitem.cpp
kdialogproxy.cpp
)
add_library(plasmacomponentstouchplugin SHARED ${plasmacomponentstouch_SRCS})
target_link_libraries(plasmacomponentstouchplugin ${QT_QTCORE_LIBRARY} ${QT_QTDECLARATIVE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDEUI_LIBRARY})
install(TARGETS plasmacomponentstouchplugin DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
install(DIRECTORY qml/ DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)
install(DIRECTORY platformcomponents/touch/ DESTINATION ${PLUGIN_INSTALL_DIR}/platformimports/touch/org/kde/plasma/components)

View File

@ -20,6 +20,7 @@
#include "plasmacomponentsplugin.h"
#include <QtDeclarative/qdeclarative.h>
#include <QtDeclarative/QDeclarativeEngine>
#include "qrangemodel.h"
@ -28,7 +29,6 @@
#include "qmenuitem.h"
#include "kdialogproxy.h"
void PlasmaComponentsPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.plasma.components"));
@ -38,7 +38,9 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri)
qmlRegisterType<QMenuProxy>(uri, 0, 1, "ContextMenu");
qmlRegisterType<QMenuItem>(uri, 0, 1, "MenuItem");
#ifndef TOUCH
qmlRegisterType<KDialogProxy>(uri, 0, 1, "QueryDialog");
#endif
qmlRegisterType<Plasma::QRangeModel>(uri, 0, 1, "RangeModel");

View File

@ -0,0 +1,74 @@
/*
* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
* Copyright (C) 2011 by Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library 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.
*/
import QtQuick 1.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {
id: main
state: parent.state
PlasmaCore.FrameSvgItem {
id: shadow
anchors {
fill: parent
leftMargin: -margins.left
topMargin: -margins.top
rightMargin: -margins.right
bottomMargin: -margins.bottom
}
imagePath: "widgets/button"
prefix: "shadow"
}
states: [
State {
name: "shadow"
PropertyChanges {
target: shadow
opacity: 1
}
PropertyChanges {
target: hover
opacity: 0
prefix: "hover"
}
},
State {
name: "hidden"
PropertyChanges {
target: shadow
opacity: 0
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "opacity"
duration: 250
easing.type: Easing.OutQuad
}
}
]
}

View File

@ -0,0 +1,65 @@
/*
* Copyright (C) 2011 by Daker Fernandes Pinheiro <dakerfp@gmail.com>
* Copyright (C) 2011 by Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, 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 Library General Public License for more details
*
* You should have received a copy of the GNU Library 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.
*/
import QtQuick 1.0
import org.kde.plasma.core 0.1 as PlasmaCore
Item {
id: main
state: parent.state
PlasmaCore.SvgItem {
id: shadow
svg: PlasmaCore.Svg {
id: shadowSvg
imagePath: "widgets/actionbutton"
}
elementId: "shadow"
anchors.fill: parent
}
states: [
State {
name: "shadow"
PropertyChanges {
target: shadow
opacity: 1
}
},
State {
name: "hidden"
PropertyChanges {
target: shadow
opacity: 0
}
}
]
transitions: [
Transition {
PropertyAnimation {
properties: "opacity"
duration: 250
easing.type: Easing.OutQuad
}
}
]
}

View File

@ -0,0 +1,38 @@
plugin plasmacomponentstouchplugin
BusyIndicator 0.1 BusyIndicator.qml
Button 0.1 Button.qml
ButtonColumn 0.1 ButtonColumn.qml
ButtonGroup 0.1 ButtonGroup.js
ButtonRow 0.1 ButtonRow.qml
CheckBox 0.1 CheckBox.qml
FlashingLabel 0.1 FlashingLabel.qml
Frame 0.1 Frame.qml
Highlight 0.1 Highlight.qml
IconWidget 0.1 IconWidget.qml
Label 0.1 Label.qml
ProgressBar 0.1 ProgressBar.qml
PushButton 0.1 PushButton.qml
RadioButton 0.1 RadioButton.qml
ScrollBar 0.1 ScrollBar.qml
ScrollDecorator 0.1 ScrollDecorator.qml
Slider 0.1 Slider.qml
Switch 0.1 Switch.qml
TextArea 0.1 TextArea.qml
TextField 0.1 TextField.qml
ToolBar 0.1 ToolBar.qml
ToolButton 0.1 ToolButton.qml
ListItem 0.1 ListItem.qml
CommonDialog 0.1 CommonDialog.qml
QueryDialog 0.1 QueryDialog.qml
SelectionDialog 0.1 SelectionDialog.qml
Window 0.1 Window.qml
Page 0.1 Page.qml
PageStack 0.1 PageStack.qml
TabBar 0.1 TabBar.qml
TabButton 0.1 TabButton.qml
TabGroup 0.1 TabGroup.qml
SectionScroller 0.1 SectionScroller.qml