aboutsummaryrefslogtreecommitdiff
path: root/include/widgets/edit_server_dialog.h
blob: 3c4595ec21e05456dc5234fe02d2c1cb51055040 (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
#pragma once

#ifndef EDIT_SERVER_DIALOG_H
#define EDIT_SERVER_DIALOG_H

#include "interfaces/server_dialog.h"

class QPushButton;
class QDialogButton;
class QLabel;
class QLineEdit;
class QComboBox;
class QSpinBox;
class QPlainTextEdit;
class QDialogButtonBox;

class EditServerDialog : public AttorneyOnline::UI::FavoriteServerDialog {
  Q_OBJECT
public:
    EditServerDialog(int index);
    ~EditServerDialog() = default;

private:
  QWidget *ui_widget;

  QLineEdit *ui_server_display_name_edit;
  QLineEdit *ui_server_hostname_edit;
  QSpinBox *ui_server_port_box;
  QComboBox *ui_server_protocol_box;
  QPlainTextEdit *ui_server_description_edit;
  QDialogButtonBox *ui_server_dialog_button;

  // Legacy Server UI
  QLabel *ui_server_legacy_lbl;
  QLineEdit *ui_server_legacy_edit;
  QPushButton *ui_server_legacy_load_button;

  int index;
  void loadEntry();

private slots:
  void onSavePressed() override;
  void onCancelPressed() override;
};

#endif // EDIT_SERVER_DIALOG_H