Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Google C/C++ Code Style settings
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
# Author: Kehan Xue, kehan.xue (at) gmail.com

Language: Cpp
BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: None
AlignOperands: Align
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Empty
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: Never # To avoid conflict, set this "Never" and each "if statement" should include brace when coding
AllowShortLambdasOnASingleLine: Inline
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterStruct: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ColumnLimit: 80
CompactNamespaces: false
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false # Make sure the * or & align on the left
EmptyLineBeforeAccessModifier: LogicalBlock
FixNamespaceComments: true
IncludeBlocks: Preserve
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: true
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PointerAlignment: Left
ReflowComments: false
# SeparateDefinitionBlocks: Always # Only support since clang-format 14
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: c++11
TabWidth: 4
UseTab: Always
5 changes: 1 addition & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "docs"]
path = docs
url = git@github.com:k147-studio/docs.git
[submodule "JUCE"]
path = JUCE
url = https://github.com/juce-framework/JUCE.git
url = https://github.com/k147-studio/JUCE.git
5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion docs
Submodule docs deleted from 80463c
39 changes: 22 additions & 17 deletions include/AccountComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,33 @@

#include <JuceHeader.h>

class AccountComponent : public juce::Component
{
class AccountComponent : public Component {
public:
AccountComponent();
void paint(juce::Graphics&) override;
void resized() override;
AccountComponent();
void paint(Graphics&) override;
void resized() override;

private:
void apiResponseReceived(const juce::String& content);
void saveSettings();
void importSettings();
void changePassword();
void apiResponseReceived(const String& content);
void saveSettings();
void importSettings();

juce::Label titleLabel;
juce::Label responseLabel;
void setupLabels();
void setupButtons();
void setupGrid();

juce::Label emailLabel, usernameLabel;
juce::Label emailValueLabel, usernameValueLabel;
Label titleLabel{"titleLabel", "Mon compte"};
Label responseLabel{"responseLabel", "En attente de réponse..."};

juce::TextButton saveButton, importButton, changePasswordButton;
Label emailLabel{"emailLabel", "Adresse mail :"};
Label usernameLabel{"usernameLabel", "Nom d'utilisateur :"};
Label emailValueLabel{"emailValueLabel", "utilisateur@example.com"};
Label usernameValueLabel{"usernameValueLabel", "NomUtilisateur"};

juce::Grid grid;
TextButton saveButton{"Sauvegarder les réglages"};
TextButton importButton{"Importer les réglages"};

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AccountComponent)
};
Grid grid;

JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AccountComponent)
};
163 changes: 81 additions & 82 deletions include/BasePedalComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,89 +7,88 @@
* @brief Base class for pedal components.
* This class provides a common interface and functionality for all pedal components.
*/
class BasePedalComponent : public EffectComponent
{
class BasePedalComponent : public EffectComponent {
public:
/**
* @brief Initializes a new instance of the BasePedalComponent class.
* @param effect The effect associated with this pedal component.
*/
BasePedalComponent(AbstractEffect* effect);

/**
* @brief Destroys the instance of the BasePedalComponent class.
*/
~BasePedalComponent() override;

/**
* @brief Paints the component.
* @param g The JUCE graphics context that paints the component.
*/
void paint(juce::Graphics &g) override;

/**
* @brief Resizes the component.
*/
void resized() override;
/**
* @brief Initializes a new instance of the BasePedalComponent class.
* @param effect The effect associated with this pedal component.
*/
BasePedalComponent(AbstractEffect* effect);

/**
* @brief Destroys the instance of the BasePedalComponent class.
*/
~BasePedalComponent() override;

/**
* @brief Paints the component.
* @param g The JUCE graphics context that paints the component.
*/
void paint(Graphics& g) override;

/**
* @brief Resizes the component.
*/
void resized() override;

protected:
/**
* @brief The default width of the component.
*/
const float DEFAULT_WIDTH = 200.0f;

/**
* @brief The default height of the component.
*/
const float DEFAULT_HEIGHT = 300.0f;

/**
* @brief The main layout for the pedal component.
*/
juce::Grid pedalLayout;

/**
* @brief The primary color of the pedal component. Used as background color.
*/
juce::Colour primaryColor;

/**
* @brief The secondary color of the pedal component. Used as background color.
*/
juce::Colour secondaryColor;

/**
* @brief The layout for the pedal settings.
*/
PedalSettingsLayoutComponent* settingsLayout;

/**
* @brief The label for the pedal name.
*/
juce::Label* pedalLabel;

/**
* @brief The button to enable/disable the pedal.
*/
juce::ImageButton enablePedalButton;

/**
* @brief The indicator for the pedal power status.
*/
PedalPowerIndicatorComponent* isEnabledIndicator;

/**
* @brief Tells if the pedal is enabled or not.
*/
bool* isEnabled;

/**
* @brief Called when the enable button is clicked.
*/
void onEnableButtonClicked();

/**
* @brief Initializes the pedal layout to display it.
*/
void initializePedal();
/**
* @brief The default width of the component.
*/
const float DEFAULT_WIDTH = 200.0f;

/**
* @brief The default height of the component.
*/
const float DEFAULT_HEIGHT = 300.0f;

/**
* @brief The main layout for the pedal component.
*/
Grid pedalLayout;

/**
* @brief The primary color of the pedal component. Used as background color.
*/
Colour primaryColor;

/**
* @brief The secondary color of the pedal component. Used as background color.
*/
Colour secondaryColor;

/**
* @brief The layout for the pedal settings.
*/
PedalSettingsLayoutComponent* settingsLayout;

/**
* @brief The label for the pedal name.
*/
Label* pedalLabel;

/**
* @brief The button to enable/disable the pedal.
*/
ImageButton enablePedalButton;

/**
* @brief The indicator for the pedal power status.
*/
PedalPowerIndicatorComponent* isEnabledIndicator;

/**
* @brief Tells if the pedal is enabled or not.
*/
bool* isEnabled;

/**
* @brief Called when the enable button is clicked.
*/
void onEnableButtonClicked();

/**
* @brief Initializes the pedal layout to display it.
*/
void initializePedal();
};
56 changes: 0 additions & 56 deletions include/ConnectionComponent.h

This file was deleted.

Loading