2#include <NDEVR/UpdateButton.h>
3#include <NDEVR/InterfaceOrientationController.h>
4#include <NDEVR/Translator.h>
5#include <NDEVR/ApplicationResource.h>
18 TranslatedString app_update_dialog_title =
_td(
"app_update_dialog_title",
"[app_name] Updates");
21 QVBoxLayout* layout =
new QVBoxLayout();
22 QLabel* label =
new QLabel();
24 label->setWordWrap(
true);
25 label->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
26 label->setTextInteractionFlags(Qt::TextSelectableByMouse);
27 layout->addWidget(label);
28 QHBoxLayout* bottom_layout =
new QHBoxLayout();
31 update_button->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
32 bottom_layout->addWidget(update_button);
34 if (update_url.
size() > 0)
40 bottom_layout->addWidget(open_url_button);
41 open_url_button->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
48 ignore_button->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
49 bottom_layout->addWidget(ignore_button);
54 layout->addLayout(bottom_layout);
60 QSize size = QWidget::sizeHint();
61 size.setWidth(
cast<int>(size.width() * 1.5));
#define _t(english_string)
Definition Translator.h:87
#define _td(def, english_string)
Definition Translator.h:91
static Resource< TranslatedString > application_name
Definition ApplicationResource.h:133
static void OpenExplorerWindow(const String &location)
constexpr t_index_type size() const
Definition Buffer.hpp:1461
Definition CheckForUpdatesDialog.h:12
QSize sizeHint() const override
Definition CheckForUpdatesDialog.h:58
void hideRequestedSignal()
CheckForUpdatesDialog(const TranslatedString &message, String update_url, QWidget *parent=nullptr)
Definition CheckForUpdatesDialog.h:15
static InterfaceOrientationController & Default()
Definition InterfaceOrientationController.cpp:187
void run(QBoxLayout *l, QBoxLayout::Direction horz=QBoxLayout::LeftToRight, QBoxLayout::Direction vert=QBoxLayout::TopToBottom)
Definition InterfaceOrientationController.cpp:130
t_type getAs() const
Definition String.h:334
Definition TranslatedString.h:9
NDEVR_BASE_API TranslatedString & replace(const String &sub_string, const TranslatedString &replacement)
Definition TranslatedString.cpp:51
NDEVR_BASE_API const String & translation() const
Definition TranslatedString.cpp:104
constexpr t_to cast(const Angle< t_from > &value)
Definition Angle.h:514