Skip to content

Commit d65f800

Browse files
committed
linearize
1 parent 2357b2f commit d65f800

File tree

4 files changed

+1123
-1094
lines changed

4 files changed

+1123
-1094
lines changed

bin/main.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ auto main(int number_of_arguments, char *arguments[]) -> int {
66
QApplication const app(number_of_arguments, arguments);
77

88
set_up();
9-
auto* song_editor_pointer = make_song_editor();
10-
show_song_editor(song_editor_pointer);
9+
auto& song_editor = make_song_editor();
10+
show_song_editor(song_editor);
1111
QApplication::exec();
12-
delete_song_editor(song_editor_pointer);
12+
delete_song_editor(song_editor);
1313
}

include/justly/justly.hpp

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -50,46 +50,46 @@ enum JUSTLY_EXPORT UnpitchedNoteColumn {
5050
};
5151

5252
void JUSTLY_EXPORT set_up();
53-
[[nodiscard]] auto JUSTLY_EXPORT make_song_editor() -> SongEditor *;
54-
void JUSTLY_EXPORT show_song_editor(SongEditor *song_editor_pointer);
55-
void JUSTLY_EXPORT delete_song_editor(SongEditor *song_editor_pointer);
53+
[[nodiscard]] auto JUSTLY_EXPORT make_song_editor() -> SongEditor &;
54+
void JUSTLY_EXPORT show_song_editor(SongEditor& song_editor);
55+
void JUSTLY_EXPORT delete_song_editor(SongEditor& song_editor);
5656

5757
[[nodiscard]] auto JUSTLY_EXPORT get_table_view(
58-
const SongEditor *song_editor_pointer) -> QAbstractItemView &;
58+
const SongEditor& song_editor) -> QAbstractItemView &;
5959

6060
[[nodiscard]] auto JUSTLY_EXPORT get_chords_model(
61-
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
61+
SongEditor& song_editor) -> QAbstractItemModel &;
6262
[[nodiscard]] auto JUSTLY_EXPORT get_pitched_notes_model(
63-
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
63+
SongEditor& song_editor) -> QAbstractItemModel &;
6464
[[nodiscard]] auto JUSTLY_EXPORT get_unpitched_notes_model(
65-
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
65+
SongEditor& song_editor) -> QAbstractItemModel &;
6666

67-
void JUSTLY_EXPORT trigger_edit_pitched_notes(SongEditor *song_editor_pointer,
67+
void JUSTLY_EXPORT trigger_edit_pitched_notes(SongEditor& song_editor,
6868
int chord_number);
69-
void JUSTLY_EXPORT trigger_edit_unpitched_notes(SongEditor *song_editor_pointer,
69+
void JUSTLY_EXPORT trigger_edit_unpitched_notes(SongEditor& song_editor,
7070
int chord_number);
7171
void JUSTLY_EXPORT
72-
trigger_back_to_chords(SongEditor *song_editor_pointer);
72+
trigger_back_to_chords(SongEditor& song_editor);
7373

74-
[[nodiscard]] auto JUSTLY_EXPORT get_gain(const SongEditor *song_editor_pointer)
74+
[[nodiscard]] auto JUSTLY_EXPORT get_gain(const SongEditor& song_editor)
7575
-> double;
7676
[[nodiscard]] auto JUSTLY_EXPORT
77-
get_starting_key(const SongEditor *song_editor_pointer) -> double;
77+
get_starting_key(const SongEditor& song_editor) -> double;
7878
[[nodiscard]] auto JUSTLY_EXPORT
79-
get_starting_velocity(const SongEditor *song_editor_pointer) -> double;
79+
get_starting_velocity(const SongEditor& song_editor) -> double;
8080
[[nodiscard]] auto JUSTLY_EXPORT
81-
get_starting_tempo(const SongEditor *song_editor_pointer) -> double;
81+
get_starting_tempo(const SongEditor& song_editor) -> double;
8282

8383
[[nodiscard]] auto JUSTLY_EXPORT
84-
get_current_file(const SongEditor *song_editor_pointer) -> QString;
84+
get_current_file(const SongEditor& song_editor) -> QString;
8585

86-
void JUSTLY_EXPORT set_gain(const SongEditor *song_editor_pointer,
86+
void JUSTLY_EXPORT set_gain(const SongEditor& song_editor,
8787
double new_value);
88-
void JUSTLY_EXPORT set_starting_key(const SongEditor *song_editor_pointer,
88+
void JUSTLY_EXPORT set_starting_key(const SongEditor& song_editor,
8989
double new_value);
90-
void JUSTLY_EXPORT set_starting_velocity(const SongEditor *song_editor_pointer,
90+
void JUSTLY_EXPORT set_starting_velocity(const SongEditor& song_editor,
9191
double new_value);
92-
void JUSTLY_EXPORT set_starting_tempo(const SongEditor *song_editor_pointer,
92+
void JUSTLY_EXPORT set_starting_tempo(const SongEditor& song_editor,
9393
double new_value);
9494

9595
[[nodiscard]] auto JUSTLY_EXPORT
@@ -99,27 +99,27 @@ void JUSTLY_EXPORT set_editor(const QAbstractItemView& table_view,
9999
QWidget& cell_editor_pointer, QModelIndex index,
100100
const QVariant &new_value);
101101

102-
void JUSTLY_EXPORT undo(const SongEditor *song_editor_pointer);
102+
void JUSTLY_EXPORT undo(const SongEditor& song_editor);
103103

104-
void JUSTLY_EXPORT trigger_insert_after(SongEditor *song_editor_pointer);
105-
void JUSTLY_EXPORT trigger_insert_into(SongEditor *song_editor_pointer);
106-
void JUSTLY_EXPORT trigger_delete_cells(SongEditor *song_editor_pointer);
107-
void JUSTLY_EXPORT trigger_remove_rows(SongEditor *song_editor_pointer);
104+
void JUSTLY_EXPORT trigger_insert_after(SongEditor& song_editor);
105+
void JUSTLY_EXPORT trigger_insert_into(SongEditor& song_editor);
106+
void JUSTLY_EXPORT trigger_delete_cells(SongEditor& song_editor);
107+
void JUSTLY_EXPORT trigger_remove_rows(SongEditor& song_editor);
108108

109-
void JUSTLY_EXPORT trigger_cut(SongEditor *song_editor_pointer);
110-
void JUSTLY_EXPORT trigger_copy(SongEditor *song_editor_pointer);
111-
void JUSTLY_EXPORT trigger_paste_over(SongEditor *song_editor_pointer);
112-
void JUSTLY_EXPORT trigger_paste_after(SongEditor *song_editor_pointer);
113-
void JUSTLY_EXPORT trigger_paste_into(SongEditor *song_editor_pointer);
109+
void JUSTLY_EXPORT trigger_cut(SongEditor& song_editor);
110+
void JUSTLY_EXPORT trigger_copy(SongEditor& song_editor);
111+
void JUSTLY_EXPORT trigger_paste_over(SongEditor& song_editor);
112+
void JUSTLY_EXPORT trigger_paste_after(SongEditor& song_editor);
113+
void JUSTLY_EXPORT trigger_paste_into(SongEditor& song_editor);
114114

115-
void JUSTLY_EXPORT trigger_save(SongEditor *song_editor_pointer);
115+
void JUSTLY_EXPORT trigger_save(SongEditor& song_editor);
116116

117-
void JUSTLY_EXPORT trigger_play(SongEditor *song_editor_pointer);
118-
void JUSTLY_EXPORT trigger_stop_playing(SongEditor *song_editor_pointer);
117+
void JUSTLY_EXPORT trigger_play(SongEditor& song_editor);
118+
void JUSTLY_EXPORT trigger_stop_playing(SongEditor& song_editor);
119119

120-
void JUSTLY_EXPORT open_file(SongEditor *song_editor_pointer,
120+
void JUSTLY_EXPORT open_file(SongEditor& song_editor,
121121
const QString &filename);
122-
void JUSTLY_EXPORT save_as_file(SongEditor *song_editor_pointer,
122+
void JUSTLY_EXPORT save_as_file(SongEditor& song_editor,
123123
const QString &filename);
124-
void JUSTLY_EXPORT export_to_file(SongEditor *song_editor_pointer,
124+
void JUSTLY_EXPORT export_to_file(SongEditor& song_editor,
125125
const QString &output_file);

0 commit comments

Comments
 (0)