12 #if QT_VERSION >= 0x40000 15 #include <QMimeSource> 16 #include <Q3MimeSourceFactory> 17 #include <Q3ImageDrag> 18 #include <Q3ListViewItem> 19 typedef Q3ListViewItem QListViewItem;
20 typedef Q3DragObject QDragObject;
21 typedef Q3TextDrag QTextDrag;
22 typedef Q3ImageDrag QImageDrag;
28 const QMimeSource *
m = QMimeSourceFactory::defaultFactory()->data( name );
41 (TQRootCanvas1->GetCanvas())->Divide(2,2);
42 fxDiskFile =
new TFile(
"test.root");
44 while ((key = (
TKey*) next())) {
45 AddItemToListView1(key->
ReadObj());
49 void qtrootexample1::destroy()
54 void qtrootexample1::ListView1_mouseButtonPressed(
int, QListViewItem *SelectedItem,
const QPoint &,
int )
56 if (SelectedItem!=0) {
57 QDragObject *d =
new QTextDrag(SelectedItem->text(0),ListView1);
62 void qtrootexample1::AddItemToListView1(
TObject *Key)
65 QListViewItem * item1 =
new QListViewItem(ListView1, Key->
GetName() ,
"TH2");
69 QListViewItem * item1 =
new QListViewItem(ListView1, Key->
GetName(),
"TH1");
static QPixmap uic_load_pixmap(const QString &name)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
#define decode(ptr, otri)
QMimeSourceFactory Q3MimeSourceFactory
Mother of all ROOT objects.
virtual TObject * ReadObj()
To read a TObject* from the file.
virtual TList * GetListOfKeys() const
virtual const char * GetName() const
Returns name of object.