summaryrefslogtreecommitdiff
path: root/gui/settingsdialog.h
blob: 3aeecbbd3a46c77bc573315eae5609cea74bfa8d (plain)
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
#pragma once

#include "trace_api.hpp"
#include "apitracefilter.h"
#include "ui_settings.h"
#include <QDialog>
#include <QRegExp>


class SettingsDialog : public QDialog, public Ui_Settings
{
    Q_OBJECT
public:
    SettingsDialog(QWidget *parent = 0);
    void accept() override;

    void setFilterModel(ApiTraceFilter *filter);

private slots:
    void changeRegexp(const QString &name);
    void regexpChanged(const QString &pattern);
    void adbPathChanged(const QString &adbPath);
    void chooseAdbPathPushed();
    void stdoutPortChanged(int port);
    void stderrPortChanged(int port);

private:
    void filtersFromModel(const ApiTraceFilter *model);
    void filtersToModel(ApiTraceFilter *model);

private:
    QMap<QString, QRegExp> m_showFilters;
    ApiTraceFilter *m_filter;
};