Skip to content

Commit

Permalink
refactor: SlotSelect use camelCase signals
Browse files Browse the repository at this point in the history
  • Loading branch information
sithlord48 committed Jun 14, 2024
1 parent 81a517b commit 789fbf9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
12 changes: 8 additions & 4 deletions src/widgets/data/SlotSelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,14 @@ void SlotSelect::setSlotPreview(int s)
preview[s]->setPSXText(Slottext);
}

connect(preview[s], &SlotPreview::clicked, this, &SlotSelect::button_clicked);
connect(preview[s], &SlotPreview::remove, this, &SlotSelect::remove_slot);
connect(preview[s], &SlotPreview::copy, this, &SlotSelect::copy_slot);
connect(preview[s], &SlotPreview::paste, this, &SlotSelect::paste_slot);
connect(preview[s], &SlotPreview::clicked, this, &SlotSelect::select);
connect(preview[s], &SlotPreview::remove, this, &SlotSelect::remove);
connect(preview[s], &SlotPreview::copy, this, &SlotSelect::copy);
connect(preview[s], &SlotPreview::paste, this, &SlotSelect::paste);
/*Remove in 2.0*/ connect(preview[s], &SlotPreview::clicked, this, &SlotSelect::button_clicked);
/*Remove in 2.0*/ connect(preview[s], &SlotPreview::remove, this, &SlotSelect::remove_slot);
/*Remove in 2.0*/ connect(preview[s], &SlotPreview::copy, this, &SlotSelect::copy_slot);
/*Remove in 2.0*/ connect(preview[s], &SlotPreview::paste, this, &SlotSelect::paste_slot);
}

void SlotSelect::newFile(void)
Expand Down
26 changes: 22 additions & 4 deletions src/widgets/data/SlotSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,28 @@ class FF7TKWIDGETS_EXPORT SlotSelect : public QDialog
*/
explicit SlotSelect(FF7Save *data = nullptr, bool loadVisiable = false, QWidget *parent = nullptr);
private slots:
void button_clicked(int s);
void remove_slot(int s);
void copy_slot(int s);
void paste_slot(int s);
/**
* \brief Signal: User Clicked on preview, returns index of click
*/
void select(int);
[[ deprecated ("will be removed in ff7tk 2.0, Use SlotSelect::select") ]]void button_clicked(int s);

/**
* \brief Signal: User Clicked on remove, returns index of click
*/
void remove(int);
[[ deprecated ("will be removed in ff7tk 2.0, Use SlotSelect::remove") ]]void remove_slot(int s);
/**
* \brief Signal: User Clicked on copy, returns index of click
*/
void copy(int);
[[ deprecated ("will be removed in ff7tk 2.0, Use SlotSelect::copy") ]]void copy_slot(int s);
/**
* \brief Signal: User Clicked on paste, returns index of click
*/
void paste(int);
[[ deprecated ("will be removed in ff7tk 2.0, Use SlotSelect::paste") ]]void paste_slot(int s);

void newFile(void);
private:
void setSlotPreview(int s);
Expand Down

0 comments on commit 789fbf9

Please sign in to comment.