@@ -16,72 +16,72 @@ using std::make_unique;
1616using Self = AboutWindow;
1717
1818AboutWindow::AboutWindow () {
19- about_window = make_unique<QDialog>();
20- grid_layout = make_unique<QGridLayout>();
21- github_button = make_unique<QPushButton>();
22- github_issue_button = make_unique<QPushButton>();
23- github_pull_button = make_unique<QPushButton>();
19+ about_window = make_unique<QDialog>();
20+ grid_layout = make_unique<QGridLayout>();
21+ github_button = make_unique<QPushButton>();
22+ github_issue_button = make_unique<QPushButton>();
23+ github_pull_button = make_unique<QPushButton>();
2424}
2525
2626void Self::is_open_browser_ok (OpenBrowserStatus status) {
27- switch (status) {
28- case OpenBrowserStatus::OK:
29- break ;
30-
31- case OpenBrowserStatus::OPEN_BROWSER_FAILED:
32- QMessageBox::critical (about_window.get (), " Error" ,
33- " Could not open your browser" );
34- break ;
35-
36- case OpenBrowserStatus::WRAP_RAW_C_FAILED:
37- QMessageBox::critical (about_window.get (), " Error" ,
38- " Could not wrap C raw to safety string" );
39-
40- break ;
41- case OpenBrowserStatus::URL_IS_EMPTY:
42- QMessageBox::critical (about_window.get (), " Error" , " Url is empty" );
43- break ;
44- }
27+ switch (status) {
28+ case OpenBrowserStatus::OK:
29+ break ;
30+
31+ case OpenBrowserStatus::OPEN_BROWSER_FAILED:
32+ QMessageBox::critical (about_window.get (), " Error" ,
33+ " Could not open your browser" );
34+ break ;
35+
36+ case OpenBrowserStatus::WRAP_RAW_C_FAILED:
37+ QMessageBox::critical (about_window.get (), " Error" ,
38+ " Could not wrap C raw to safety string" );
39+
40+ break ;
41+ case OpenBrowserStatus::URL_IS_EMPTY:
42+ QMessageBox::critical (about_window.get (), " Error" , " Url is empty" );
43+ break ;
44+ }
4545}
4646
47- void Self::open_browser_when_clicked (QPushButton* button, const char * url) {
48- const auto open_browser = [this , url] {
49- auto status = Lazyboard::ffi::open_browser (url);
50- is_open_browser_ok (status);
51- };
47+ void Self::open_browser_when_clicked (QPushButton * button, const char * url) {
48+ const auto open_browser = [this , url] {
49+ auto status = Lazyboard::ffi::open_browser (url);
50+ is_open_browser_ok (status);
51+ };
5252
53- QObject::connect (button, &QPushButton::clicked, open_browser);
53+ QObject::connect (button, &QPushButton::clicked, open_browser);
5454}
5555
5656void Self::setup_buttons () {
57- github_button->setText (" GitHub | Source Code" );
58- github_button->setToolTip (" Get Lazyboard source code" );
57+ github_button->setText (" GitHub | Source Code" );
58+ github_button->setToolTip (" Get Lazyboard source code" );
5959
60- github_issue_button->setText (" Issue | Bug Report" );
61- github_issue_button->setToolTip (" Report issue/bug" );
60+ github_issue_button->setText (" Issue | Bug Report" );
61+ github_issue_button->setToolTip (" Report issue/bug" );
6262
63- github_pull_button->setText (" Pull Request | Contribute" );
64- github_pull_button->setToolTip (" Contribute" );
63+ github_pull_button->setText (" Pull Request | Contribute" );
64+ github_pull_button->setToolTip (" Contribute" );
6565
66- this ->open_browser_when_clicked (github_button.get (), GITHUB_URL);
67- this ->open_browser_when_clicked (github_issue_button.get (),
68- GITHUB_ISSUE_URL);
69- this ->open_browser_when_clicked (github_pull_button.get (), GITHUB_PULL_URL);
66+ this ->open_browser_when_clicked (github_button.get (), GITHUB_URL);
67+ this ->open_browser_when_clicked (github_issue_button.get (),
68+ GITHUB_ISSUE_URL);
69+ this ->open_browser_when_clicked (github_pull_button.get (), GITHUB_PULL_URL);
7070
71- grid_layout->addWidget (github_button.get (), 0 , 0 );
72- grid_layout->addWidget (github_issue_button.get (), 0 , 1 );
73- grid_layout->addWidget (github_pull_button.get (), 1 , 0 );
71+ grid_layout->addWidget (github_button.get (), 0 , 0 );
72+ grid_layout->addWidget (github_issue_button.get (), 0 , 1 );
73+ grid_layout->addWidget (github_pull_button.get (), 1 , 0 );
7474}
7575
7676void Self::setup_front_end () {
77- about_window->setLayout (this ->grid_layout .get ());
78- this ->setup_buttons ();
77+ about_window->setLayout (this ->grid_layout .get ());
78+ this ->setup_buttons ();
7979}
8080
8181void Self::show_window () {
82- about_window->setMinimumSize (MIN_WIDTH, MIN_HEIGHT);
83- about_window->setWindowTitle (" Lazyboard About" );
82+ about_window->setMinimumSize (MIN_WIDTH, MIN_HEIGHT);
83+ about_window->setWindowTitle (" Lazyboard About" );
8484
85- this ->setup_front_end ();
86- about_window->exec ();
85+ this ->setup_front_end ();
86+ about_window->exec ();
8787}
0 commit comments