[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kdehw/apps/soliddatacollector
From: Didier Hoarau <did.hoarau () gmail ! com>
Date: 2007-02-28 22:08:58
Message-ID: 1172700538.039747.21036.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 638125 by dhoarau:
SolidDataCollector: Begin work on sending the comments on a web server
M +2 -0 CMakeLists.txt
A collectorcomment.cpp [License: LGPL (v2)]
A collectorcomment.h [License: LGPL (v2)]
M +16 -2 contentcomment.cpp
M +29 -1 contentcomment.h
A publisher.cpp [License: LGPL (v2)]
A publisher.h [License: LGPL (v2)]
M +11 -4 soliddatacollector.cpp
M +6 -0 soliddatacollector.h
M +1 -1 ui/contentcomment.ui
--- branches/work/kdehw/apps/soliddatacollector/CMakeLists.txt #638124:638125
@@ -9,6 +9,8 @@
contentintro.cpp
contentend.cpp
contentcomment.cpp
+publisher.cpp
+collectorcomment.cpp
)
kde4_automoc(${soliddatacollector_SRCS})
--- branches/work/kdehw/apps/soliddatacollector/contentcomment.cpp #638124:638125
@@ -18,6 +18,8 @@
*/
#include "contentcomment.h"
+#include "collectorcomment.h"
+
#include <qlabel.h>
#include <klocale.h>
@@ -29,11 +31,23 @@
ContentComment::~ContentComment()
{
-
+ _comments->addComment(_name->text(),_comment->toPlainText());
}
-void ContentComment::setName(QString iName) {
+void ContentComment::setName(QString iName)
+{
_name->setText(iName);
}
+CollectorComment ContentComment::getComment()
+{
+
+}
+
+void ContentComment::setCollectorComment(CollectorComment * iComments)
+{
+ _comments = iComments;
+}
+
+
#include "contentcomment.moc"
--- branches/work/kdehw/apps/soliddatacollector/contentcomment.h #638124:638125
@@ -25,7 +25,10 @@
#include "ui_contentcomment.h"
#include "soliddatacollector.h"
+#include "collectorcomment.h"
+class SolidDataCollector;
+
/**
* @brief Solid Data Collector: frame for the comment
* Frame that get the comment from the user
@@ -36,12 +39,37 @@
{
Q_OBJECT
public:
+
ContentComment(QWidget *parent);
+
~ContentComment();
+
+ /**
+ * @brief
+ * @param
+ * @return
+ */
void setName(QString iName);
-
+
+ /**
+ * @brief
+ * @param
+ * @return
+ */
+ CollectorComment getComment();
+
+ /**
+ * @brief
+ * @param
+ * @return
+ */
+ void setCollectorComment(CollectorComment * iComments);
+
private:
+
SolidDataCollector * _collector;
+
+ CollectorComment * _comments;
};
#endif
--- branches/work/kdehw/apps/soliddatacollector/soliddatacollector.cpp #638124:638125
@@ -21,6 +21,7 @@
#include "contentintro.h"
#include "contentcomment.h"
#include "contentend.h"
+#include "publisher.h"
#include <qthread.h>
#include <kapplication.h>
@@ -35,8 +36,11 @@
_collectorUI = new FrameCollector(this);
setCentralWidget(_collectorUI);
- // TMP
+ // Into
introStep();
+
+ // Init the comment container
+ _comments = new CollectorComment();
}
void SolidDataCollector::nextStep()
@@ -88,8 +92,9 @@
QList<Solid::Device>::iterator _deviceiterator;
for (_deviceiterator = _devicelist.begin(); _deviceiterator != \
_devicelist.end(); ++_deviceiterator) { mComment = new ContentComment(this);
- mComment->setName(_deviceiterator->product());
+ mComment->setName(_deviceiterator->product());
mComment->setObjectName(QString::fromUtf8("w"));
+ mComment->setCollectorComment(_comments);
_collectorUI->addContentWidget(mComment);
}
}
@@ -102,9 +107,11 @@
ContentEnd * mEnd = new ContentEnd(this);
_collectorUI->clearContentWidget();
_collectorUI->addContentWidget(mEnd);
+
+ // Publisher
+ Publisher * mpub = new Publisher();
+ mpub->publish(_comments->toText());
}
-
-
#include "soliddatacollector.moc"
--- branches/work/kdehw/apps/soliddatacollector/soliddatacollector.h #638124:638125
@@ -24,8 +24,10 @@
#include <kmainwindow.h>
#include "framecollector.h"
+#include "collectorcomment.h"
class FrameCollector;
+class ContentComment;
/**
* @brief Solid Data Collector
@@ -94,6 +96,10 @@
// UI
FrameCollector * _collectorUI;
+
+ // Comment container
+ CollectorComment * _comments;
+
};
#endif
--- branches/work/kdehw/apps/soliddatacollector/ui/contentcomment.ui #638124:638125
@@ -77,7 +77,7 @@
</spacer>
</item>
<item>
- <widget class="QTextEdit" name="textEdit" >
+ <widget class="QTextEdit" name="_comment" >
<property name="sizePolicy" >
<sizepolicy>
<hsizetype>7</hsizetype>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic