API Documentation
Loading...
Searching...
No Matches
UpdateButton.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/Button.h>
4#include <NDEVR/UpdateChecker.h>
5namespace NDEVR
6{
7 /**--------------------------------------------------------------------------------------------------
8 \brief A button which allows the user to check for software updates or update the software.
9 **/
11 {
12 public:
13 explicit UpdateButton(QWidget* parent = nullptr);
15 void setUpdateAndCloseAppCallback(const std::function<void(std::function<void()>)>& close_and_update_callback);
16 bool hasChecker() const;
17 protected slots:
20 protected:
21 std::function<void(std::function<void()>)> m_close_and_update_callback;
23 };
24}
#define NDEVR_WIDGETS_API
Definition DLLInfo.h:59
A core widget that allows the user to click one of many button types.
Definition Button.h:66
A button which allows the user to check for software updates or update the software.
Definition UpdateButton.h:11
UpdateChecker * m_checker
Definition UpdateButton.h:22
std::function< void(std::function< void()>)> m_close_and_update_callback
Definition UpdateButton.h:21
void setUpdateAndCloseAppCallback(const std::function< void(std::function< void()>)> &close_and_update_callback)
bool hasChecker() const
UpdateButton(QWidget *parent=nullptr)
void setUpdateChecker(UpdateChecker *checker)
Provides logic for checking a source, typically online, for an update to the software.
Definition UpdateChecker.h:47
Definition ACIColor.h:37