=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2006.04.19 19:41:07 =~=~=~=~=~=~=~=~=~=~=~= cd testButton/ [finestation] /tmp/fine/testButton/> cat >.rootrc # GUI specific settings Gui.Backend: qt Gui.Factory: qt [finestation] /tmp/fine/testButton/> cat >main.LinkDef.h #ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class TMyQButton; #endif [finestation] /tmp/fine/testButton/> cat >TMyQButton.h #ifndef ROOT_TMyQButton #define ROOT_TMyQButton #include "Rtypes.h" class QPushButton; class TVirtualPad; class TMyQButton { private: QPushButton *fMyButton; public: TMyQButton(const char*name=""); virtual ~TMyQButton(); void SetSize(UInt_t w, UInt_t h); void Show(Bool_t show=kTRUE); void SetText(const char *text); void SetOn(Bool_t on=kTRUE); void SetStyle(const char * style); }; #endif [finestation] /tmp/fine/testButton/> cat >TMyQButton.cxx #include "TMyQButton.h" #include // This class allow you to create and manipulate the QPushButton interactively TMyQButton::TMyQButton(const char *name) { // Create Qt QPushButton interactively fMyButton = new QPushButton(name,0); } TMyQButton::~TMyQButton() { delete fMyButton; } void TMyQButton::SetSize(UInt_t w, UInt_t h) { // Resize the Qt button fMyButton->resize(w,h); } void TMyQButton::Show(Bool_t show) { // Show / hide the button if (show) fMyButton->show(); else fMyButton->hide(); } void TMyQButton::SetText(const char *text) { // Set / change the button text fMyButton->setText(text); } void TMyQButton::SetOn(Bool_t on) { fMyButton->setOn(on); } void TMyQButton::SetStyle(const char * style) { // Set button.s look and feel // The possible styles are defined by the local Qt inmstallation. // For example the possible style can be: "window", "motif", "cde", "sgi", // "motifplus", "platinum", "compact","windowsxp", "aqua", "macintosh fMyButton->setStyle(style); } [finestation] /tmp/fine/testButton/> cat >MyQButton.pro TEMPLATE = lib dll thread # Input HEADERS += TMyQButton.h SOURCES += TMyQButton.cxx CREATE_ROOT_DICT_FOR_CLASSES = ${HEADERS} LinkDef.h include("$(ROOTSYS)/include/rootcint.pri") [finestation] /tmp/fine/testButton/> qmake HelloCint.pro Error processing project file: /tmp/fine/testButton/HelloCint.pro [finestation] /tmp/fine/testButton/> ls -ltr total 16 -rw-r--r-- 1 fine rhstar 150 Apr 19 19:46 LinkDef.h -rw-r--r-- 1 fine rhstar 391 Apr 19 19:46 TMyQButton.h -rw-r--r-- 1 fine rhstar 996 Apr 19 19:47 TMyQButton.cxx -rw-r--r-- 1 fine rhstar 179 Apr 19 19:48 MyQButton.pro [finestation] /tmp/fine/testButton/> qmakeMyQButton.pro Project MESSAGE: Found Qt extensions library !!! WARNING: Failure to find: Dict.cxx [finestation] /tmp/fine/testButton/> make g++ -c -pipe -Wall -W -O2 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/home/fine/public/work/Qt/qt3/mkspecs/default -I. -I"/home/fine/public/work/ROOT/ROOTCVS/root/include" -I/home/fine/public/work/Qt/qt3/include -o TMyQButton.o TMyQButton.cxx /home/fine/public/work/ROOT/ROOTCVS/root/bin/rootcint -f Dict.cxx -c -DQT_VERSION=0x30000 -I/home/fine/public/work/Qt/qt3/mkspecs/default -I. -I"/home/fine/public/work/ROOT/ROOTCVS/root/include" -I/home/fine/public/work/Qt/qt3/include TMyQButton.h LinkDef.h g++ -c -pipe -Wall -W -O2 -fPIC -DQT_NO_DEBUG -DQT_SHARED -DQT_THREAD_SUPPORT -I/home/fine/public/work/Qt/qt3/mkspecs/default -I. -I"/home/fine/public/work/ROOT/ROOTCVS/root/include" -I/home/fine/public/work/Qt/qt3/include -o Dict.o Dict.cxx rm -f libMyQButton.so.1.0.0 libMyQButton.so libMyQButton.so.1 libMyQButton.so.1.0 g++ -Wl,-rpath,/home/fine/public/work/Qt/qt3/lib -shared -Wl,-soname,libMyQButton.so.1 -o libMyQButton.so.1.0.0 TMyQButton.o Dict.o -L/home/fine/public/work/Qt/qt3/lib -L/lib -lGQt -lQtGui -L/home/fine/public/work/ROOT/ROOTCVS/root/lib -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lGui -pthread -lm -ldl -rdynamic -lTable -lqt-mt ln -s libMyQButton.so.1.0.0 libMyQButton.so ln -s libMyQButton.so.1.0.0 libMyQButton.so.1 ln -s libMyQButton.so.1.0.0 libMyQButton.so.1.0 root.exe ** $Id: TGQt.cxx,v 1.123 2006/03/26 18:50:43 fine Exp $ this=0x8a5d900 ******************************************* * * * W E L C O M E to R O O T * * * * Version 5.11/01 3 March 2006 * * * * You are welcome to visit our Web site * * http://root.cern.ch * * * ******************************************* Compiled on 5 April 2006 for linux with thread support. CINT/ROOT C/C++ Interpreter version 5.16.10, March 30, 2006 Type ? for help. Commands must be C++ statements. Enclose multiple statements between { }. root [0] gSystem->Load("libMyQButton.so") (int)0 root [2] TMyQButton knopka; root [3] knopka.SetSize(100,60) root [4] knopka.Text("HEllo Cint") root [5] knopka.Show() root [6] .q [finestation] /tmp/fine/testButton/>