mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 02:01:38 +00:00
parent
6a1d07de86
commit
0ca1606f10
14
libports/src/test/qt5/qpluginwidget/config.plugin
Normal file
14
libports/src/test/qt5/qpluginwidget/config.plugin
Normal file
@ -0,0 +1,14 @@
|
||||
<config>
|
||||
<parent-provides>
|
||||
<service name="LOG"/>
|
||||
<service name="SIGNAL"/>
|
||||
<service name="Timer"/>
|
||||
<service name="Nitpicker"/>
|
||||
</parent-provides>
|
||||
<default-route>
|
||||
<any-service> <parent/> <any-child/> </any-service>
|
||||
</default-route>
|
||||
<start name="testnit">
|
||||
<resource name="RAM" quantum="1M"/>
|
||||
</start>
|
||||
</config>
|
30
libports/src/test/qt5/qpluginwidget/main.cpp
Normal file
30
libports/src/test/qt5/qpluginwidget/main.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* \brief QPluginWidget test
|
||||
* \author Christian Prochaska
|
||||
* \date 2012-04-23
|
||||
*/
|
||||
|
||||
/* Qt includes */
|
||||
#include <QtGui>
|
||||
#include <QApplication>
|
||||
#include <qpluginwidget/qpluginwidget.h>
|
||||
|
||||
/* Qoost includes */
|
||||
#include <qoost/compound_widget.h>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
static QApplication app(argc, argv);
|
||||
|
||||
static Compound_widget<QWidget, QHBoxLayout> w;
|
||||
|
||||
static QString plugin_args("ram_quota=3M");
|
||||
static QPluginWidget plugin_widget(&w, QUrl("rom:///test-plugin.tar"), plugin_args, 100, 100);
|
||||
|
||||
w.layout()->addWidget(&plugin_widget);
|
||||
w.resize(150, 150);
|
||||
|
||||
w.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
4
libports/src/test/qt5/qpluginwidget/qpluginwidget.pro
Normal file
4
libports/src/test/qt5/qpluginwidget/qpluginwidget.pro
Normal file
@ -0,0 +1,4 @@
|
||||
TEMPLATE = app
|
||||
TARGET = test-qpluginwidget
|
||||
QT = core gui
|
||||
SOURCES += main.cpp
|
17
libports/src/test/qt5/qpluginwidget/target.mk
Normal file
17
libports/src/test/qt5/qpluginwidget/target.mk
Normal file
@ -0,0 +1,17 @@
|
||||
# identify the QT5 repository by searching for a file that is unique for QT5
|
||||
QT5_REP_DIR := $(call select_from_repositories,lib/import/import-qt5.inc)
|
||||
QT5_REP_DIR := $(realpath $(dir $(QT5_REP_DIR))../..)
|
||||
|
||||
include $(QT5_REP_DIR)/src/app/qt5/tmpl/target_defaults.inc
|
||||
|
||||
include $(QT5_REP_DIR)/src/app/qt5/tmpl/target_final.inc
|
||||
|
||||
LIBS += qt5_qpluginwidget qt5_network
|
||||
|
||||
$(TARGET): test-plugin.tar
|
||||
|
||||
test-plugin.tar: config.plugin
|
||||
$(VERBOSE)tar cf $@ -C $(PRG_DIR) config.plugin
|
||||
|
||||
clean:
|
||||
$(VERBOSE)rm test-plugin.tar
|
Loading…
x
Reference in New Issue
Block a user