Subversion Repositories tpanel

Rev

Rev 119 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 119 Rev 120
Line 22... Line 22...
22
 
22
 
23
#include "tqtbusy.h"
23
#include "tqtbusy.h"
24
#include "ui_busy.h"
24
#include "ui_busy.h"
25
#include "terror.h"
25
#include "terror.h"
26
 
26
 
27
Ui::TQtBusy::TQtBusy(const std::string& msg, QWidget* parent)
27
TQBusy::TQBusy(const std::string& msg, QWidget* parent)
28
    : QDialog(parent),
28
    : QDialog(parent),
29
      ui(new Ui::TQBusy)
29
      ui(new Ui::TQBusy)
30
{
30
{
31
    DECL_TRACER("TQBusy::TQBusy(const std::string& init, const std::string& prompt, QWidget* parent, bool priv)");
31
    DECL_TRACER("TQBusy::TQBusy(const std::string& init, const std::string& prompt, QWidget* parent, bool priv)");
32
 
32
 
33
    ui->setupUi(this);
33
    ui->setupUi(this);
34
    ui->quickWidget->setSource(QUrl("qrc:qrc/BusyIndicator.qml"));
34
    ui->quickWidget->setSource(QUrl("qrc:qrc/BusyIndicator.qml"));
35
    ui->label_Download->setText(msg.c_str());
35
    ui->label_Download->setText(msg.c_str());
36
}
36
}
37
 
37
 
38
Ui::TQtBusy::~TQtBusy()
38
TQBusy::~TQBusy()
39
{
39
{
40
    DECL_TRACER("TQBusy::~TQBusy()");
40
    DECL_TRACER("TQBusy::~TQBusy()");
-
 
41
 
-
 
42
    delete ui;
41
}
43
}
42
 
44
 
43
void Ui::TQtBusy::doResize()
45
void TQBusy::doResize()
44
{
46
{
45
    DECL_TRACER("TQtBusy::doResize()");
47
    DECL_TRACER("TQBusy::doResize()");
46
 
48
 
47
    if (mScaleFactor == 0.0 || mScaleFactor == 1.0)
49
    if (mScaleFactor == 0.0 || mScaleFactor == 1.0)
48
        return;
50
        return;
49
 
51
 
50
    QRect rect = this->geometry();
52
    QRect rect = this->geometry();
Line 88... Line 90...
88
            lb->move(scale(rect.left()), scale(rect.top()));
90
            lb->move(scale(rect.left()), scale(rect.top()));
89
        }
91
        }
90
    }
92
    }
91
}
93
}
92
 
94
 
93
int Ui::TQtBusy::scale(int value)
95
int TQBusy::scale(int value)
94
{
96
{
95
    if (value <= 0 || mScaleFactor == 1.0)
97
    if (value <= 0 || mScaleFactor == 1.0)
96
        return value;
98
        return value;
97
 
99
 
98
    return (int)((double)value * mScaleFactor);
100
    return (int)((double)value * mScaleFactor);