Commit f9d8bf81 authored by Artur Duque de Souza's avatar Artur Duque de Souza
Browse files

Remove support for QEdje on Plasma

QEdje is not being maintained anymore and there aren't
many users of this scriptengine too. QML will be a good
replacement (though it will not support E17 widgets).

svn path=/trunk/KDE/kdebase/workspace/; revision=1147829
parent 5c327368
......@@ -7,7 +7,6 @@ set(cmakeFiles FindCkConnector.cmake
FindGooglegadgets.cmake
FindLibXKlavier.cmake
FindPAM.cmake
FindQEdje.cmake
FindSensors.cmake
PkgConfigGetVar.cmake
UnixAuth.cmake )
......
# - Try to find QEdje and QZion
# Once done this will define
#
# QEDJE_FOUND - system has QEdje
# QZION_INCLUDE_DIRS - the QZion include directory
# QEDJE_INCLUDE_DIRS - the QEdje include directory
# QZION_LIBRARIES - Link these to use QZion
# QEDJE_LIBRARIES - Link these to use QEdje
# QZION_CFLAGS_OTHER - Compiler switches required for using QZion
# QEDJE_CFLAGS_OTHER - Compiler switches required for using QEdje
#
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
if( NOT WIN32 )
find_package(PkgConfig)
pkg_check_modules(PC_QEdje qzion>=0.4.0 qedje>=0.4.0)
endif( NOT WIN32 )
# use this just to create a nice message at FindPackageHandleStandardArgs
if (PC_QEdje_FOUND)
FIND_PATH(QEDJE_QEdje_INCLUDE_DIR qedje.h
HINTS
${PC_QEdje_INCLUDE_DIRS}
)
FIND_PATH(QEDJE_QZion_INCLUDE_DIR qzion.h
HINTS
${PC_QEdje_INCLUDE_DIRS}
)
FIND_LIBRARY(QEDJE_QEdje_LIBRARY NAMES qedje
PATHS
${PC_QEdje_LIBRARY_DIRS}
)
FIND_LIBRARY(QEDJE_QZion_LIBRARY NAMES qzion
PATHS
${PC_QEdje_LIBRARY_DIRS}
)
SET(QEDJE_LIBRARIES ${QEDJE_QEdje_LIBRARY} ${QEDJE_QZion_LIBRARY} CACHE INTERNAL "All libraries needed for QEdje")
SET(QEDJE_INCLUDE_DIRS ${QEDJE_QEdje_INCLUDE_DIR} ${QEDJE_QZion_INCLUDE_DIR} CACHE INTERNAL "All include directories needed for QEdje")
else (PC_QEdje_FOUND)
MESSAGE(STATUS "Could not find QZion and/or QEdje. Please download them here (http://code.openbossa.org/projects/qedje/pages/Home).")
endif (PC_QEdje_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(QEdje DEFAULT_MSG QEDJE_LIBRARIES QEDJE_INCLUDE_DIRS)
# show QEdje_LIBRARY and QZion_LIBRARY variables only in the advanced view
MARK_AS_ADVANCED(QEDJE_QEdje_LIBRARY QEDJE_QZion_LIBRARY QEDJE_QEdje_INCLUDE_DIR QEDJE_QZion_INCLUDE_DIR)
......@@ -11,7 +11,3 @@ endif (PythonSupport_FOUND)
if(GOOGLEGADGETS_FOUND)
macro_optional_add_subdirectory(google_gadgets)
endif(GOOGLEGADGETS_FOUND)
if(QEDJE_FOUND)
macro_optional_add_subdirectory(qedjescript)
endif(QEDJE_FOUND)
# Project's name
project(plasma-qedje-script)
include_directories(${QEDJE_INCLUDE_DIRS})
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
# We add our source code here
set(package_SRCS qedje_package.cpp)
set(qedjescript_SRCS qedje_applet.cpp)
kde4_add_ui_files(qedjescript_SRCS qedjeConfig.ui)
# Now make sure all files get to the right place
kde4_add_plugin(plasma_appletscript_qedje ${qedjescript_SRCS})
target_link_libraries(plasma_appletscript_qedje
plasma ${KDE4_KDEUI_LIBS} ${QEDJE_LIBRARIES})
kde4_add_plugin(plasma_package_qedje ${package_SRCS})
target_link_libraries(plasma_package_qedje
plasma ${QEDJE_LIBRARIES} ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS})
install(TARGETS plasma_appletscript_qedje
DESTINATION ${PLUGIN_INSTALL_DIR})
install(TARGETS plasma_package_qedje
DESTINATION ${PLUGIN_INSTALL_DIR})
install(FILES plasma-appletscript-qedje.desktop
DESTINATION ${SERVICES_INSTALL_DIR})
install(FILES plasma-packagestructure-qedje.desktop
DESTINATION ${SERVICES_INSTALL_DIR})
#! /usr/bin/env bash
$EXTRACTRC *.ui >> rc.cpp
$XGETTEXT *.cpp -o $podir/plasma_appletscriptengine_qedjescripts.pot
rm -f rc.cpp
[Desktop Entry]
Name=QEdje
Name[ar]=QEdje
Name[be@latin]=QEdje
Name[bg]=QEdje
Name[bn]=QEdje
Name[bn_IN]=QEdje
Name[ca]=QEdje
Name[ca@valencia]=QEdje
Name[cs]=QEdje
Name[csb]=QEdje
Name[da]=QEdje
Name[de]=QEdje
Name[el]=QEdje
Name[en_GB]=QEdje
Name[eo]=QEdje
Name[es]=QEdje
Name[et]=QEdje
Name[eu]=QEdje
Name[fi]=QEdje
Name[fr]=QEdje
Name[fy]=QEdje
Name[ga]=QEdje
Name[gl]=QEdje
Name[gu]=QEdje
Name[he]=QEdje
Name[hi]=क्यूईडीजेई
Name[hne]=क्यूईडीजेई
Name[hr]=QEdje
Name[hu]=QEdje
Name[ia]=QEdje
Name[id]=QEdje
Name[is]=QEdje
Name[it]=QEdje
Name[ja]=QEdje
Name[kk]=QEdje
Name[km]=QEdje
Name[kn]=QEdje
Name[ko]=QEdje
Name[ku]=QEdje
Name[lt]=QEdje
Name[lv]=QEdje
Name[mai]=QEdje
Name[ml]=ക്യുഎട്ജ്
Name[mr]=QEdje
Name[nb]=QEdje
Name[nds]=QEdje
Name[nl]=QEdje
Name[nn]=QEdje
Name[or]=QEdje
Name[pa]=QEdje
Name[pl]=QEdje
Name[pt]=QEdje
Name[pt_BR]=QEdje
Name[ro]=QEdje
Name[ru]=QEdje
Name[si]=JavaScript මෙවලම්
Name[sk]=QEdje
Name[sl]=QEdje
Name[sr]=КуЕдје
Name[sr@ijekavian]=КуЕдје
Name[sr@ijekavianlatin]=QEdje
Name[sr@latin]=QEdje
Name[sv]=QEdje
Name[ta]=QEdje
Name[tg]=QEdje
Name[th]=QEdje
Name[tr]=QEdje
Name[uk]=QEdje
Name[x-test]=xxQEdjexx
Name[zh_CN]=QEdje
Name[zh_TW]=QEdje
Comment=QEdje Gadgets
Comment[ar]=ودجات QEdje
Comment[be@latin]=Gadžety „QEdje”
Comment[bg]=Джаджи QEdje
Comment[bn_IN]=QEdje Gadgets
Comment[ca]=QEdje Gadgets
Comment[ca@valencia]=QEdje Gadgets
Comment[cs]=QEdje Gadgets
Comment[csb]=Gadżetë QEdje
Comment[da]=QEdje Gadgets
Comment[de]=QEdje-Miniprogramme
Comment[el]=Συστατικά QEdje
Comment[en_GB]=QEdje Gadgets
Comment[eo]=QEdje umoj
Comment[es]=Gadgets de QEdje
Comment[et]=QEdje Gadgets
Comment[eu]=QEdje gadget-ak
Comment[fi]=QEdje-sovelmat
Comment[fr]=Gadgets QEdje
Comment[fy]=QEdje Gadgets
Comment[ga]=Giuirléidí QEdje
Comment[gl]=Gadgets de QEdje
Comment[gu]=QEdje ગેજેટ્સ
Comment[he]=ג'אדג'טים של QEdje
Comment[hi]=क्यूईडीजेई गज़ेट
Comment[hne]=क्यूईडीजेई गेजेट
Comment[hr]=QEdje gadgeti
Comment[hu]=QEdje Gadgets
Comment[ia]=Gadgets QEdje
Comment[id]=QEdje Gadget
Comment[is]=QEdje dót
Comment[it]=Gadget di QEdje
Comment[ja]=QEdje ガジェット
Comment[kk]=QEdje аспаптары
Comment[km]=ធាតុក្រាហ្វិក QEdje
Comment[kn]=QEdje ಯಂತ್ರೋಪಕರಣಗಳು
Comment[ko]=QEdje 가젯
Comment[ku]=Nûçeyên QEdje
Comment[lt]=QEdje prietaisėliai
Comment[lv]=QEdje sīkrīki
Comment[ml]=ക്യുഎട്ജ് ഗാഡ്ജറ്റുകള്‍
Comment[mr]=QEdje उपकरण
Comment[nb]=QEdje-greier
Comment[nds]=QEdje-Lüttprogrammen
Comment[nl]=QEdje-gadgets
Comment[nn]=QEdje-tenester
Comment[or]=QEdje ମେସିନଗୁଡ଼ିକ
Comment[pa]=QEdje ਗੈਜ਼ਿੱਟ
Comment[pl]=Gadżety QEdje
Comment[pt]=Itens do QEdje
Comment[pt_BR]=Gadgets do QEdje
Comment[ro]=Gadgeturi QEdje
Comment[ru]=Гаджеты QEdje
Comment[si]=QEdje ගැජට්ටු
Comment[sk]=QEdje Gadgets
Comment[sl]=Gradniki QEdje
Comment[sr]=Куедје справице
Comment[sr@ijekavian]=Куедје справице
Comment[sr@ijekavianlatin]=Qedje spravice
Comment[sr@latin]=Qedje spravice
Comment[sv]=QEdje-grejer
Comment[ta]=QEdje Gadgets
Comment[tg]=Механизмҳои QEdje
Comment[th]=เครื่องมือ QEdje
Comment[tr]=QEdje Programcıkları
Comment[uk]=Елементи QEdje
Comment[x-test]=xxQEdje Gadgetsxx
Comment[zh_CN]=QEdje 小工具
Comment[zh_TW]=QEdje 小玩意
Type=Service
X-KDE-ServiceTypes=Plasma/ScriptEngine
X-KDE-Library=plasma_appletscript_qedje
X-EngineName=qedjescript
X-Plasma-API=qedjescript
X-Plasma-ComponentTypes=Applet
X-Plasma-PackageFormat=qedjescript
X-KDE-PluginInfo-Author=Artur de Souza
X-KDE-PluginInfo-Email=morpheuz@gmail.com
X-KDE-PluginInfo-Name=qedjescript
X-KDE-PluginInfo-Version=0.1
X-KDE-PluginInfo-Website=http://dev.openbossa.org/trac/qedje
X-KDE-PluginInfo-Category=Examples
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=true
[Desktop Entry]
Name=QEdje Gadgets
Name[ar]=ودجات QEdje
Name[be@latin]=Gadžety „QEdje”
Name[bg]=Джаджи QEdje
Name[bn_IN]=QEdje Gadgets
Name[ca]=QEdje Gadgets
Name[ca@valencia]=QEdje Gadgets
Name[cs]=QEdje Gadgets
Name[csb]=Gadżetë QEdje
Name[da]=QEdje Gadgets
Name[de]=QEdje-Miniprogramme
Name[el]=Συστατικά QEdje
Name[en_GB]=QEdje Gadgets
Name[eo]=QEdje Akcesoraĵoj
Name[es]=Gadgets de QEdje
Name[et]=QEdje Gadgets
Name[eu]=QEdje gadget-ak
Name[fi]=QEdje-sovelmat
Name[fr]=Gadgets QEdje
Name[fy]=QEdje Gadgets
Name[ga]=Giuirléidí QEdje
Name[gl]=Gadgets de QEdje
Name[gu]=QEdje ગેજેટ્સ
Name[he]=ג'אדג'טים של QEdje
Name[hi]=क्यूईडीजेई गज़ेट
Name[hne]=क्यूईडीजेई गेजेट
Name[hr]=QEdje gadgeti
Name[hu]=QEdje Gadgets
Name[ia]=Gadgets QEdje
Name[id]=QEdje Gadget
Name[is]=QEdje dót
Name[it]=Gadget di QEdje
Name[ja]=QEdje ガジェット
Name[kk]=QEdje аспаптары
Name[km]=ធាតុក្រាហ្វិក QEdje
Name[kn]=QEdje ಯಂತ್ರೋಪಕರಣಗಳು
Name[ko]=QEdje 가젯
Name[ku]=Nûçeyên QEdje
Name[lt]=QEdje prietaisėliai
Name[lv]=QEdje sīkrīki
Name[ml]=ക്യുഎട്ജ് ഗാഡ്ജറ്റുകള്‍
Name[mr]=QEdje उपकरण
Name[nb]=QEdje Gadgets
Name[nds]=QEdje-Lüttprogrammen
Name[nl]=QEdje Gadgets
Name[nn]=QEdje-tenester
Name[or]=QEdje ମେସିନ
Name[pa]=QEdje ਗੈਜ਼ਿੱਟ
Name[pl]=Gadżety QEdje
Name[pt]=Itens do QEdje
Name[pt_BR]=Gadgets do QEdje
Name[ro]=Gadgeturi QEdje
Name[ru]=Гаджеты QEdje
Name[si]=QEdje Gadgets
Name[sk]=QEdje Gadgets
Name[sl]=Gradniki QEdje
Name[sr]=Куедје справице
Name[sr@ijekavian]=Куедје справице
Name[sr@ijekavianlatin]=Qedje spravice
Name[sr@latin]=Qedje spravice
Name[sv]=QEdje-grejer
Name[ta]=QEdje Gadgets
Name[tg]=Механизмҳои QEdje
Name[th]=เครื่องมือ QEdje
Name[tr]=QEdje Programcıkları
Name[uk]=Елементи QEdje
Name[x-test]=xxQEdje Gadgetsxx
Name[zh_CN]=QEdje 小工具
Name[zh_TW]=QEdje 小玩意
Comment=QEdje Gadget
Comment[ar]=ودجة QEdje
Comment[be@latin]=Gadžet „QEdje”
Comment[bg]=Джаджа QEdje
Comment[bn_IN]=QEdje Gadget
Comment[ca]=QEdje Gadget
Comment[ca@valencia]=QEdje Gadget
Comment[cs]=QEdje Gadget
Comment[csb]=Gadżet QEdje
Comment[da]=QEdje Gadget
Comment[de]=QEdje-Miniprogramm
Comment[el]=Συστατικά QEdje
Comment[en_GB]=QEdje Gadget
Comment[eo]=QEdje Akcesoraĵo
Comment[es]=Gadget de QEdje
Comment[et]=QEdje Gadgets
Comment[eu]=QEdje gadget-a
Comment[fi]=QEdje-sovelma
Comment[fr]=Gadget QEdje
Comment[fy]=QEdje Gadget
Comment[ga]=Giuirléid QEdje
Comment[gl]=Gadget de QEdje
Comment[gu]=QEdje ગેજેટ
Comment[he]=ג'אדג'ט של QEdje
Comment[hi]=क्यूईडीजेई गज़ेट
Comment[hne]=क्यूईडीजेई गेजेट
Comment[hr]=QEdje gadgeti
Comment[hu]=QEdje Gadget
Comment[ia]=Gadget QEdje
Comment[id]=QEdje Gadget
Comment[is]=QEdje dót
Comment[it]=Gadget QEdje
Comment[ja]=QEdje ガジェット
Comment[kk]=QEdje аспабы
Comment[km]=ធាតុក្រាហ្វិក QEdje
Comment[kn]=QEdje ಯಂತ್ರೋಪಕರಣಗಳು
Comment[ko]=QEdje 가젯
Comment[ku]=Nûçeyê QEdje
Comment[lt]=QEdje prietaisėlis
Comment[lv]=QEdje sīkrīks
Comment[ml]=ക്യുഎട്ജ് ഗാഡ്ജറ്റ്
Comment[mr]=QEdje उपकरण
Comment[nb]=QEedje-greie
Comment[nds]=QEdje-Lüttprogramm
Comment[nl]=QEdje-gadget
Comment[nn]=QEdje-teneste
Comment[or]=QEdje ମେସିନ
Comment[pa]=QEdje ਗੈਜ਼ਿੱਟ
Comment[pl]=Gadżet QEdje
Comment[pt]=Item do QEdje
Comment[pt_BR]=Gadget do QEdje
Comment[ro]=Gadget QEdje
Comment[ru]=Гаджет QEdje
Comment[si]=QEdje ගැජට්ටු
Comment[sk]=QEdje Gadget
Comment[sl]=Gradnik QEdje
Comment[sr]=Куедје справица
Comment[sr@ijekavian]=Куедје справица
Comment[sr@ijekavianlatin]=Qedje spravica
Comment[sr@latin]=Qedje spravica
Comment[sv]=QEdje-grejer
Comment[ta]=QEdje Gadget
Comment[tg]=Механизмҳои QEdje
Comment[th]=เครื่องมือ QEdje
Comment[tr]=QEdje Programcığı
Comment[uk]=Елемент QEdje
Comment[x-test]=xxQEdje Gadgetxx
Comment[zh_CN]=QEdje 小工具
Comment[zh_TW]=QEdje 小玩意
Type=Service
X-EngineName=qedjescript
X-KDE-PluginInfo-Name=qedjescript
X-KDE-ServiceTypes=Plasma/PackageStructure
X-KDE-Library=plasma_package_qedje
X-Plasma-PackageFileFilter=*.edj
X-Plasma-API=qedjescript
<ui version="4.0" >
<class>qedjeConfig</class>
<widget class="QWidget" name="qedjeConfig" >
<property name="windowModality" >
<enum>Qt::NonModal</enum>
</property>
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>302</height>
</rect>
</property>
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize" >
<size>
<width>387</width>
<height>302</height>
</size>
</property>
<property name="maximumSize" >
<size>
<width>387</width>
<height>302</height>
</size>
</property>
<property name="focusPolicy" >
<enum>Qt::ClickFocus</enum>
</property>
<property name="windowTitle" >
<string>QEdje Config</string>
</property>
<widget class="QLabel" name="label_2" >
<property name="geometry" >
<rect>
<x>10</x>
<y>15</y>
<width>71</width>
<height>20</height>
</rect>
</property>
<property name="font" >
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text" >
<string>Edje group:</string>
</property>
<property name="scaledContents" >
<bool>false</bool>
</property>
</widget>
<widget class="QComboBox" name="edje_groups" >
<property name="geometry" >
<rect>
<x>80</x>
<y>10</y>
<width>301</width>
<height>28</height>
</rect>
</property>
</widget>
<widget class="QFrame" name="preview" >
<property name="geometry" >
<rect>
<x>10</x>
<y>60</y>
<width>368</width>
<height>231</height>
</rect>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow" >
<enum>QFrame::Raised</enum>
</property>
</widget>
<widget class="QLabel" name="previewLabel" >
<property name="geometry" >
<rect>
<x>10</x>
<y>40</y>
<width>59</width>
<height>20</height>
</rect>
</property>
<property name="text" >
<string>Preview</string>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>
/***************************************************************************
* Copyright (C) 2008 by Artur Duque de Souza <morpheuz@gmail.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 <qedje_applet.h>
#include <QtGui/QGraphicsProxyWidget>
#include <Plasma/Package>
#include <Plasma/Applet>
using namespace Plasma;
K_EXPORT_PLASMA_APPLETSCRIPTENGINE(qedjescripts, QEdjeAppletScript)
QEdjeAppletScript::QEdjeAppletScript(QObject *parent, const QVariantList &args)
: Plasma::AppletScript(parent), dialog(0), config_widget(0),
m_edje_file(""), m_edje_group(""), currentIndex(0)
{
Q_UNUSED(args);
}
QEdjeAppletScript::~QEdjeAppletScript()
{
// the proxy gets the ownership of the applet
// so we need to free the applet in order to avoid segfaults later
proxy->setWidget(0);
// deleting setting's dialog stuff
if (dialog) {
delete previewWorld;
delete previewCanvas;
delete dialog;
}
delete world;
delete canvas;
}
void QEdjeAppletScript::resizeAll(QSize size)
{
// minimum required size
if (size == QSize(0, 0))
size = QSize(100, 100);
// resize the applet and qzion's canvas
QSizeF new_size = applet()->size() - applet()->contentsRect().size() + size;
applet()->resize(new_size.toSize());
canvas->resize(size);
}
void QEdjeAppletScript::setup_canvas()
{
// we need a proxy so we can put qzion inside the applet
proxy = new QGraphicsProxyWidget(applet());
canvas = new QZionCanvas();
// create the canvasd (qzion) needed by qedje
proxy->setWidget(canvas->widget());
canvas->show();
// minimum size
canvas->resize(100, 100);
}
bool QEdjeAppletScript::init()
{
setup_canvas();
// set plasma options
applet()->setBackgroundHints(Applet::TranslucentBackground);
setHasConfigurationInterface(true);
// get config info