UltraScan III
us_window_message.h
Go to the documentation of this file.
1 #ifndef US_WINDOW_MSG_H
3 #define US_WINDOW_MSG_H
4 
5 #include <QtCore>
6 #include <QtGui>
7 #include "us_extern.h"
8 
9 #ifndef DbgLv
10 #define DbgLv(a) if(dbg_level>=a)qDebug()
11 #endif
12 
14 
18 
19 class US_GUI_EXTERN US_WindowMessage : public QObject
20 {
21  Q_OBJECT
22 
23  public:
24 
30  {
31  public:
33  Interpreter( ulong, QString, QString );
34 
36  QString interp_name;
37  QString file_name;
38  };
39 
40 
42  US_WindowMessage( QObject* = 0 );
43 
46 
50  int findAllInterps( void );
51 
56  int findAllInterps( QList< Interpreter >& );
57 
61  int findLiveInterps( );
62 
66  int findLiveInterps( QList< Interpreter >& );
67 
71  int zombieList( QStringList& );
72 
77  ulong addInterp( const QString );
78 
81  // \return Count of interpreters found
82  int interpIDs( QList< ulong >& );
83 
87  int interpNames( QStringList& );
88 
92  int interpFiles( QStringList& );
93 
97  ulong interpId( const QString );
98 
102  ulong interpIdByName( const QString );
103 
107  QString interpName( const ulong );
108 
112  QString interpName( const QString );
113 
117  QString interpFileName( const ulong );
118 
122  QString interpFileName( const QString );
123 
129  int sendMessage( const ulong, const QString );
130 
136  int sendMessage( const QString, const QString );
137 
143  QString sendQuery( const ulong, const QString );
144 
150  QString sendQuery( const QString, const QString );
151 
155  bool isLive( Interpreter& );
156 
160  QString lastSendResult( void );
161 
162  private:
163  QList< Interpreter > all_interps;
164  QList< Interpreter > live_interps;
165 
166  QList< ulong > interp_ids;
167  QStringList interp_names;
168  QStringList file_names;
169  QStringList zombie_list;
170 
171  int dbg_level;
172 
173  private slots:
174 
175  // Populate a list from the character array returned by the query
176  // within the platform-specific window function ShowInterpNames().
177  int fill_interps( int, char*, QList< Interpreter >& );
178 
179 };
180 
181 #endif