ORE Studio 0.0.4
Loading...
Searching...
No Matches
PartyPickerDialog.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * Copyright (C) 2026 Marco Craveiro <marco.craveiro@gmail.com>
4 *
5 * This program is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License as published by the Free Software
7 * Foundation; either version 3 of the License, or (at your option) any later
8 * version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13 * details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 */
20#ifndef ORES_QT_PARTYPICKERDIALOG_HPP
21#define ORES_QT_PARTYPICKERDIALOG_HPP
22
23#include <vector>
24#include <QDialog>
25#include <QLabel>
26#include <QListWidget>
27#include <QPushButton>
28#include <boost/uuid/uuid.hpp>
29#include "ores.qt/ClientManager.hpp"
30
31namespace ores::qt {
32
39class PartyPickerDialog : public QDialog {
40 Q_OBJECT
41
42public:
50 explicit PartyPickerDialog(
51 const std::vector<PartyInfo>& parties,
52 ClientManager* clientManager,
53 QWidget* parent = nullptr);
54
58 boost::uuids::uuid selectedPartyId() const;
59
63 QString selectedPartyName() const;
64
65private slots:
66 void onOkClicked();
67
68private:
69 void setupUi();
70
71private:
72 QListWidget* listWidget_;
73 QPushButton* okButton_;
74 QPushButton* cancelButton_;
75 ClientManager* clientManager_;
76 std::vector<PartyInfo> parties_;
77};
78
79}
80
81#endif
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Modal dialog for selecting a party from a list of available parties.
Definition PartyPickerDialog.hpp:39
QString selectedPartyName() const
Get the name of the selected party.
Definition PartyPickerDialog.cpp:59
boost::uuids::uuid selectedPartyId() const
Get the UUID of the selected party.
Definition PartyPickerDialog.cpp:51