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.
Merge #315 [stable-3.14] nmc/2003-Folderwizard_Settings_Dialog_New
- Loading branch information
Showing
13 changed files
with
521 additions
and
26 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
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,41 @@ | ||
/* | ||
* 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 "nmcfolderwizard.h" | ||
|
||
/** | ||
* Folder wizard itself | ||
*/ | ||
|
||
namespace OCC { | ||
|
||
NMCFolderWizard::NMCFolderWizard(AccountPtr account, QWidget *parent) | ||
:FolderWizard(account, parent) | ||
{ | ||
setWizardStyle(QWizard::ClassicStyle); | ||
setButtonText(QWizard::FinishButton, QCoreApplication::translate("", "ADD_SYNCHRONIZATION")); | ||
|
||
//Source page | ||
auto sourceUi = _folderWizardSourcePage->getUi(); | ||
sourceUi.localFolderLineEdit->clear(); | ||
sourceUi.localFolderLineEdit->setPlaceholderText(QCoreApplication::translate("", "ADD_LIVE_BACKUP_PLACEHOLDER_TEXT")); | ||
sourceUi.setDefaultSettings(); | ||
sourceUi.changeLayout(); | ||
|
||
//Target page | ||
auto targetUi = _folderWizardTargetPage->getUi(); | ||
targetUi.setDefaultSettings(); | ||
targetUi.setLayout(); | ||
} | ||
|
||
} // end namespace |
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,50 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#ifndef MIRALL_NMCFolderWizard_H | ||
#define MIRALL_NMCFolderWizard_H | ||
|
||
#include "folderwizard.h" | ||
|
||
/** | ||
* @brief The NMCFolderWizard class represents a specific folder wizard for the NMC application. | ||
* @ingroup gui | ||
* | ||
* The NMCFolderWizard class is derived from the FolderWizard class and provides additional functionality | ||
* specific to the NMC (replace with the actual application name) application. | ||
*/ | ||
|
||
namespace OCC { | ||
|
||
class NMCFolderWizard : public FolderWizard | ||
{ | ||
Q_OBJECT | ||
public: | ||
/** | ||
* @brief Constructs an instance of NMCFolderWizard. | ||
* @param account The account associated with the wizard. | ||
* @param parent The parent widget (default is nullptr). | ||
*/ | ||
explicit NMCFolderWizard(OCC::AccountPtr account, QWidget *parent = nullptr); | ||
|
||
/** | ||
* @brief Destroys the NMCFolderWizard instance. | ||
*/ | ||
~NMCFolderWizard() = default; | ||
}; | ||
|
||
} // namespace OCC | ||
|
||
#endif | ||
|
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,81 @@ | ||
/* | ||
* 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 "nmcfolderwizardsourcepage.h" | ||
#include "theme.h" | ||
|
||
namespace OCC { | ||
|
||
NMCFolderWizardSourcePage::NMCFolderWizardSourcePage() | ||
:FolderWizardSourcePage() | ||
{ | ||
|
||
} | ||
|
||
void NMCFolderWizardSourcePage::setDefaultSettings() | ||
{ | ||
groupBox->setVisible(false); | ||
} | ||
|
||
void NMCFolderWizardSourcePage::changeLayout() | ||
{ | ||
gridLayout_2->setContentsMargins(0, 0, 0, 0); | ||
|
||
QLabel *stepLabel = new QLabel(); | ||
stepLabel->setText(QCoreApplication::translate("", "ADD_LIVE_BACKUP_HEADLINE")); | ||
stepLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
stepLabel->setStyleSheet("QLabel{color: black; font-size: 13px; font-weight: bold;}"); | ||
|
||
gridLayout_2->addWidget(stepLabel, 0, 0, Qt::AlignTop | Qt::AlignLeft); | ||
|
||
QWidget *mainLayoutWidget = new QWidget(); | ||
mainLayoutWidget->setStyleSheet(""); | ||
|
||
auto *whiteLayout = new QGridLayout; | ||
mainLayoutWidget->setObjectName("mainLayoutWidget"); | ||
mainLayoutWidget->setStyleSheet("QWidget#mainLayoutWidget { background-color: white; border-radius: 4px;}"); | ||
mainLayoutWidget->setLayout(whiteLayout); | ||
|
||
QLabel *textLabel = new QLabel(); | ||
textLabel->setText(QCoreApplication::translate("", "ADD_LIVE_BACKUP_PAGE1_DESCRIPTION")); | ||
textLabel->setWordWrap(true); | ||
textLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
|
||
whiteLayout->addWidget(textLabel, 0, 0); | ||
|
||
gridLayout_2->removeWidget(localFolderLineEdit); | ||
localFolderLineEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); | ||
whiteLayout->addWidget(localFolderLineEdit, 1, 0); | ||
|
||
localFolderChooseBtn->setAutoDefault(true); | ||
localFolderChooseBtn->setDefault(true); | ||
localFolderChooseBtn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); | ||
//localFolderChooseBtn->setFixedHeight(10); | ||
whiteLayout->addWidget(localFolderChooseBtn, 1, 1); | ||
|
||
gridLayout_2->addWidget(mainLayoutWidget, 1, 0, 1, 3); | ||
|
||
gridLayout_2->removeWidget(warnLabel); | ||
gridLayout_2->addWidget(warnLabel, 2, 0, 1, 3); | ||
|
||
warnLabel->setStyleSheet("border: 0px; border-radius: 4px; background-color: #fee2d0"); | ||
|
||
gridLayout_2->removeItem(verticalSpacer); | ||
gridLayout_2->addItem(verticalSpacer, 3, 0, 1, 3); | ||
} | ||
|
||
} // end namespace | ||
|
||
|
||
|
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,57 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
#ifndef MIRALL_NMCFolderWizardSourcePage_H | ||
#define MIRALL_NMCFolderWizardSourcePage_H | ||
|
||
#include "ui_folderwizardsourcepage.h" | ||
|
||
/** | ||
* @brief The NMCFolderWizardSourcePage class represents a source page for the NMCFolderWizard. | ||
* @ingroup gui | ||
* | ||
* The NMCFolderWizardSourcePage class is derived from the Ui::FolderWizardSourcePage class and provides | ||
* additional functionality specific to the NMCFolderWizard in the NMC application (replace with the actual application name). | ||
*/ | ||
|
||
namespace OCC { | ||
|
||
class NMCFolderWizardSourcePage : public ::Ui::FolderWizardSourcePage | ||
{ | ||
|
||
public: | ||
/** | ||
* @brief Constructs an instance of NMCFolderWizardSourcePage. | ||
*/ | ||
explicit NMCFolderWizardSourcePage(); | ||
|
||
/** | ||
* @brief Destroys the NMCFolderWizardSourcePage instance. | ||
*/ | ||
~NMCFolderWizardSourcePage() = default; | ||
|
||
/** | ||
* @brief Sets default settings for the NMCFolderWizardSourcePage. | ||
*/ | ||
void setDefaultSettings(); | ||
|
||
/** | ||
* @brief Changes the layout of the NMCFolderWizardSourcePage. | ||
*/ | ||
void changeLayout(); | ||
}; | ||
|
||
} // namespace OCC | ||
|
||
#endif |
Oops, something went wrong.