-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3.0 Added support for Backup OS & Set Time. Documentation. Splash sc…
…reen tidy up. Iconcache. Update it, zh_TW translations
- Loading branch information
Showing
47 changed files
with
2,065 additions
and
664 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
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,60 @@ | ||
#include "json.h" | ||
#include "backupdialog.h" | ||
#include "util.h" | ||
#include "ui_backupdialog.h" | ||
|
||
#include <QDebug> | ||
|
||
backupdialog::backupdialog(QVariantMap &Map, QWidget *parent) : | ||
QDialog(parent), | ||
ui(new Ui::backupdialog), _map(Map) | ||
{ | ||
ui->setupUi(this); | ||
|
||
QString description; | ||
QString name; | ||
QString datetime; | ||
|
||
QString fullname; | ||
if (_map.contains("backupName")) | ||
fullname = _map.value("backupName").toString(); | ||
else if (_map.contains("name")) | ||
fullname = _map.value("name").toString(); | ||
|
||
name = getNameParts(fullname, eCORE); | ||
datetime = getNameParts(fullname, eDATE|eSPLIT); | ||
|
||
if (_map.contains("description")) | ||
description = _map.value("description").toString(); | ||
|
||
ui->nameEdit->setText(name); | ||
ui->datetimeEdit->setText(datetime); | ||
ui->descriptionEdit->setText(description); | ||
} | ||
|
||
backupdialog::~backupdialog() | ||
{ | ||
delete ui; | ||
} | ||
|
||
|
||
void backupdialog::on_buttonBox_accepted() | ||
{ | ||
QString core = ui->nameEdit->text(); | ||
QString datetime = ui->datetimeEdit->text(); | ||
QString description = ui->descriptionEdit->text(); | ||
|
||
datetime.remove(QChar('#')); | ||
datetime.remove(QChar('=')); | ||
datetime.remove(QChar('@')); | ||
|
||
//Set backupName to datetime | ||
QString name = _map.value("backupName").toString(); | ||
QStringList parts = splitNameParts(name); | ||
setNameParts(parts, eDATE, datetime); | ||
name = joinNameParts(parts); | ||
|
||
//Update map with new name & Description | ||
_map["backupName"] = name.replace(" ","_"); | ||
_map["description"] = description; | ||
} |
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,27 @@ | ||
#ifndef backupdialog_H | ||
#define backupdialog_H | ||
|
||
#include <QDialog> | ||
#include <QVariantMap> | ||
|
||
namespace Ui { | ||
class backupdialog; | ||
} | ||
|
||
class backupdialog : public QDialog | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit backupdialog(QVariantMap &map, QWidget *parent = 0); | ||
~backupdialog(); | ||
|
||
private slots: | ||
void on_buttonBox_accepted(); | ||
|
||
private: | ||
Ui::backupdialog *ui; | ||
QVariantMap &_map; | ||
}; | ||
|
||
#endif // backupdialog_H |
Oops, something went wrong.