File: pgmargs.h

package info (click to toggle)
kdbg 1.2.4-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 2,504 kB
  • ctags: 1,945
  • sloc: cpp: 15,961; sh: 8,183; makefile: 481; perl: 71; ansic: 16
file content (62 lines) | stat: -rw-r--r-- 1,532 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// $Id: pgmargs.h,v 1.7 2001/04/08 14:38:07 jsixt Exp $

// Copyright by Johannes Sixt
// This file is under GPL, the GNU General Public Licence

#ifndef PgmArgs_included
#define PgmArgs_included

#include <qdialog.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qlistview.h>
#include <qdict.h>
#include "envvar.h"

class PgmArgs : public QDialog
{
    Q_OBJECT
public:
    PgmArgs(QWidget* parent, const QString& pgm, QDict<EnvVar>& envVars);
    virtual ~PgmArgs();

    void setArgs(const QString& text) { m_programArgs.setText(text); }
    const char* args() const { return m_programArgs.text(); }
    void setWd(const QString& wd) { m_wd.setText(wd); }
    QString wd() const { return m_wd.text(); }
    QDict<EnvVar>& envVars() { return m_envVars; }

protected:
    QDict<EnvVar> m_envVars;

    void initEnvList();
    void parseEnvInput(QString& name, QString& value);

    QLabel m_label;
    QLineEdit m_programArgs;
    QLabel m_wdLabel;
    QLineEdit m_wd;
    QPushButton m_wdBrowse;
    QLabel m_envLabel;
    QLineEdit m_envVar;
    QListView m_envList;
    QPushButton m_buttonOK;
    QPushButton m_buttonCancel;
    QPushButton m_buttonModify;
    QPushButton m_buttonDelete;
    QHBoxLayout m_layout;
    QVBoxLayout m_edits;
    QVBoxLayout m_buttons;
    QHBoxLayout m_wdEdit;

protected slots:
    void modifyVar();
    void deleteVar();
    void envListCurrentChanged(QListViewItem*);
    void accept();
    void browseWd();
};

#endif // PgmArgs_included