swift
countryselector.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_COUNTRYSELECTOR_H
7 #define SWIFT_GUI_COMPONENTS_COUNTRYSELECTOR_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 
12 #include "misc/country.h"
13 
14 namespace Ui
15 {
16  class CCountrySelector;
17 }
18 namespace swift::gui::components
19 {
23  class CCountrySelector : public QFrame
24  {
25  Q_OBJECT
26 
27  public:
29  explicit CCountrySelector(QWidget *parent = nullptr);
30 
32  virtual ~CCountrySelector();
33 
35  void setCountry(const swift::misc::CCountry &country);
36 
38  const swift::misc::CCountry &getCountry() const { return m_current; }
39 
40  signals:
42  void countryChanged(const swift::misc::CCountry &country);
43 
44  private:
46  void onCountriesLoaded();
47 
49  void onIsoChanged();
50 
52  void onCountryNameChanged(const QString &name);
53 
54  swift::misc::CCountry m_current;
55  QScopedPointer<Ui::CCountrySelector> ui;
56  };
57 } // namespace swift::gui::components
58 #endif // SWIFT_GUI_COMPONENTS_COUNTRYSELECTOR_H
const swift::misc::CCountry & getCountry() const
Get country.
CCountrySelector(QWidget *parent=nullptr)
Constructor.
void countryChanged(const swift::misc::CCountry &country)
Changed country.
void setCountry(const swift::misc::CCountry &country)
Set country.
High level reusable GUI components.
Definition: aboutdialog.cpp:13