Skip to content

Commit bca14f9

Browse files
Re-format project with Google style.
1 parent 0a67704 commit bca14f9

18 files changed

Lines changed: 116 additions & 115 deletions

src/ffi/namespace/include/config.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
namespace Lazyboard::ffi {
66

7-
inline char *config_dir() {
8-
char *result = raw_config_dir();
7+
inline char* config_dir() {
8+
char* result = raw_config_dir();
99

1010
return result;
1111
}

src/ffi/namespace/include/utils.hxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,25 @@
33
#include "../../raw/utils.hxx"
44

55
namespace Lazyboard::ffi {
6-
inline OpenBrowserStatus open_browser(const char *url) {
7-
auto result = raw_open_browser(url);
6+
inline OpenBrowserStatus open_browser(const char* url) {
7+
auto result = raw_open_browser(url);
88

9-
return result;
9+
return result;
1010
}
1111

12-
inline CreateFileSystemStatus new_folder(const char *path) {
13-
auto result = raw_new_folder(path);
12+
inline CreateFileSystemStatus new_folder(const char* path) {
13+
auto result = raw_new_folder(path);
1414

15-
return result;
15+
return result;
1616
}
1717

18-
inline bool is_exists_path(char *path) {
19-
auto result = raw_is_path_exists(path);
18+
inline bool is_exists_path(char* path) {
19+
auto result = raw_is_path_exists(path);
2020

21-
return result;
21+
return result;
2222
}
2323

24-
inline void free_c_str(char *c_str) { raw_free_c_str(c_str); }
24+
inline void free_c_str(char* c_str) { raw_free_c_str(c_str); }
2525
} // namespace Lazyboard::ffi
2626

2727
#endif // UTILS_HXX

src/ffi/raw/config.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ enum WriteConfigStatus : uint8_t {
1616
GET_DATA_LOCAL_FAILED,
1717
};
1818

19-
char *raw_config_dir();
19+
char* raw_config_dir();
2020
WriteConfigStatus raw_write_default_config();
2121

2222
#ifdef __cplusplus

src/ffi/raw/utils.hxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ extern "C" {
99
using std::uint8_t;
1010

1111
enum class OpenBrowserStatus : uint8_t {
12-
OK,
13-
WRAP_RAW_C_FAILED,
14-
URL_IS_EMPTY,
15-
OPEN_BROWSER_FAILED,
12+
OK,
13+
WRAP_RAW_C_FAILED,
14+
URL_IS_EMPTY,
15+
OPEN_BROWSER_FAILED,
1616
};
1717

1818
enum class CreateFileSystemStatus : uint8_t {
19-
OK,
20-
WRAP_RAW_C_FAILED,
21-
FAILED,
19+
OK,
20+
WRAP_RAW_C_FAILED,
21+
FAILED,
2222
};
2323

24-
OpenBrowserStatus raw_open_browser(const char *url);
25-
CreateFileSystemStatus raw_new_folder(const char *path);
26-
bool raw_is_path_exists(const char *path);
27-
void raw_free_c_str(char *c_str);
24+
OpenBrowserStatus raw_open_browser(const char* url);
25+
CreateFileSystemStatus raw_new_folder(const char* path);
26+
bool raw_is_path_exists(const char* path);
27+
void raw_free_c_str(char* c_str);
2828

2929
#ifdef __cplusplus
3030
}

src/front_end/about_widget.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void Self::setup_event() {
2828
QObject::connect(show_about.get(), &QPushButton::clicked, function);
2929
}
3030

31-
void Self::setup_widget(QGridLayout *grid_layout) {
31+
void Self::setup_widget(QGridLayout* grid_layout) {
3232
show_about->setText("About");
3333
this->setup_event();
3434
grid_layout->addWidget(show_about.get(), 1, 1);

src/front_end/about_window.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void Self::is_open_browser_ok(OpenBrowserStatus status) {
4444
}
4545
}
4646

47-
void Self::open_browser_when_clicked(QPushButton *button, const char *url) {
47+
void Self::open_browser_when_clicked(QPushButton* button, const char* url) {
4848
const auto open_browser = [this, url] {
4949
auto status = Lazyboard::ffi::open_browser(url);
5050
is_open_browser_ok(status);

src/front_end/include/about_widget.hxx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,18 @@ using std::unique_ptr;
1212

1313
namespace Lazyboard::front_end {
1414
class AboutWidget {
15-
public:
16-
AboutWidget();
15+
public:
16+
AboutWidget();
1717

18-
private:
19-
unique_ptr<QPushButton> show_about;
20-
unique_ptr<AboutWindow> about_window;
18+
private:
19+
unique_ptr<QPushButton> show_about;
20+
unique_ptr<AboutWindow> about_window;
2121

22-
private:
23-
void setup_event();
22+
private:
23+
void setup_event();
2424

25-
public:
26-
void setup_widget(QGridLayout *layout);
25+
public:
26+
void setup_widget(QGridLayout* layout);
2727
};
2828

2929
} // namespace Lazyboard::front_end

src/front_end/include/about_window.hxx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,33 @@ using std::unique_ptr;
1212

1313
namespace Lazyboard::front_end {
1414
class AboutWindow {
15-
private:
16-
unique_ptr<QDialog> about_window;
17-
unique_ptr<QGridLayout> grid_layout;
18-
unique_ptr<QPushButton> github_button;
19-
unique_ptr<QPushButton> github_issue_button;
20-
unique_ptr<QPushButton> github_pull_button;
21-
22-
private:
23-
static constexpr int MIN_WIDTH = 600;
24-
static constexpr int MIN_HEIGHT = 600;
25-
const char *GITHUB_URL = "https://github.com/reim-developer/zClipboard";
26-
const char *GITHUB_ISSUE_URL =
27-
"https://github.com/reim-developer/zClipboard/issues";
28-
const char *GITHUB_PULL_URL =
29-
"https://github.com/reim-developer/zClipboard/pulls";
30-
31-
private:
32-
void is_open_browser_ok(OpenBrowserStatus status);
33-
void open_browser_when_clicked(QPushButton *button, const char *url);
34-
35-
private:
36-
void setup_front_end();
37-
void setup_buttons();
38-
39-
public:
40-
AboutWindow();
41-
void show_window();
15+
private:
16+
unique_ptr<QDialog> about_window;
17+
unique_ptr<QGridLayout> grid_layout;
18+
unique_ptr<QPushButton> github_button;
19+
unique_ptr<QPushButton> github_issue_button;
20+
unique_ptr<QPushButton> github_pull_button;
21+
22+
private:
23+
static constexpr int MIN_WIDTH = 600;
24+
static constexpr int MIN_HEIGHT = 600;
25+
const char* GITHUB_URL = "https://github.com/reim-developer/zClipboard";
26+
const char* GITHUB_ISSUE_URL =
27+
"https://github.com/reim-developer/zClipboard/issues";
28+
const char* GITHUB_PULL_URL =
29+
"https://github.com/reim-developer/zClipboard/pulls";
30+
31+
private:
32+
void is_open_browser_ok(OpenBrowserStatus status);
33+
void open_browser_when_clicked(QPushButton* button, const char* url);
34+
35+
private:
36+
void setup_front_end();
37+
void setup_buttons();
38+
39+
public:
40+
AboutWindow();
41+
void show_window();
4242
};
4343
} // namespace Lazyboard::front_end
4444

src/front_end/include/main_window.hxx

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,32 @@ using std::unique_ptr;
1818

1919
namespace Lazyboard::front_end {
2020
class MainWindow {
21-
private:
22-
using Self = MainWindow;
23-
using Window = QMainWindow;
24-
using Layout = QGridLayout;
25-
26-
private:
27-
static constexpr int MIN_WIDTH = 600;
28-
static constexpr int MIN_HEIGHT = 400;
29-
30-
public:
31-
MainWindow();
32-
33-
private:
34-
Layout *grid_layout;
35-
QWidget *central_widget;
36-
37-
private:
38-
unique_ptr<Window> main_window;
39-
unique_ptr<TableWidget> table_widget;
40-
unique_ptr<SettingWidget> setting_widget;
41-
unique_ptr<AboutWidget> about_widget;
42-
unique_ptr<MainWindowPreload> main_window_preload;
43-
44-
public:
45-
Self *init_main_window();
46-
void front_end_show();
21+
private:
22+
using Self = MainWindow;
23+
using Window = QMainWindow;
24+
using Layout = QGridLayout;
25+
26+
private:
27+
static constexpr int MIN_WIDTH = 600;
28+
static constexpr int MIN_HEIGHT = 400;
29+
30+
public:
31+
MainWindow();
32+
33+
private:
34+
Layout* grid_layout;
35+
QWidget* central_widget;
36+
37+
private:
38+
unique_ptr<Window> main_window;
39+
unique_ptr<TableWidget> table_widget;
40+
unique_ptr<SettingWidget> setting_widget;
41+
unique_ptr<AboutWidget> about_widget;
42+
unique_ptr<MainWindowPreload> main_window_preload;
43+
44+
public:
45+
Self* init_main_window();
46+
void front_end_show();
4747
};
4848
} // namespace Lazyboard::front_end
4949

src/front_end/include/main_window_preload.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77

88
namespace Lazyboard::front_end {
99
class MainWindowPreload {
10-
private:
11-
void on_error(WriteConfigStatus status, QMainWindow *main_window);
10+
private:
11+
void on_error(WriteConfigStatus status, QMainWindow* main_window);
1212

13-
public:
14-
void create_default_config(QMainWindow *main_window);
13+
public:
14+
void create_default_config(QMainWindow* main_window);
1515
};
1616
} // namespace Lazyboard::front_end
1717

0 commit comments

Comments
 (0)