[Tux4kids-commits] r1419 - tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin
Michał Świtakowski
swistakers-guest at alioth.debian.org
Wed Aug 12 18:43:04 UTC 2009
Author: swistakers-guest
Date: 2009-08-12 18:43:04 +0000 (Wed, 12 Aug 2009)
New Revision: 1419
Modified:
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/CMakeLists.txt
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.cpp
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.h
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.ui
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.cpp
tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.pro
Log:
widget for tuxtype
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/CMakeLists.txt
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/CMakeLists.txt 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/CMakeLists.txt 2009-08-12 18:43:04 UTC (rev 1419)
@@ -21,7 +21,7 @@
FIND_PACKAGE( Qt4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )
-INCLUDE_DIRECTORIES( ../ ../../../libtux4kidsadmin_tuxtype ../../../libtux4kidsadmin ${CMAKE_CURRENT_BINARY_DIR} )
+INCLUDE_DIRECTORIES( ../ ../../src ../../../libtux4kidsadmin_tuxtype ../../../libtux4kidsadmin ${CMAKE_CURRENT_BINARY_DIR} )
QT4_WRAP_UI( TUXTYPE_PLUGIN_UI_HEADERS ${TUXTYPE_PLUGIN_UIS} )
QT4_WRAP_CPP( TUXTYPE_PLUGIN_MOC_SOURCES ${TUXTYPE_PLUGIN_MOC_HEADERS} )
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.cpp
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.cpp 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.cpp 2009-08-12 18:43:04 UTC (rev 1419)
@@ -1,14 +1,28 @@
#include "tuxtypeMainWidget.h"
#include "ui_tuxtypeMainWidget.h"
+#include "studentTableModel.h"
+#include "selectStudentWidget.h"
-TuxtypeMainWidget::TuxtypeMainWidget(QWidget *parent) :
+TuxtypeMainWidget::TuxtypeMainWidget(SchoolData *schoolData, QWidget *parent) :
QWidget(parent),
m_ui(new Ui::TuxtypeMainWidget)
{
m_ui->setupUi(this);
+
+ m_studentTableModel.setSchoolData(schoolData);
+ m_selectStudentWidget = new SelectStudentWidget(this);
+ m_ui->verticalLayout->insertWidget(0, m_selectStudentWidget);
+ m_selectStudentWidget->setStudentTableModel(&m_studentTableModel);
+
+ connect(m_ui->setWordListButton, SIGNAL(clicked()), this, SLOT(setWordListClicked()));
}
TuxtypeMainWidget::~TuxtypeMainWidget()
{
delete m_ui;
}
+
+void TuxtypeMainWidget::setWordListClicked()
+{
+}
+
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.h
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.h 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.h 2009-08-12 18:43:04 UTC (rev 1419)
@@ -3,20 +3,29 @@
#include <QtGui/QWidget>
+#include "studentTableModel.h"
+
namespace Ui {
class TuxtypeMainWidget;
}
+class SchoolData;
+class SelectStudentWidget;
+
class TuxtypeMainWidget : public QWidget {
Q_OBJECT
Q_DISABLE_COPY(TuxtypeMainWidget)
public:
- explicit TuxtypeMainWidget(QWidget *parent = 0);
+ explicit TuxtypeMainWidget(SchoolData *schoolData, QWidget *parent = 0);
virtual ~TuxtypeMainWidget();
private:
+ Ui::TuxtypeMainWidget *m_ui;
+ StudentTableModel m_studentTableModel;
+ QPointer<SelectStudentWidget> m_selectStudentWidget;
- Ui::TuxtypeMainWidget *m_ui;
+private slots:
+ void setWordListClicked();
};
#endif // TUXTYPEMAINWIDGET_H
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.ui
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.ui 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypeMainWidget.ui 2009-08-12 18:43:04 UTC (rev 1419)
@@ -13,19 +13,36 @@
<property name="windowTitle">
<string>Form</string>
</property>
- <widget class="QLabel" name="label">
- <property name="geometry">
- <rect>
- <x>70</x>
- <y>50</y>
- <width>57</width>
- <height>16</height>
- </rect>
- </property>
- <property name="text">
- <string>tuxtype</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <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="setWordListButton">
+ <property name="text">
+ <string>Set word list</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
<resources/>
<connections/>
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.cpp
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.cpp 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.cpp 2009-08-12 18:43:04 UTC (rev 1419)
@@ -1,6 +1,7 @@
#include <QDebug>
#include "tuxtypePlugin.h"
+#include "tuxtypeMainWidget.h"
TuxtypePlugin::TuxtypePlugin(QObject *parent) : QObject(parent)
{
@@ -24,7 +25,7 @@
QWidget *TuxtypePlugin::mainWidget()
{
- return 0;
+ return new TuxtypeMainWidget(m_schoolData);
}
void TuxtypePlugin::setSchoolData(SchoolData *schoolData)
Modified: tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.pro
===================================================================
--- tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.pro 2009-08-12 12:48:11 UTC (rev 1418)
+++ tux4kids-admin/trunk/tux4kids-admin/plugins/tuxtypePlugin/tuxtypePlugin.pro 2009-08-12 18:43:04 UTC (rev 1419)
@@ -2,7 +2,8 @@
CONFIG += plugin
INCLUDEPATH += ../ \
../../../libtux4kidsadmin \
- ../../../libtux4kidsadmin_tuxtype
+ ../../../libtux4kidsadmin_tuxtype \
+ ../../src
HEADERS = tuxtypePlugin.h \
tuxtypeMainWidget.h
SOURCES = tuxtypePlugin.cpp \
More information about the Tux4kids-commits
mailing list