]> Creatis software - bbtk.git/blob - packages/qt/src/bbqtOutputText.cxx
defaultBalues InitializeProcessing FinalizeProcessing
[bbtk.git] / packages / qt / src / bbqtOutputText.cxx
1 #include "bbqtOutputText.h"
2 #include "bbqtPackage.h"
3 #include <QLabel>
4  
5 namespace bbqt
6 {
7
8 BBTK_ADD_BLACK_BOX_TO_PACKAGE(qt,QOutputText)
9 BBTK_BLACK_BOX_IMPLEMENTATION(QOutputText,bbtk::QtBlackBox);
10
11 void QOutputText::Process()
12 {
13    std::string msg;
14     if (bbGetInputTitle()!="")
15       {
16         msg = bbGetInputTitle()+": " + bbGetInputIn();
17       }
18     else
19       {
20         msg = bbGetInputIn();
21       }
22     ((QLabel*)bbGetOutputWidget())->setText( msg.c_str() );
23     //SetLabel( bbtk::std2wx( msg ) ); 
24 }
25
26         
27 void QOutputText::CreateWidget(QWidget* parent)
28 {
29   bbSetOutputWidget( new 
30                      QLabel( parent ) );
31                      //wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
32    Process();
33 }
34         
35         
36         void QOutputText::bbUserSetDefaultValues()
37         {
38                 bbSetInputIn("");
39                 bbSetInputTitle("");  
40         }
41         
42         void QOutputText::bbUserInitializeProcessing()
43         {
44         }
45         
46         void QOutputText::bbUserFinalizeProcessing()
47         {
48         }
49         
50
51 }
52 // EO namespace bbqt
53
54