Refine "View Code" command.
[kdbg.git] / kdbg / pgmargs.h
blobfb1ec766db52a53cb2fe480b1c8e5b474fa82bd1
1 /*
2 * Copyright Johannes Sixt
3 * This file is licensed under the GNU General Public License Version 2.
4 * See the file COPYING in the toplevel directory of the source directory.
5 */
7 #ifndef PgmArgs_included
8 #define PgmArgs_included
10 #include "pgmargsbase.h"
11 #include <qlineedit.h>
12 #include <qdict.h>
13 #include "envvar.h"
15 class QStringList;
17 class PgmArgs : public PgmArgsBase
19 Q_OBJECT
20 public:
21 PgmArgs(QWidget* parent, const QString& pgm, QDict<EnvVar>& envVars,
22 const QStringList& allOptions);
23 virtual ~PgmArgs();
25 void setArgs(const QString& text) { programArgs->setText(text); }
26 QString args() const { return programArgs->text(); }
27 void setOptions(const QStringList& selectedOptions);
28 QStringList options() const;
29 void setWd(const QString& wd) { wdEdit->setText(wd); }
30 QString wd() const { return wdEdit->text(); }
31 QDict<EnvVar>& envVars() { return m_envVars; }
33 protected:
34 QDict<EnvVar> m_envVars;
36 void initEnvList();
37 void parseEnvInput(QString& name, QString& value);
38 void modifyVar(bool resurrect);
40 protected slots:
41 void modifyVar();
42 void deleteVar();
43 void envListCurrentChanged();
44 void accept();
45 void browseWd();
46 void browseArgFile();
47 void browseArgDir();
48 void invokeHelp();
51 #endif // PgmArgs_included