]> Creatis software - bbtk.git/blobdiff - packages/qt/src/bbqtQOutputText.cxx
*** empty log message ***
[bbtk.git] / packages / qt / src / bbqtQOutputText.cxx
diff --git a/packages/qt/src/bbqtQOutputText.cxx b/packages/qt/src/bbqtQOutputText.cxx
new file mode 100644 (file)
index 0000000..b7fbad5
--- /dev/null
@@ -0,0 +1,57 @@
+#include "bbqtQOutputText.h"
+#include "bbqtPackage.h"
+#include <QLabel>
+namespace bbqt
+{
+
+BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,QOutputText)
+BBTK_BLACK_BOX_IMPLEMENTATION(QOutputText,bbtk::QtBlackBox);
+void QOutputText::Process()
+{
+
+   std::string msg;
+    if (bbGetInputTitle()!="")
+      {
+       msg = bbGetInputTitle()+": " + bbGetInputIn();
+      }
+    else
+      {
+       msg = bbGetInputIn();
+      }
+    ((QLabel*)bbGetOutputWidget())->setText( msg.c_str() );
+    //SetLabel( bbtk::std2wx( msg ) ); 
+  
+}
+void QOutputText::CreateWidget(QWidget* parent)
+{
+
+  bbSetOutputWidget( new 
+                    QLabel( parent ) );
+                    //wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
+   Process();
+  
+}
+void QOutputText::bbUserConstructor()
+{
+    bbSetInputIn("");
+    bbSetInputTitle("");
+  
+}
+void QOutputText::bbUserCopyConstructor(bbtk::BlackBox::Pointer)
+{
+
+
+  
+}
+void QOutputText::bbUserDestructor()
+{
+
+
+  
+}
+}
+// EO namespace bbqt
+
+