mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 17:49:27 +02:00
More coding standard stuff
This commit is contained in:
parent
44efcdf82a
commit
eab4ad9ea9
5 changed files with 11 additions and 6 deletions
|
@ -20,7 +20,7 @@ class AddressBarDialog : public OffscreenQmlDialog
|
||||||
QML_DIALOG_DECL
|
QML_DIALOG_DECL
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AddressBarDialog(QQuickItem* parent = 0);
|
AddressBarDialog(QQuickItem* parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void displayAddressOfflineMessage();
|
void displayAddressOfflineMessage();
|
||||||
|
|
|
@ -25,9 +25,9 @@ class LoginDialog : public OffscreenQmlDialog
|
||||||
public:
|
public:
|
||||||
static void toggleAction();
|
static void toggleAction();
|
||||||
|
|
||||||
LoginDialog(QQuickItem* parent = 0);
|
LoginDialog(QQuickItem* parent = nullptr);
|
||||||
|
|
||||||
void setStatusText(const QString& a);
|
void setStatusText(const QString& statusText);
|
||||||
QString statusText() const;
|
QString statusText() const;
|
||||||
|
|
||||||
QString rootUrl() const;
|
QString rootUrl() const;
|
||||||
|
|
|
@ -14,5 +14,5 @@ OffscreenQmlDialog::OffscreenQmlDialog(QQuickItem* parent)
|
||||||
: QQuickItem(parent) { }
|
: QQuickItem(parent) { }
|
||||||
|
|
||||||
void OffscreenQmlDialog::hide() {
|
void OffscreenQmlDialog::hide() {
|
||||||
((QQuickItem*)parent())->setEnabled(false);
|
static_cast<QQuickItem*>(parent())->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class OffscreenQmlDialog : public QQuickItem
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
OffscreenQmlDialog(QQuickItem* parent = 0);
|
OffscreenQmlDialog(QQuickItem* parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void hide();
|
void hide();
|
||||||
|
|
|
@ -14,6 +14,11 @@
|
||||||
#include <QGLWidget>
|
#include <QGLWidget>
|
||||||
#include <QtQml>
|
#include <QtQml>
|
||||||
|
|
||||||
|
// Time between receiving a request to render the offscreen UI actually triggering
|
||||||
|
// the render. Could possibly be increased depending on the framerate we expect to
|
||||||
|
// achieve.
|
||||||
|
static const int SMALL_INTERVAL = 5;
|
||||||
|
|
||||||
class OffscreenUiRoot : public QQuickItem {
|
class OffscreenUiRoot : public QQuickItem {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
@ -76,7 +81,7 @@ void OffscreenUi::create(QOpenGLContext* shareContext) {
|
||||||
// When Quick says there is a need to render, we will not render immediately. Instead,
|
// When Quick says there is a need to render, we will not render immediately. Instead,
|
||||||
// a timer with a small interval is used to get better performance.
|
// a timer with a small interval is used to get better performance.
|
||||||
_updateTimer.setSingleShot(true);
|
_updateTimer.setSingleShot(true);
|
||||||
_updateTimer.setInterval(5);
|
_updateTimer.setInterval(SMALL_INTERVAL);
|
||||||
connect(&_updateTimer, &QTimer::timeout, this, &OffscreenUi::updateQuick);
|
connect(&_updateTimer, &QTimer::timeout, this, &OffscreenUi::updateQuick);
|
||||||
|
|
||||||
// Now hook up the signals. For simplicy we don't differentiate between
|
// Now hook up the signals. For simplicy we don't differentiate between
|
||||||
|
|
Loading…
Reference in a new issue