GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QRootCanvasPlugin.cpp
Go to the documentation of this file.
1 // $Id: QRootCanvasPlugin.cpp 2627 2019-10-01 08:02:45Z 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 fuer 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 "QRootCanvas.h"
15 #include "QRootCanvasPlugin.h"
16 
17 #include <QtPlugin>
18 //#include <iostream>
19 
20 
22  : QObject(parent)
23  {
24  initialized = false;
25  }
26 
27  void QRootCanvasPlugin::initialize(QDesignerFormEditorInterface * /* core */)
28  {
29  if (initialized)
30  return;
31  initialized = true;
32  }
33 
35  {
36  return initialized;
37  }
38 
39  QWidget *QRootCanvasPlugin::createWidget(QWidget *parent)
40  {
41  QRootCanvas* widg=new QRootCanvas(parent);
42  QPalette* npal= new QPalette(widg->palette());
43  //npal->setColor(QPalette::Window,Qt::red);
44  npal->setBrush(QPalette::Window,QPixmap(":/scale.png"));
45  widg->setPalette(*npal);
46  widg->setAutoFillBackground(true);
47  return widg;
48 
49  }
50 
51  QString QRootCanvasPlugin::name() const
52  {
53  return "QRootCanvas";
54  }
55 
56  QString QRootCanvasPlugin::group() const
57  {
58  return "Go4 Custom Widgets";
59  }
60 
62  {
63  return QIcon(":/go4logo2.png");
64  }
65 
67  {
68  return "Standard QtROOT canvas";
69  }
70 
72  {
73  return "ROOT canvas embedded into QWidget";
74  }
75 
77  {
78  return false;
79  }
80 
81  QString QRootCanvasPlugin::domXml() const
82  {
83  return "<widget class=\"QRootCanvas\" name=\"QRootCanvas\">\n"
84  " <property name=\"geometry\">\n"
85  " <rect>\n"
86  " <x>0</x>\n"
87  " <y>0</y>\n"
88  " <width>100</width>\n"
89  " <height>100</height>\n"
90  " </rect>\n"
91  " </property>\n"
92  "</widget>\n";
93  }
94 
96  {
97  return "QRootCanvas.h";
98  }
99 
100 
QString includeFile() const
QString name() const
Graphic Qt Widget based Canvas.
Definition: QRootCanvas.h:57
QWidget * createWidget(QWidget *parent)
QString whatsThis() const
QString group() const
QRootCanvasPlugin(QObject *parent=0)
QString domXml() const
bool isContainer() const
QString toolTip() const
void initialize(QDesignerFormEditorInterface *core)
bool isInitialized() const