diff --git a/Widgets/Countdown.cpp b/Widgets/Countdown.cpp deleted file mode 100644 index 9ffac6e..0000000 --- a/Widgets/Countdown.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2018 Florian Muecke. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE.txt file. - -#include "Countdown.h" -#include "ui_countdown.h" - -Countdown::Countdown(int secs, QWidget* parent) - : QDialog(parent) - , ui(new Ui::Countdown) - , m_seconds(secs) -{ - ui->setupUi(this); - - ui->scaledText->SetColor(QColor(0, 0, 0), QColor(0xF7, 0xF7, 0xDE)); - ui->scaledText->SetText(QString::number(m_seconds)); - setWindowFlags(Qt::Dialog); - - timer.start(1000, this); -} - -Countdown::~Countdown() -{ - delete ui; -} - -void Countdown::changeEvent(QEvent* e) -{ - QWidget::changeEvent(e); - - switch (e->type()) - { - case QEvent::LanguageChange: - ui->retranslateUi(this); - break; - - default: - break; - } -} - -void Countdown::timerEvent(QTimerEvent* event) -{ - if (event->timerId() == timer.timerId()) - { - --m_seconds; - - if (m_seconds <= 0) - accept(); - - ui->scaledText->SetText(QString::number(m_seconds)); - update(); - } - else - { - QWidget::timerEvent(event); - } -} diff --git a/Widgets/Countdown.h b/Widgets/Countdown.h deleted file mode 100644 index cde4a34..0000000 --- a/Widgets/Countdown.h +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2018 Florian Muecke. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE.txt file. - -#ifndef WIDGETS__COUNTDOWN_H_ -#define WIDGETS__COUNTDOWN_H_ - -#include -#include - -namespace Ui -{ -class Countdown; -} - -class Countdown : public QDialog -{ - Q_OBJECT - -public: - explicit Countdown(int secs, QWidget* parent = 0); - virtual ~Countdown(); - -protected: - void changeEvent(QEvent* e); - void timerEvent(QTimerEvent* e); - -private: - Ui::Countdown* ui; - int m_seconds; - QBasicTimer timer; - -private slots: -}; - -#endif // WIDGETS__COUNTDOWN_H_ diff --git a/Widgets/Countdown.ui b/Widgets/Countdown.ui deleted file mode 100644 index 7a071d1..0000000 --- a/Widgets/Countdown.ui +++ /dev/null @@ -1,62 +0,0 @@ - - - Countdown - - - Qt::ApplicationModal - - - - 0 - 0 - 300 - 100 - - - - - 0 - 0 - - - - Please update your version... - - - - :/res/images/logo.png:/res/images/logo.png - - - 0.900000000000000 - - - - - - - - - - 0 - - - 0 - - - - - - - - - ScaledText - QWidget -
../Widgets/ScaledText.h
- 1 -
-
- - - - -