1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

minor progress

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@774 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pedro 2010-06-14 20:14:09 +00:00 committed by pedro
parent 2465307431
commit 15fdfc4161
10 changed files with 305 additions and 9 deletions

View File

@ -1,4 +1,4 @@
<plugin name="Config" version="0.0.1" compatVersion="1.3.1">
<plugin name="Config" version="0.0.1" compatVersion="1.0.0">
<vendor>The OpenPilot Project</vendor>
<copyright>(C) 2010 OpenPilot Project</copyright>
<license>Your License goes here</license>

View File

@ -15,3 +15,4 @@ SOURCES += configplugin.cpp \
configgadgetfactory.cpp \
configgadgetoptionspage.cpp \
configgadget.cpp
FORMS += configgadget.ui

View File

@ -35,6 +35,7 @@ class IUAVGadget;
class QWidget;
class QString;
class ConfigGadgetWidget;
class Ui_ConfigGadget;
using namespace Core;

View File

@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ConfigGadget</class>
<widget class="QWidget" name="ConfigGadget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<widget class="QWidget" name="horizontalLayoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>350</y>
<width>481</width>
<height>41</height>
</rect>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">
<enum>QLayout::SetMinimumSize</enum>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="sendButtun">
<property name="text">
<string>Send</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QTreeView" name="treeView">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>221</width>
<height>331</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
<widget class="QFrame" name="frame">
<property name="geometry">
<rect>
<x>240</x>
<y>10</y>
<width>251</width>
<height>331</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -32,7 +32,7 @@
#include <coreplugin/iuavgadget.h>
ConfigGadgetFactory::ConfigGadgetFactory(QObject *parent) :
IUAVGadgetFactory(QString("MapGadget"), tr("Map Gadget"), parent)
IUAVGadgetFactory(QString("ConfigGadget"), tr("Config Gadget"), parent)
{
}

View File

@ -25,6 +25,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "configgadgetwidget.h"
#include "ui_configgadget.h"
#include <QStringList>
@ -35,12 +36,14 @@
ConfigGadgetWidget::ConfigGadgetWidget(QWidget *parent) : QWidget(parent)
{
setMinimumSize(64,64);
m_config = new Ui_ConfigGadget();
m_config->setupUi(this);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
this->
setToolTip(tr("Choose a gadget to display in this view.\n") +
tr("You can also split this view in two.\n\n") +
tr("Maybe you first have to choose Show Toolbars in the Window menu."));
// this->
// setToolTip(tr("Choose a gadget to display in this view.\n") +
// tr("You can also split this view in two.\n\n") +
// tr("Maybe you first have to choose Show Toolbars in the Window menu."));
}
ConfigGadgetWidget::~ConfigGadgetWidget()

View File

@ -27,8 +27,11 @@
#ifndef CONFIGGADGETWIDGET_H
#define CONFIGGADGETWIDGET_H
#include "ui_configgadget.h"
#include <QtGui/QWidget>
class Ui_ConfigGadget;
class ConfigGadgetWidget: public QWidget
{
Q_OBJECT
@ -39,6 +42,10 @@ public:
protected:
void resizeEvent(QResizeEvent * event);
private:
Ui_ConfigGadget *m_config;
};
#endif // CONFIGGADGETWIDGET_H

View File

@ -44,8 +44,8 @@ bool ConfigPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
// cf = new ConfigGadgetFactory(this);
// addAutoReleasedObject(cf);
cf = new ConfigGadgetFactory(this);
addAutoReleasedObject(cf);
return true;
}

View File

@ -0,0 +1,96 @@
/********************************************************************************
** Form generated from reading UI file 'configgadget.ui'
**
** Created: Wed 19. May 23:01:40 2010
** by: Qt User Interface Compiler version 4.6.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_CONFIGGADGET_H
#define UI_CONFIGGADGET_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QFrame>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QTreeView>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_ConfigGadget
{
public:
QWidget *horizontalLayoutWidget;
QHBoxLayout *horizontalLayout;
QSpacerItem *horizontalSpacer;
QPushButton *sendButtun;
QTreeView *treeView;
QFrame *frame;
void setupUi(QWidget *ConfigGadget)
{
if (ConfigGadget->objectName().isEmpty())
ConfigGadget->setObjectName(QString::fromUtf8("ConfigGadget"));
ConfigGadget->resize(500, 400);
horizontalLayoutWidget = new QWidget(ConfigGadget);
horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
horizontalLayoutWidget->setGeometry(QRect(10, 350, 481, 41));
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize);
horizontalLayout->setContentsMargins(0, 0, 0, 0);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer);
sendButtun = new QPushButton(horizontalLayoutWidget);
sendButtun->setObjectName(QString::fromUtf8("sendButtun"));
horizontalLayout->addWidget(sendButtun);
treeView = new QTreeView(ConfigGadget);
treeView->setObjectName(QString::fromUtf8("treeView"));
treeView->setGeometry(QRect(10, 10, 221, 331));
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(treeView->sizePolicy().hasHeightForWidth());
treeView->setSizePolicy(sizePolicy);
frame = new QFrame(ConfigGadget);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setGeometry(QRect(240, 10, 251, 331));
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
frame->setSizePolicy(sizePolicy1);
frame->setFrameShape(QFrame::StyledPanel);
frame->setFrameShadow(QFrame::Raised);
retranslateUi(ConfigGadget);
QMetaObject::connectSlotsByName(ConfigGadget);
} // setupUi
void retranslateUi(QWidget *ConfigGadget)
{
ConfigGadget->setWindowTitle(QApplication::translate("ConfigGadget", "Form", 0, QApplication::UnicodeUTF8));
sendButtun->setText(QApplication::translate("ConfigGadget", "Send", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class ConfigGadget: public Ui_ConfigGadget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_CONFIGGADGET_H

View File

@ -0,0 +1,96 @@
/********************************************************************************
** Form generated from reading UI file 'configgadgetwidget.ui'
**
** Created: Tue 18. May 19:44:42 2010
** by: Qt User Interface Compiler version 4.6.2
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/
#ifndef UI_CONFIGGADGETWIDGET_H
#define UI_CONFIGGADGETWIDGET_H
#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QFrame>
#include <QtGui/QHBoxLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QPushButton>
#include <QtGui/QSpacerItem>
#include <QtGui/QTreeView>
#include <QtGui/QWidget>
QT_BEGIN_NAMESPACE
class Ui_ConfigGadgetWidget
{
public:
QWidget *horizontalLayoutWidget;
QHBoxLayout *horizontalLayout;
QSpacerItem *horizontalSpacer;
QPushButton *sendButtun;
QTreeView *treeView;
QFrame *frame;
void setupUi(QWidget *ConfigGadgetWidget)
{
if (ConfigGadgetWidget->objectName().isEmpty())
ConfigGadgetWidget->setObjectName(QString::fromUtf8("ConfigGadgetWidget"));
ConfigGadgetWidget->resize(500, 400);
horizontalLayoutWidget = new QWidget(ConfigGadgetWidget);
horizontalLayoutWidget->setObjectName(QString::fromUtf8("horizontalLayoutWidget"));
horizontalLayoutWidget->setGeometry(QRect(10, 350, 481, 41));
horizontalLayout = new QHBoxLayout(horizontalLayoutWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
horizontalLayout->setSizeConstraint(QLayout::SetMinimumSize);
horizontalLayout->setContentsMargins(0, 0, 0, 0);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer);
sendButtun = new QPushButton(horizontalLayoutWidget);
sendButtun->setObjectName(QString::fromUtf8("sendButtun"));
horizontalLayout->addWidget(sendButtun);
treeView = new QTreeView(ConfigGadgetWidget);
treeView->setObjectName(QString::fromUtf8("treeView"));
treeView->setGeometry(QRect(10, 10, 221, 331));
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
sizePolicy.setHorizontalStretch(0);
sizePolicy.setVerticalStretch(0);
sizePolicy.setHeightForWidth(treeView->sizePolicy().hasHeightForWidth());
treeView->setSizePolicy(sizePolicy);
frame = new QFrame(ConfigGadgetWidget);
frame->setObjectName(QString::fromUtf8("frame"));
frame->setGeometry(QRect(240, 10, 251, 331));
QSizePolicy sizePolicy1(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
sizePolicy1.setHorizontalStretch(0);
sizePolicy1.setVerticalStretch(0);
sizePolicy1.setHeightForWidth(frame->sizePolicy().hasHeightForWidth());
frame->setSizePolicy(sizePolicy1);
frame->setFrameShape(QFrame::StyledPanel);
frame->setFrameShadow(QFrame::Raised);
retranslateUi(ConfigGadgetWidget);
QMetaObject::connectSlotsByName(ConfigGadgetWidget);
} // setupUi
void retranslateUi(QWidget *ConfigGadgetWidget)
{
ConfigGadgetWidget->setWindowTitle(QApplication::translate("ConfigGadgetWidget", "Form", 0, QApplication::UnicodeUTF8));
sendButtun->setText(QApplication::translate("ConfigGadgetWidget", "Send", 0, QApplication::UnicodeUTF8));
} // retranslateUi
};
namespace Ui {
class ConfigGadgetWidget: public Ui_ConfigGadgetWidget {};
} // namespace Ui
QT_END_NAMESPACE
#endif // UI_CONFIGGADGETWIDGET_H