From a2b70ee1d487a4c2321c52a4583f10baf18e288f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 19 Sep 2017 15:56:29 +0200 Subject: [PATCH] Fix code using re-imported spinner --- src/libcalamaresui/CMakeLists.txt | 2 +- src/libcalamaresui/widgets/WaitingWidget.cpp | 11 ++++++----- src/modules/partition/gui/ScanningDialog.cpp | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index ee039b46d..2169dbca1 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -20,7 +20,7 @@ list( APPEND ${CALAMARESUI_LIBRARY_TARGET}_SOURCES widgets/ClickableLabel.cpp widgets/FixedAspectRatioLabel.cpp - widgets/QtWaitingSpinner.cpp + widgets/waitingspinnerwidget.cpp widgets/WaitingWidget.cpp ExecutionViewStep.cpp diff --git a/src/libcalamaresui/widgets/WaitingWidget.cpp b/src/libcalamaresui/widgets/WaitingWidget.cpp index 55471eff3..03c977691 100644 --- a/src/libcalamaresui/widgets/WaitingWidget.cpp +++ b/src/libcalamaresui/widgets/WaitingWidget.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,7 +20,7 @@ #include "WaitingWidget.h" #include "utils/CalamaresUtilsGui.h" -#include "QtWaitingSpinner.h" +#include "waitingspinnerwidget.h" #include #include @@ -34,7 +35,7 @@ WaitingWidget::WaitingWidget( const QString& text, QWidget* parent ) waitingLayout->addLayout( pbLayout ); pbLayout->addStretch(); - QtWaitingSpinner* spnr = new QtWaitingSpinner(); + WaitingSpinnerWidget* spnr = new WaitingSpinnerWidget(); pbLayout->addWidget( spnr ); pbLayout->addStretch(); @@ -43,9 +44,9 @@ WaitingWidget::WaitingWidget( const QString& text, QWidget* parent ) int spnrSize = m_waitingLabel->fontMetrics().height() * 4; spnr->setFixedSize( spnrSize, spnrSize ); - spnr->setRadius( spnrSize / 2 ); - spnr->setLength( spnrSize / 2 ); - spnr->setWidth( spnrSize / 8 ); + spnr->setInnerRadius( spnrSize / 2 ); + spnr->setLineLength( spnrSize / 2 ); + spnr->setLineWidth( spnrSize / 8 ); spnr->start(); m_waitingLabel->setAlignment( Qt::AlignCenter ); diff --git a/src/modules/partition/gui/ScanningDialog.cpp b/src/modules/partition/gui/ScanningDialog.cpp index 76a1bc55f..85c0cb734 100644 --- a/src/modules/partition/gui/ScanningDialog.cpp +++ b/src/modules/partition/gui/ScanningDialog.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2015, Teo Mrnjavac + * Copyright 2017, Adriaan de Groot * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +19,7 @@ #include "ScanningDialog.h" -#include "widgets/QtWaitingSpinner.h" +#include "widgets/waitingspinnerwidget.h" #include #include @@ -37,7 +38,7 @@ ScanningDialog::ScanningDialog( const QString& text, QHBoxLayout* dialogLayout = new QHBoxLayout; setLayout( dialogLayout ); - QtWaitingSpinner* spinner = new QtWaitingSpinner; + WaitingSpinnerWidget* spinner = new WaitingSpinnerWidget(); dialogLayout->addWidget( spinner ); spinner->start();