diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-24 20:11:50 -0500 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-24 20:11:50 -0500 |
| commit | cd876a0f9ffd03c711812c2ade92836e5d6c0203 (patch) | |
| tree | cf472e0d3aa07e874721eb069a3a5d99f7ccf3f2 /src/lootdialog.h | |
| parent | f5476531ae39fdae8c3adc63d4c4a11f92600ff8 (diff) | |
split loot dialog, added ui file
Diffstat (limited to 'src/lootdialog.h')
| -rw-r--r-- | src/lootdialog.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/lootdialog.h b/src/lootdialog.h new file mode 100644 index 00000000..e4647b5c --- /dev/null +++ b/src/lootdialog.h @@ -0,0 +1,47 @@ +#ifndef MODORGANIZER_LOOTDIALOG_H +#define MODORGANIZER_LOOTDIALOG_H + +#include <lootcli/lootcli.h> +#include <log.h> + +namespace Ui { class LootDialog; } + +class OrganizerCore; +class Loot; + +class LootDialog : public QDialog +{ +public: + LootDialog(QWidget* parent, OrganizerCore& core, Loot& loot); + ~LootDialog(); + + void setText(const QString& s); + void setProgress(lootcli::Progress p); + + QString progressToString(lootcli::Progress p); + + void addOutput(const QString& s); + + bool result() const; + + void cancel(); + + void openReport(); + +private: + std::unique_ptr<Ui::LootDialog> ui; + OrganizerCore& m_core; + Loot& m_loot; + bool m_finished; + bool m_cancelling; + + void createUI(); + void closeEvent(QCloseEvent* e) override; + void onButton(QAbstractButton* b); + void addLineOutput(const QString& line); + void onFinished(); + void log(MOBase::log::Levels lv, const QString& s); + void handleReport(); +}; + +#endif // MODORGANIZER_LOOTDIALOG_H |
