00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __QCOMPLETIONBOX_H__
00019 #define __QCOMPLETIONBOX_H__
00020
00021 #include <qcombobox.h>
00022 #include <qstringlist.h>
00023 #include <Python.h>
00024
00025 class CmdInterpreter;
00026
00034 class QCommandBox : public QComboBox
00035 {
00036 Q_OBJECT
00037 public:
00039 QCommandBox( CmdInterpreter *cmdInterpreter, QWidget *parent=0, const char *name=0 );
00041 void registerPyModule( PyObject *module );
00042 protected slots:
00044 void autoComplete( const QString & );
00046 void itemActivated( const QString & );
00048 void exec();
00049 signals:
00050 void commandExecuted();
00051 private:
00053 QStringList commands;
00055 CmdInterpreter *cmdInterpreter;
00056 };
00057
00058 #endif
00059