summaryrefslogtreecommitdiff
path: root/src/ui/quickdialog.h
blob: e292d94611e0c7170c28f65082865b8d211fc9a0 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// SPDX-License-Identifier: GPL-2.0-or-later

#ifndef FQTERM_QUICK_DIALOG_H
#define FQTERM_QUICK_DIALOG_H

#include "fqterm_param.h"
#include "ui_quickdialog.h"
//Added by qt3to4:
//#include <QCloseEvent>

class QCloseEvent;
class QResizeEvent;

namespace FQTerm {

class FQTermConfig;

class quickDialog: public QDialog {
  Q_OBJECT;
 public:
  quickDialog(FQTermConfig *, QWidget *parent_ = 0, Qt::WindowFlags fl = 0);
  ~quickDialog();

  FQTermParam param_;

  static const int ports[];

 protected slots:
  void listChanged(int);  //
  void onAdd();
  void onDelete();
  void onAdvance();
  void onConnect(); //
  void onClose();
  void onSelectProtocol(int index);
  void portCheckToggled(bool);

 private:

  void closeEvent(QCloseEvent*);  //
  void connectSlots();
  void loadHistory(); //
  void setUIFromParam();
  void setParamFromUI();
  void loadParam(int index);
  void saveParam(int index);

  FQTermConfig *config_;

 private:
  Ui::quickDialog ui_;
};

}  // namespace FQTerm

#endif // FQTERM_QUICK_DIALOG_H