-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from andre-tm-hui/feat/repitch-resample
Feat/repitch resample
- Loading branch information
Showing
27 changed files
with
224 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#include "fxswitch.h" | ||
#include "ui_fxswitch.h" | ||
|
||
FXSwitch::FXSwitch(std::shared_ptr<FXManager> fm, | ||
std::string fx, | ||
std::string param, | ||
QWidget *parent) : | ||
FXParam(fm, fx, param, parent), | ||
ui(new Ui::FXSwitch) | ||
{ | ||
ui->setupUi(this); | ||
|
||
connect(ui->toggle, SIGNAL(stateChanged(int)), this, SLOT(onToggled(int))); | ||
|
||
ui->title->setText(QString::fromStdString(param)); | ||
ui->indicator->setEnabled(false); | ||
|
||
resetIdx(); | ||
} | ||
|
||
FXSwitch::~FXSwitch() | ||
{ | ||
delete ui; | ||
} | ||
|
||
void FXSwitch::setValue(int val) { | ||
ui->toggle->setCheckState(val == 0 ? Qt::CheckState::Unchecked : Qt::CheckState::Checked); | ||
} | ||
|
||
void FXSwitch::resizeEvent(QResizeEvent *event) { | ||
ui->toggle->move((this->width() / 2) - (ui->toggle->width() / 2), ui->toggle->y()); | ||
ui->indicator->move((this->width() / 2) - (ui->indicator->width() / 2), ui->indicator->y()); | ||
ui->title->resize(this->width(), ui->title->height()); | ||
FXParam::resizeEvent(event); | ||
} | ||
|
||
void FXSwitch::onToggled(int val) { | ||
if (idx == -1) return; | ||
ui->indicator->setCheckState((Qt::CheckState)val); | ||
val = val == 0 ? 0 : 1; | ||
fm->UpdateSettings<int>(getPath(), val); | ||
fm->ApplyFXSettings({{fx, {{param, val}}}}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#ifndef FXSWITCH_H | ||
#define FXSWITCH_H | ||
|
||
#include <QWidget> | ||
#include "fxparam.h" | ||
|
||
namespace Ui { | ||
class FXSwitch; | ||
} | ||
|
||
class FXSwitch : public FXParam | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
explicit FXSwitch(std::shared_ptr<FXManager> fm, | ||
std::string fx, | ||
std::string param, | ||
QWidget *parent = nullptr); | ||
~FXSwitch(); | ||
|
||
void setValue(int val) override; | ||
|
||
protected: | ||
void resizeEvent(QResizeEvent *event) override; | ||
|
||
private slots: | ||
void onToggled(int val); | ||
|
||
private: | ||
Ui::FXSwitch *ui; | ||
}; | ||
|
||
#endif // FXSWITCH_H |
Oops, something went wrong.