-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #188 from minorsecond/update-develop
Various bugfixes and optimizations for version 1.1.0
- Loading branch information
Showing
19 changed files
with
1,085 additions
and
107 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// Created by rwardrup on 9/9/2020. | ||
// | ||
|
||
#include "ClearWarning.h" | ||
#include "Database.h" | ||
#include <QPushButton> | ||
|
||
ClearWarning::ClearWarning(QWidget *parent) { | ||
ui.setupUi(this); | ||
|
||
this->setFixedSize(400, 99); | ||
|
||
// Change the Clear button attributes | ||
ui.clearWarningButtons->button(QDialogButtonBox::Ok)->setText("Clear"); | ||
QColor clear_button_color = QColor(250, 180, 174); | ||
ui.clearWarningButtons->button(QDialogButtonBox::Ok)->setStyleSheet(QString("background:%1").arg(clear_button_color.name())); | ||
|
||
connect(ui.clearWarningButtons, SIGNAL(accepted()), this, SLOT(clear_database())); | ||
} | ||
|
||
void ClearWarning::clear_database() { | ||
std::string database_path = Database::set_db_path(); | ||
Storage storage = initStorage(database_path); | ||
Database::truncate(storage); | ||
} |
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 @@ | ||
// | ||
// Created by rwardrup on 9/9/2020. | ||
// | ||
|
||
#ifndef OWNLY_CLEARWARNING_H | ||
#define OWNLY_CLEARWARNING_H | ||
|
||
#include <QDialog> | ||
#include "ui_clear_warning.h" | ||
|
||
|
||
class ClearWarning : public QDialog, public Ui::ClearDialog { | ||
/* | ||
* QDialog methods | ||
*/ | ||
|
||
Q_OBJECT | ||
Ui::ClearDialog ui{}; | ||
|
||
public: | ||
explicit ClearWarning(QWidget *parent = nullptr); | ||
|
||
private slots: | ||
static void clear_database(); | ||
}; | ||
|
||
#endif //OWNLY_CLEARWARNING_H |
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
Oops, something went wrong.