forked from nextcloud/desktop
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Eugen Fischer
authored and
Eugen Fischer
committed
Jan 6, 2024
1 parent
344fc08
commit 8a5f12c
Showing
12 changed files
with
133 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/* | ||
* Copyright (C) by Eugen Fischer | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
|
||
#include "nmcgui/magentaWizardPage.h" | ||
#include "QtWidgets/qpushbutton.h" | ||
#include "theme.h" | ||
#include "wizard/ui_welcomepage.h" | ||
#include "wizard/welcomepage.h" | ||
|
||
namespace OCC { | ||
|
||
MagentaWizardPage::MagentaWizardPage(OwncloudWizard *ocWizard) | ||
: WelcomePage(ocWizard) | ||
{ | ||
this->layout()->removeItem(_ui->horizontalLayout); | ||
_ui->hostYourOwnServerLabel->setVisible(false); | ||
_ui->loginButton->setVisible(false); | ||
_ui->createAccountButton->setVisible(false); | ||
_ui->slideShow->startShow(2500); | ||
|
||
setFinalPage(true); | ||
} | ||
|
||
int MagentaWizardPage::nextId() const | ||
{ | ||
return -1; | ||
} | ||
|
||
bool MagentaWizardPage::isComplete() const | ||
{ | ||
return true; | ||
} | ||
|
||
void MagentaWizardPage::styleSlideShow() | ||
{ | ||
const auto theme = Theme::instance(); | ||
const auto backgroundColor = palette().window().color(); | ||
|
||
const QString page1FileName = QString(":/client/theme/NMCIcons/page1.png"); | ||
const QString page2FileName = QString(":/client/theme/NMCIcons/page2.png"); | ||
const QString page3FileName = QString(":/client/theme/NMCIcons/page3.png"); | ||
|
||
_ui->slideShow->addSlide(page1FileName, tr("Page 1")); | ||
_ui->slideShow->addSlide(page2FileName, tr("Page 2")); | ||
_ui->slideShow->addSlide(page3FileName, tr("Page 3")); | ||
|
||
const auto isDarkBackground = Theme::isDarkColor(backgroundColor); | ||
_ui->slideShowNextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), isDarkBackground)); | ||
_ui->slideShowPreviousButton->setIcon(theme->uiThemeIcon(QString("control-prev.svg"), isDarkBackground)); | ||
} | ||
|
||
void MagentaWizardPage::setLoginButtonDefault() | ||
{ | ||
//No login button available, keep empty | ||
} | ||
|
||
|
||
} // namespace OCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (C) by Eugen Fischer | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* for more details. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "QtWidgets/qboxlayout.h" | ||
#include "wizard/welcomepage.h" | ||
|
||
namespace OCC { | ||
|
||
class MagentaWizardPage : public WelcomePage | ||
{ | ||
Q_OBJECT | ||
public: | ||
MagentaWizardPage(OwncloudWizard *ocWizard); | ||
[[nodiscard]] int nextId() const override; | ||
bool isComplete() const override; | ||
|
||
protected: | ||
void styleSlideShow() override final; | ||
void setLoginButtonDefault() override final; | ||
}; | ||
|
||
} // namespace OCC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.