2009-03-02 14:04:03 +01:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2009-03-02 14:04:03 +01:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2009-03-02 14:04:03 +01:00
|
|
|
**
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2009-03-02 14:04:03 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2009-03-02 14:04:03 +01:00
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
|
|
#ifndef DEBUGGER_DIALOGS_H
|
|
|
|
|
#define DEBUGGER_DIALOGS_H
|
|
|
|
|
|
2012-06-26 15:25:49 +02:00
|
|
|
#include <QDialog>
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QHash>
|
|
|
|
|
#include <QStringList>
|
2009-03-02 14:04:03 +01:00
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
2009-03-02 15:14:12 +01:00
|
|
|
class QModelIndex;
|
2009-03-04 16:48:13 +01:00
|
|
|
class QPushButton;
|
2009-08-19 14:41:51 +02:00
|
|
|
class QLineEdit;
|
|
|
|
|
class QDialogButtonBox;
|
2012-02-06 15:15:57 +01:00
|
|
|
class QSettings;
|
2011-11-24 13:00:01 +01:00
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
2012-06-28 10:00:04 +02:00
|
|
|
namespace Core { class Id; }
|
2012-06-26 15:25:49 +02:00
|
|
|
namespace ProjectExplorer { class Profile; }
|
2009-03-02 15:14:12 +01:00
|
|
|
|
2011-11-23 15:15:01 +00:00
|
|
|
namespace Debugger {
|
2012-02-06 15:15:57 +01:00
|
|
|
class DebuggerStartParameters;
|
|
|
|
|
|
2011-11-23 15:15:01 +00:00
|
|
|
namespace Internal {
|
2011-11-24 13:00:01 +01:00
|
|
|
|
2012-06-28 13:30:09 +02:00
|
|
|
class AttachCoreDialogPrivate;
|
|
|
|
|
class AttachExternalDialogPrivate;
|
|
|
|
|
class AttachToQmlPortDialogPrivate;
|
2009-03-05 17:30:29 +01:00
|
|
|
class ProcessListFilterModel;
|
2012-06-28 13:30:09 +02:00
|
|
|
class StartExternalDialogPrivate;
|
2012-02-06 15:15:57 +01:00
|
|
|
class StartExternalParameters;
|
2012-06-28 13:30:09 +02:00
|
|
|
class StartRemoteDialogPrivate;
|
|
|
|
|
class StartRemoteEngineDialogPrivate;
|
2012-02-06 15:15:57 +01:00
|
|
|
class StartRemoteParameters;
|
2009-03-05 17:30:29 +01:00
|
|
|
|
2009-03-02 15:14:12 +01:00
|
|
|
class AttachCoreDialog : public QDialog
|
2009-03-02 14:04:03 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit AttachCoreDialog(QWidget *parent);
|
2009-03-02 15:14:12 +01:00
|
|
|
~AttachCoreDialog();
|
2009-03-02 14:04:03 +01:00
|
|
|
|
|
|
|
|
void setExecutableFile(const QString &executable);
|
|
|
|
|
void setCoreFile(const QString &core);
|
|
|
|
|
|
|
|
|
|
QString executableFile() const;
|
|
|
|
|
QString coreFile() const;
|
2009-03-02 15:14:12 +01:00
|
|
|
|
2012-06-26 15:25:49 +02:00
|
|
|
int profileIndex() const;
|
|
|
|
|
void setProfileIndex(int);
|
2012-06-28 10:00:04 +02:00
|
|
|
Core::Id profileId() const;
|
2011-05-30 12:32:58 +02:00
|
|
|
|
2011-05-03 14:57:05 +02:00
|
|
|
QString overrideStartScript() const;
|
|
|
|
|
void setOverrideStartScript(const QString &scriptName);
|
|
|
|
|
|
2011-02-24 16:50:15 +01:00
|
|
|
private slots:
|
|
|
|
|
void changed();
|
|
|
|
|
|
2009-03-02 15:14:12 +01:00
|
|
|
private:
|
2011-02-24 16:50:15 +01:00
|
|
|
bool isValid() const;
|
|
|
|
|
|
2012-06-28 13:30:09 +02:00
|
|
|
AttachCoreDialogPrivate *d;
|
2009-03-02 14:04:03 +01:00
|
|
|
};
|
|
|
|
|
|
2009-03-02 15:14:12 +01:00
|
|
|
class AttachExternalDialog : public QDialog
|
2009-03-02 14:04:03 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit AttachExternalDialog(QWidget *parent);
|
2009-03-02 15:14:12 +01:00
|
|
|
~AttachExternalDialog();
|
|
|
|
|
|
2009-05-25 16:22:11 +02:00
|
|
|
qint64 attachPID() const;
|
2010-03-17 10:57:19 +01:00
|
|
|
QString executable() const;
|
2009-03-02 14:04:03 +01:00
|
|
|
|
2012-06-26 15:25:49 +02:00
|
|
|
int profileIndex() const;
|
|
|
|
|
void setProfileIndex(int);
|
2012-06-28 10:00:04 +02:00
|
|
|
Core::Id profileId() const;
|
2011-02-24 16:50:15 +01:00
|
|
|
|
2012-06-26 15:25:49 +02:00
|
|
|
void accept();
|
2010-10-22 14:03:25 +02:00
|
|
|
|
2009-03-02 14:04:03 +01:00
|
|
|
private slots:
|
|
|
|
|
void rebuildProcessList();
|
2010-03-09 12:25:43 +01:00
|
|
|
void procSelected(const QModelIndex &index);
|
|
|
|
|
void procClicked(const QModelIndex &index);
|
|
|
|
|
void pidChanged(const QString &index);
|
2009-10-05 09:19:38 +02:00
|
|
|
void setFilterString(const QString &filter);
|
2009-03-02 14:04:03 +01:00
|
|
|
|
|
|
|
|
private:
|
2009-03-04 16:48:13 +01:00
|
|
|
inline QPushButton *okButton() const;
|
2010-03-17 10:57:19 +01:00
|
|
|
inline QString attachPIDText() const;
|
2009-03-04 16:48:13 +01:00
|
|
|
|
2012-06-28 13:30:09 +02:00
|
|
|
AttachExternalDialogPrivate *d;
|
2009-03-02 14:04:03 +01:00
|
|
|
};
|
|
|
|
|
|
2009-05-07 09:35:11 +02:00
|
|
|
class StartExternalDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit StartExternalDialog(QWidget *parent);
|
|
|
|
|
~StartExternalDialog();
|
|
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
static bool run(QWidget *parent, QSettings *settings, DebuggerStartParameters *sp);
|
2009-05-07 09:35:11 +02:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
private slots:
|
|
|
|
|
void changed();
|
|
|
|
|
void historyIndexChanged(int);
|
2010-05-12 11:48:00 +02:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
private:
|
|
|
|
|
StartExternalParameters parameters() const;
|
|
|
|
|
void setParameters(const StartExternalParameters &p);
|
2012-06-28 13:30:09 +02:00
|
|
|
void setHistory(const QList<StartExternalParameters> &l);
|
2012-02-06 15:15:57 +01:00
|
|
|
|
|
|
|
|
QString executableFile() const;
|
|
|
|
|
void setExecutableFile(const QString &executable);
|
2010-05-12 11:48:00 +02:00
|
|
|
|
2012-06-28 10:00:04 +02:00
|
|
|
Core::Id profileId() const;
|
2011-02-24 16:50:15 +01:00
|
|
|
bool isValid() const;
|
|
|
|
|
|
2012-06-28 13:30:09 +02:00
|
|
|
StartExternalDialogPrivate *d;
|
2009-05-07 09:35:11 +02:00
|
|
|
};
|
|
|
|
|
|
2009-05-06 13:27:11 +02:00
|
|
|
class StartRemoteDialog : public QDialog
|
2009-03-02 14:04:03 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2011-09-14 15:22:08 +02:00
|
|
|
explicit StartRemoteDialog(QWidget *parent, bool enableStartScript);
|
2009-05-06 13:27:11 +02:00
|
|
|
~StartRemoteDialog();
|
2009-03-02 15:14:12 +01:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
static bool run(QWidget *parent, QSettings *settings,
|
|
|
|
|
bool useScript, DebuggerStartParameters *sp);
|
2010-05-12 11:48:00 +02:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
private slots:
|
|
|
|
|
void updateState();
|
|
|
|
|
void historyIndexChanged(int);
|
2011-05-03 14:57:05 +02:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
private:
|
|
|
|
|
StartRemoteParameters parameters() const;
|
|
|
|
|
void setParameters(const StartRemoteParameters &);
|
|
|
|
|
void setHistory(const QList<StartRemoteParameters> &);
|
2011-12-16 18:50:28 +01:00
|
|
|
|
2012-02-06 15:15:57 +01:00
|
|
|
void setRemoteArchitectures(const QStringList &list);
|
2010-05-12 11:48:00 +02:00
|
|
|
|
2012-06-28 10:00:04 +02:00
|
|
|
Core::Id profileId() const;
|
2009-03-02 14:04:03 +01:00
|
|
|
|
2012-06-28 13:30:09 +02:00
|
|
|
StartRemoteDialogPrivate *d;
|
2009-03-02 14:04:03 +01:00
|
|
|
};
|
|
|
|
|
|
2011-09-13 17:26:02 +02:00
|
|
|
class AttachToQmlPortDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit AttachToQmlPortDialog(QWidget *parent);
|
|
|
|
|
~AttachToQmlPortDialog();
|
|
|
|
|
|
|
|
|
|
QString host() const;
|
|
|
|
|
void setHost(const QString &host);
|
|
|
|
|
|
|
|
|
|
int port() const;
|
|
|
|
|
void setPort(const int port);
|
|
|
|
|
|
2012-06-28 10:00:04 +02:00
|
|
|
Core::Id profileId() const;
|
|
|
|
|
void setProfileId(const Core::Id &id);
|
2011-10-11 15:21:00 +02:00
|
|
|
|
2011-09-13 17:26:02 +02:00
|
|
|
private:
|
2012-06-28 10:00:04 +02:00
|
|
|
AttachToQmlPortDialogPrivate *d;
|
2011-09-13 17:26:02 +02:00
|
|
|
};
|
|
|
|
|
|
2010-11-19 16:13:22 +01:00
|
|
|
class StartRemoteCdbDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit StartRemoteCdbDialog(QWidget *parent);
|
|
|
|
|
~StartRemoteCdbDialog();
|
|
|
|
|
|
|
|
|
|
QString connection() const;
|
|
|
|
|
void setConnection(const QString &);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void textChanged(const QString &);
|
|
|
|
|
|
|
|
|
|
private:
|
2012-06-26 15:25:49 +02:00
|
|
|
void accept();
|
|
|
|
|
|
2010-11-19 16:13:22 +01:00
|
|
|
QPushButton *m_okButton;
|
|
|
|
|
QLineEdit *m_lineEdit;
|
|
|
|
|
};
|
|
|
|
|
|
2011-05-30 12:56:26 +02:00
|
|
|
class AddressDialog : public QDialog
|
|
|
|
|
{
|
2009-08-19 14:41:51 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
explicit AddressDialog(QWidget *parent = 0);
|
2011-05-04 11:58:54 +02:00
|
|
|
|
|
|
|
|
void setAddress(quint64 a);
|
2009-08-19 14:41:51 +02:00
|
|
|
quint64 address() const;
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
void textChanged();
|
|
|
|
|
|
|
|
|
|
private:
|
2012-06-26 15:25:49 +02:00
|
|
|
void accept();
|
|
|
|
|
|
2009-08-19 14:41:51 +02:00
|
|
|
void setOkButtonEnabled(bool v);
|
|
|
|
|
bool isOkButtonEnabled() const;
|
|
|
|
|
|
|
|
|
|
bool isValid() const;
|
|
|
|
|
|
|
|
|
|
QLineEdit *m_lineEdit;
|
|
|
|
|
QDialogButtonBox *m_box;
|
|
|
|
|
};
|
2009-08-12 10:51:25 +02:00
|
|
|
|
2011-11-07 20:07:14 +01:00
|
|
|
typedef QHash<QString, QStringList> TypeFormats;
|
|
|
|
|
|
2010-12-01 15:41:08 +01:00
|
|
|
class StartRemoteEngineDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit StartRemoteEngineDialog(QWidget *parent);
|
|
|
|
|
~StartRemoteEngineDialog();
|
|
|
|
|
QString username() const;
|
|
|
|
|
QString host() const;
|
|
|
|
|
QString password() const;
|
|
|
|
|
QString enginePath() const;
|
|
|
|
|
QString inferiorPath() const;
|
|
|
|
|
|
|
|
|
|
private:
|
2012-06-28 13:30:09 +02:00
|
|
|
StartRemoteEngineDialogPrivate *d;
|
2010-12-01 15:41:08 +01:00
|
|
|
};
|
|
|
|
|
|
2011-11-07 20:07:14 +01:00
|
|
|
class TypeFormatsDialogUi;
|
|
|
|
|
|
|
|
|
|
class TypeFormatsDialog : public QDialog
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit TypeFormatsDialog(QWidget *parent);
|
|
|
|
|
~TypeFormatsDialog();
|
|
|
|
|
|
|
|
|
|
void addTypeFormats(const QString &type, const QStringList &formats,
|
|
|
|
|
int currentFormat);
|
|
|
|
|
TypeFormats typeFormats() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
TypeFormatsDialogUi *m_ui;
|
|
|
|
|
};
|
|
|
|
|
|
2009-03-02 14:04:03 +01:00
|
|
|
} // namespace Debugger
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
|
|
|
|
|
#endif // DEBUGGER_DIALOGS_H
|