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>
5
namespace
NDEVR
6
{
7
/**--------------------------------------------------------------------------------------------------
8
\brief A button which allows the user to check for software updates or update the software.
9
**/
10
class
NDEVR_WIDGETS_API
UpdateButton
:
public
Button
11
{
12
public
:
13
explicit
UpdateButton
(QWidget* parent =
nullptr
);
14
void
setUpdateChecker
(
UpdateChecker
* checker);
15
void
setUpdateAndCloseAppCallback
(
const
std::function<
void
(std::function<
void
()>)>& close_and_update_callback);
16
bool
hasChecker
()
const
;
17
protected
slots:
18
void
updateStateSlot
();
19
void
updatePercentSlot
();
20
protected
:
21
std::function<void(std::function<
void
()>)>
m_close_and_update_callback
;
22
UpdateChecker
*
m_checker
;
23
};
24
}
DLLInfo.h
NDEVR_WIDGETS_API
#define NDEVR_WIDGETS_API
Definition
DLLInfo.h:59
NDEVR::Button
A core widget that allows the user to click one of many button types.
Definition
Button.h:66
NDEVR::UpdateButton
A button which allows the user to check for software updates or update the software.
Definition
UpdateButton.h:11
NDEVR::UpdateButton::updateStateSlot
void updateStateSlot()
NDEVR::UpdateButton::updatePercentSlot
void updatePercentSlot()
NDEVR::UpdateButton::m_checker
UpdateChecker * m_checker
Definition
UpdateButton.h:22
NDEVR::UpdateButton::m_close_and_update_callback
std::function< void(std::function< void()>)> m_close_and_update_callback
Definition
UpdateButton.h:21
NDEVR::UpdateButton::setUpdateAndCloseAppCallback
void setUpdateAndCloseAppCallback(const std::function< void(std::function< void()>)> &close_and_update_callback)
NDEVR::UpdateButton::hasChecker
bool hasChecker() const
NDEVR::UpdateButton::UpdateButton
UpdateButton(QWidget *parent=nullptr)
NDEVR::UpdateButton::setUpdateChecker
void setUpdateChecker(UpdateChecker *checker)
NDEVR::UpdateChecker
Provides logic for checking a source, typically online, for an update to the software.
Definition
UpdateChecker.h:47
NDEVR
Definition
ACIColor.h:37
Widgets
Headers
UpdateButton.h