aboutsummaryrefslogtreecommitdiff
path: root/libs/bsapacker/src/PackerDialog.h
blob: 843e842c828628f918f0a2739986d659f30a0010 (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
#ifndef PACKERDIALOG_H
#define PACKERDIALOG_H

#include <bsapacker/IPackerDialog.h>
#include <bsapacker/IModContext.h>

#include <QComboBox>
#include <QDialogButtonBox>
#include <QLabel>
#include <QHBoxLayout>
#include <QVBoxLayout>


namespace BsaPacker
{
	class PackerDialog : public QDialog, public IPackerDialog
	{
		Q_OBJECT
	public:
		explicit PackerDialog(const IModContext* modContext);
		~PackerDialog() override = default;

		// IPackerDialog interface
		[[nodiscard]] bool IsNewFilename() const override;
		void RefreshModList() override;
		[[nodiscard]] QString SelectedMod() const override;
		[[nodiscard]] QString SelectedPluginItem() const override;
		void UpdateNameList(const QString&) override;
		void RefreshSelectedName() override;
		int Exec() override;

	public Q_SLOTS:
		void RefreshOkButton() override;

	private:
		const IModContext* m_ModContext = nullptr;

		QComboBox comboModList;
		QLabel labelChooseMod;
		QLabel labelChooseName;
		QListWidget listArchiveNames;
		QVBoxLayout layoutVertical;
		QHBoxLayout layoutHorizontal;
		QDialogButtonBox buttonsOkCancelMod;
	};
} // namespace BsaPacker

#endif // PACKERDIALOG_H