// @(#)root/qt:$Id$
// Author: Valery Fine      18/01/2007

/****************************************************************************
** $Id$
**
** Copyright (C) 2007 by Valeri Fine. Brookhaven National Laboratory.
**                                    All rights reserved.
**
**
*****************************************************************************/
//________________________________________________________________________
//
// The TQRootSlot singleton class introduces the global SLOT to invoke
// the  ROOT command line from the GUI signals
// Optionally one can execute TApplication::Terminate method directly
//
// It provides a Qt slot to attach the the CINT C++ interpreter
// to any Qt signal
// To execute any C++ statement from the GUI one should connect
// one's Qt signal with the Qt slot of the global instance of this class
//________________________________________________________________________

#ifndef ROOT_TQRootSlot
#define ROOT_TQRootSlot

#ifndef __CINT__
#include <qobject.h>
#else
class QObject;
#ifndef Q_OBJECT
#define Q_OBJECT
#endif
#define slots
#endif

class QString;

class TQtRootSlot : public QObject {
   Q_OBJECT
private:
   TQtRootSlot (const TQtRootSlot &);
   void operator=(const TQtRootSlot &);
protected:
   static TQtRootSlot *fgTQtRootSlot;
   TQtRootSlot () {}
public:
   static TQtRootSlot *CintSlot();
   virtual ~TQtRootSlot() {}

public slots:
   void ProcessLine(const char *);
   void ProcessLine(const QString &);
   void EndOfLine();
   void Terminate(int status) const;
   void Terminate()           const;
   void TerminateAndQuit()    const;

#ifndef __CINT__
signals:
   void Error(int error);
#endif
};

bool QConnectCint(const QObject *sender, const char *signal);
bool QConnectTerminate( const QObject *sender, const char *signal);
#endif
 TQtRootSlot.h:1
 TQtRootSlot.h:2
 TQtRootSlot.h:3
 TQtRootSlot.h:4
 TQtRootSlot.h:5
 TQtRootSlot.h:6
 TQtRootSlot.h:7
 TQtRootSlot.h:8
 TQtRootSlot.h:9
 TQtRootSlot.h:10
 TQtRootSlot.h:11
 TQtRootSlot.h:12
 TQtRootSlot.h:13
 TQtRootSlot.h:14
 TQtRootSlot.h:15
 TQtRootSlot.h:16
 TQtRootSlot.h:17
 TQtRootSlot.h:18
 TQtRootSlot.h:19
 TQtRootSlot.h:20
 TQtRootSlot.h:21
 TQtRootSlot.h:22
 TQtRootSlot.h:23
 TQtRootSlot.h:24
 TQtRootSlot.h:25
 TQtRootSlot.h:26
 TQtRootSlot.h:27
 TQtRootSlot.h:28
 TQtRootSlot.h:29
 TQtRootSlot.h:30
 TQtRootSlot.h:31
 TQtRootSlot.h:32
 TQtRootSlot.h:33
 TQtRootSlot.h:34
 TQtRootSlot.h:35
 TQtRootSlot.h:36
 TQtRootSlot.h:37
 TQtRootSlot.h:38
 TQtRootSlot.h:39
 TQtRootSlot.h:40
 TQtRootSlot.h:41
 TQtRootSlot.h:42
 TQtRootSlot.h:43
 TQtRootSlot.h:44
 TQtRootSlot.h:45
 TQtRootSlot.h:46
 TQtRootSlot.h:47
 TQtRootSlot.h:48
 TQtRootSlot.h:49
 TQtRootSlot.h:50
 TQtRootSlot.h:51
 TQtRootSlot.h:52
 TQtRootSlot.h:53
 TQtRootSlot.h:54
 TQtRootSlot.h:55
 TQtRootSlot.h:56
 TQtRootSlot.h:57
 TQtRootSlot.h:58
 TQtRootSlot.h:59
 TQtRootSlot.h:60
 TQtRootSlot.h:61
 TQtRootSlot.h:62
 TQtRootSlot.h:63
 TQtRootSlot.h:64
 TQtRootSlot.h:65
 TQtRootSlot.h:66
 TQtRootSlot.h:67