2018-07-04 20:42:51 +02:00
|
|
|
#pragma once
|
|
|
|
|
2018-07-05 11:42:40 +02:00
|
|
|
#include "pajlada/signals/signalholder.hpp"
|
|
|
|
#include "singletons/Updates.hpp"
|
2018-07-04 20:42:51 +02:00
|
|
|
#include "widgets/BaseWindow.hpp"
|
|
|
|
#include "widgets/Label.hpp"
|
|
|
|
|
2018-07-05 11:42:40 +02:00
|
|
|
class QPushButton;
|
|
|
|
|
2018-07-04 20:42:51 +02:00
|
|
|
namespace chatterino {
|
|
|
|
|
2018-07-05 16:04:39 +02:00
|
|
|
class UpdateDialog : public BaseWindow
|
2018-07-04 20:42:51 +02:00
|
|
|
{
|
|
|
|
public:
|
2018-07-05 18:17:12 +02:00
|
|
|
enum Button { Dismiss, Install };
|
2018-07-05 11:42:40 +02:00
|
|
|
|
2018-07-05 16:04:39 +02:00
|
|
|
UpdateDialog();
|
2018-07-04 20:42:51 +02:00
|
|
|
|
2018-07-05 11:42:40 +02:00
|
|
|
pajlada::Signals::Signal<Button> buttonClicked;
|
|
|
|
|
2018-07-04 20:42:51 +02:00
|
|
|
private:
|
2018-07-05 11:42:40 +02:00
|
|
|
void updateStatusChanged(Updates::Status status);
|
|
|
|
|
2018-07-04 20:42:51 +02:00
|
|
|
struct {
|
2018-07-05 11:42:40 +02:00
|
|
|
Label *label = nullptr;
|
|
|
|
QPushButton *installButton = nullptr;
|
2018-07-04 20:42:51 +02:00
|
|
|
} ui_;
|
2018-07-05 11:42:40 +02:00
|
|
|
|
|
|
|
pajlada::Signals::SignalHolder connections_;
|
2018-07-04 20:42:51 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace chatterino
|