#ifndef ROOT_TGQt
#define ROOT_TGQt
#include "TQtRConfig.h"
#ifndef __CINT__
#include <vector>
#include <map>
#include <qobject.h>
#include <qmap.h>
#include <qcolor.h>
#include <qcursor.h>
#include <qpainter.h>
#include <qrect.h>
#include <qmap.h>
#include <qnamespace.h>
#if (QT_VERSION > 0x039999)
# include <QPixmap>
# include <QEvent>
# include <QVector>
#else
# include <qmemarray.h>
# include <qptrqueue.h>
# include <qptrlist.h>
# include <qptrvector.h>
#endif /* QT_VERSION */
#include <qfontdatabase.h>
#include "TQtClientGuard.h"
#else
class QObject;
class QEvent;
#endif /* CINT */
class QPen;
class QMarker;
class QPaintDevice;
class QTextCodec;
#include "TVirtualX.h"
#include "TQtEmitter.h"
class TQtMarker;
class TQtPen;
class TQtSwitch;
class TQtBrush;
class TQtCommand;
class TFileHandler;
class TQtApplication;
class TQtClientFilter;
class TQtEventQueue;
class TQtPadFont;
class TQtPen;
class TQtPainter;
class TQtFeedBackWidget;
class TGQt : public TVirtualX {
#ifndef __CINT__
friend class TQtObject;
friend class TQtWindowsObject;
friend class TQtPixmapObject;
friend class TPadOpenGLView;
friend class TQtWidget;
friend class TQtClientWidget;
friend class TQtImage;
friend class TQtClientGuard;
friend class TQtClientFilter;
friend class TQtSynchPainting;
friend class TQtToggleFeedBack;
protected:
enum DEFWINDOWID { kDefault=1 };
QPaintDevice *fSelectedWindow;
QPaintDevice *fPrevWindow;
Int_t fDisplayOpened;
TQtPainter *fQPainter;
TQtEmitter fEmitter;
static TVirtualX *fgTQt;
void *fhEvent;
#if QT_VERSION < 0x40000
QPtrVector<QCursor> fCursors;
#else /* QT_VERSION */
QVector<QCursor *> fCursors;
#endif /* QT_VERSION */
ECursor fCursor;
Style_t fMarkerStyle;
Int_t fTextAlignH;
Int_t fTextAlignV;
Float_t fCharacterUpX;
Float_t fCharacterUpY;
Int_t fTextFontModified;
Float_t fTextMagnitude;
TQtBrush *fQBrush;
TQtPen *fQPen;
TQtMarker *fQtMarker;
TQtPadFont *fQFont;
#if (QT_VERSION <0x40000)
Qt::RasterOp fDrawMode;
#else
QPainter::CompositionMode fDrawMode;
#endif
typedef QMap<QPaintDevice *,QRect> TQTCLIPMAP;
TQTCLIPMAP fClipMap;
QMap<Color_t,QColor*> fPallete;
TQtClientFilter *fQClientFilter;
TQtEventQueue *fQClientFilterBuffer;
TQtClientGuard fQClientGuard;
TQtPixmapGuard fQPixmapGuard;
typedef std::map<ULong_t, QColor * > COLORMAP;
COLORMAP fColorMap;
TQtClientWidget *fPointerGrabber;
QTextCodec *fCodec;
QString fFontTextCode;
const char *fSymbolFontFamily;
Int_t fQtEventHasBeenProcessed;
Bool_t fFeedBackMode;
TQtFeedBackWidget *fFeedBackWidget;
Int_t CreatROOTThread();
void DeleteSelectedObj();
static QRect GetQRect(QPaintDevice &dev);
void Begin();
void End();
void UpdateFont();
void UpdatePen();
void UpdateBrush();
void UpdateClipRectangle();
QPaintDevice *GetDoubleBuffer(QPaintDevice *dev);
#endif
static Int_t RegisterWid(QPaintDevice *wid);
static Int_t UnRegisterWid(QPaintDevice *wid);
static Bool_t IsRegistered(QPaintDevice *wid);
private:
TGQt& operator=(const TGQt&);
public:
TGQt();
TGQt(const TGQt &vx): TVirtualX(vx) { MayNotUse("TGQt(const TGQt &)"); }
TGQt(const Text_t *name, const Text_t *title);
virtual ~TGQt();
#include "TVirtualX.interface.h"
#ifndef __CINT__
virtual const QColor& ColorIndex(Color_t indx) const;
virtual QPaintDevice *GetSelectedWindow(){ return fSelectedWindow; }
virtual void SetFillStyleIndex( Int_t style, Int_t fasi);
virtual void SetMarkerType( Int_t type, Int_t n, TPoint *xy );
virtual void SetTitle(const char *title);
virtual void CopyPixmap(const QPixmap &p, Int_t px1, Int_t py1);
virtual void SetTextDecoder(const char * ){;}
virtual const QTextCodec *GetTextDecoder();
#endif
virtual void PutByte(Byte_t b);
virtual Bool_t IsHandleValid(Window_t id);
static TQtApplication *CreateQtApplicationImp();
static Int_t iwid(QPaintDevice *wid);
static QPaintDevice *iwid(Int_t wid);
static QPaintDevice *iwid(Window_t wid);
#ifndef __CINT__
#if ROOT_VERSION_CODE < ROOT_VERSION(5,13,0)
static QPixmap *MakeIcon(Int_t indx);
#endif
static TVirtualX *GetVirtualX();
static QWidget *winid(Window_t id);
static QWidget *wid(Window_t id);
static Window_t wid(TQtClientWidget *widget);
static Window_t rootwid(QPaintDevice *dev);
static void PrintEvent(Event_t &);
static QString SetFileName(const QString &fileName);
static QString GetNewFileName(const QString &fileNamePrototype);
void SetQClientFilter(TQtClientFilter *filter) {fQClientFilter = filter;}
TQtClientFilter *QClientFilter() const {return fQClientFilter;}
QColor &QtColor(ULong_t pixel);
void SendDestroyEvent(TQtClientWidget *) const;
TQtEmitter *Emitter(){ return &fEmitter;}
#endif
virtual void SetRGB(Int_t cindex, Float_t r, Float_t g, Float_t b, Float_t a);
virtual void SetAlpha(Int_t cindex, Float_t a);
virtual void GetRGBA(Int_t cindex, Float_t &r, Float_t &g, Float_t &b, Float_t &a);
virtual Float_t GetAlpha(Int_t cindex);
virtual Int_t LoadQt(const char *shareLibFileName);
static void PostQtEvent(QObject *receiver, QEvent *event);
virtual Int_t processQtEvents(Int_t maxtime=300);
private:
static int fgCoinFlag;
static int fgCoinLoaded;
public:
static int CoinFlag();
static void SetCoinFlag(int flag);
static void SetCoinLoaded();
static Int_t IsCoinLoaded();
#ifndef __CINT__
static QString RootFileFormat(const char *selector);
static QString RootFileFormat(const QString &selector);
static QString QtFileFormat(const char *selector);
static QString QtFileFormat(const QString &selector);
#endif
#ifndef Q_MOC_RUN
ClassDef(TGQt,0)
#endif
};
R__EXTERN TGQt *gQt;
#endif
Last change: Mon Dec 8 10:00:32 2008
Last generated: 2008-12-08 10:00
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.