Skip to content

Commit

Permalink
linearize
Browse files Browse the repository at this point in the history
  • Loading branch information
bramtayl committed Nov 21, 2024
1 parent 2357b2f commit 2be9415
Show file tree
Hide file tree
Showing 4 changed files with 1,096 additions and 1,083 deletions.
6 changes: 3 additions & 3 deletions bin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ auto main(int number_of_arguments, char *arguments[]) -> int {
QApplication const app(number_of_arguments, arguments);

set_up();
auto* song_editor_pointer = make_song_editor();
show_song_editor(song_editor_pointer);
auto& song_editor = make_song_editor();
show_song_editor(song_editor);
QApplication::exec();
delete_song_editor(song_editor_pointer);
delete_song_editor(song_editor);
}
70 changes: 35 additions & 35 deletions include/justly/justly.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,46 +50,46 @@ enum JUSTLY_EXPORT UnpitchedNoteColumn {
};

void JUSTLY_EXPORT set_up();
[[nodiscard]] auto JUSTLY_EXPORT make_song_editor() -> SongEditor *;
void JUSTLY_EXPORT show_song_editor(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT delete_song_editor(SongEditor *song_editor_pointer);
[[nodiscard]] auto JUSTLY_EXPORT make_song_editor() -> SongEditor &;
void JUSTLY_EXPORT show_song_editor(SongEditor& song_editor);
void JUSTLY_EXPORT delete_song_editor(SongEditor& song_editor);

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

[[nodiscard]] auto JUSTLY_EXPORT get_chords_model(
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
SongEditor& song_editor) -> QAbstractItemModel &;
[[nodiscard]] auto JUSTLY_EXPORT get_pitched_notes_model(
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
SongEditor& song_editor) -> QAbstractItemModel &;
[[nodiscard]] auto JUSTLY_EXPORT get_unpitched_notes_model(
SongEditor *song_editor_pointer) -> QAbstractItemModel &;
SongEditor& song_editor) -> QAbstractItemModel &;

void JUSTLY_EXPORT trigger_edit_pitched_notes(SongEditor *song_editor_pointer,
void JUSTLY_EXPORT trigger_edit_pitched_notes(SongEditor& song_editor,
int chord_number);
void JUSTLY_EXPORT trigger_edit_unpitched_notes(SongEditor *song_editor_pointer,
void JUSTLY_EXPORT trigger_edit_unpitched_notes(SongEditor& song_editor,
int chord_number);
void JUSTLY_EXPORT
trigger_back_to_chords(SongEditor *song_editor_pointer);
trigger_back_to_chords(SongEditor& song_editor);

[[nodiscard]] auto JUSTLY_EXPORT get_gain(const SongEditor *song_editor_pointer)
[[nodiscard]] auto JUSTLY_EXPORT get_gain(const SongEditor& song_editor)
-> double;
[[nodiscard]] auto JUSTLY_EXPORT
get_starting_key(const SongEditor *song_editor_pointer) -> double;
get_starting_key(const SongEditor& song_editor) -> double;
[[nodiscard]] auto JUSTLY_EXPORT
get_starting_velocity(const SongEditor *song_editor_pointer) -> double;
get_starting_velocity(const SongEditor& song_editor) -> double;
[[nodiscard]] auto JUSTLY_EXPORT
get_starting_tempo(const SongEditor *song_editor_pointer) -> double;
get_starting_tempo(const SongEditor& song_editor) -> double;

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

void JUSTLY_EXPORT set_gain(const SongEditor *song_editor_pointer,
void JUSTLY_EXPORT set_gain(const SongEditor& song_editor,
double new_value);
void JUSTLY_EXPORT set_starting_key(const SongEditor *song_editor_pointer,
void JUSTLY_EXPORT set_starting_key(const SongEditor& song_editor,
double new_value);
void JUSTLY_EXPORT set_starting_velocity(const SongEditor *song_editor_pointer,
void JUSTLY_EXPORT set_starting_velocity(const SongEditor& song_editor,
double new_value);
void JUSTLY_EXPORT set_starting_tempo(const SongEditor *song_editor_pointer,
void JUSTLY_EXPORT set_starting_tempo(const SongEditor& song_editor,
double new_value);

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

void JUSTLY_EXPORT undo(const SongEditor *song_editor_pointer);
void JUSTLY_EXPORT undo(const SongEditor& song_editor);

void JUSTLY_EXPORT trigger_insert_after(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_insert_into(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_delete_cells(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_remove_rows(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_insert_after(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_insert_into(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_delete_cells(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_remove_rows(SongEditor& song_editor);

void JUSTLY_EXPORT trigger_cut(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_copy(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_paste_over(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_paste_after(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_paste_into(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_cut(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_copy(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_paste_over(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_paste_after(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_paste_into(SongEditor& song_editor);

void JUSTLY_EXPORT trigger_save(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_save(SongEditor& song_editor);

void JUSTLY_EXPORT trigger_play(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_stop_playing(SongEditor *song_editor_pointer);
void JUSTLY_EXPORT trigger_play(SongEditor& song_editor);
void JUSTLY_EXPORT trigger_stop_playing(SongEditor& song_editor);

void JUSTLY_EXPORT open_file(SongEditor *song_editor_pointer,
void JUSTLY_EXPORT open_file(SongEditor& song_editor,
const QString &filename);
void JUSTLY_EXPORT save_as_file(SongEditor *song_editor_pointer,
void JUSTLY_EXPORT save_as_file(SongEditor& song_editor,
const QString &filename);
void JUSTLY_EXPORT export_to_file(SongEditor *song_editor_pointer,
void JUSTLY_EXPORT export_to_file(SongEditor& song_editor,
const QString &output_file);
Loading

0 comments on commit 2be9415

Please sign in to comment.