GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QRootWindowPlugin.cpp
Go to the documentation of this file.
1 // $Id: QRootWindowPlugin.cpp 478 2009-10-29 12:26:09Z linev $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "QRootWindow.h"
15 #include "QRootWindowPlugin.h"
16 
17 #include <QtPlugin>
18 
19 
21  : QObject(parent)
22  {
23  initialized = false;
24  }
25 
26  void QRootWindowPlugin::initialize(QDesignerFormEditorInterface * /* core */)
27  {
28  if (initialized)
29  return;
30  initialized = true;
31  }
32 
34  {
35  return initialized;
36  }
37 
38  QWidget *QRootWindowPlugin::createWidget(QWidget *parent)
39  {
40  QRootWindow* widg=new QRootWindow(parent, 0, true);
41  QPalette* npal= new QPalette(widg->palette());
42  npal->setBrush(QPalette::Window,QPixmap(":/root.png"));
43  widg->setPalette(*npal);
44  widg->setAutoFillBackground(true);
45  return widg;
46  }
47 
48  QString QRootWindowPlugin::name() const
49  {
50  return "QRootWindow";
51  }
52 
53  QString QRootWindowPlugin::group() const
54  {
55  return "Go4 Custom Widgets";
56  }
57 
59  {
60  return QIcon(":/go4logo2.png");
61  }
62 
64  {
65  return "Qwidget to embed a ROOT TGCompositeFrame";
66  }
67 
69  {
70  return "ROOT TGFrame embedded into a QWidget ";
71  }
72 
74  {
75  return false;
76  }
77 
78  QString QRootWindowPlugin::domXml() const
79  {
80  return "<widget class=\"QRootWindow\" name=\"QRootWindow\">\n"
81  " <property name=\"geometry\">\n"
82  " <rect>\n"
83  " <x>0</x>\n"
84  " <y>0</y>\n"
85  " <width>100</width>\n"
86  " <height>100</height>\n"
87  " </rect>\n"
88  " </property>\n"
89  "</widget>\n";
90  }
91 
93  {
94  return "QRootWindow.h";
95  }
96 
97 
bool isInitialized() const
QString name() const
QString includeFile() const
QRootWindowPlugin(QObject *parent=0)
QWidget * createWidget(QWidget *parent)
QString whatsThis() const
void initialize(QDesignerFormEditorInterface *core)
QString domXml() const
bool isContainer() const
QString group() const
QString toolTip() const