Skip to content

Latest commit

 

History

History
164 lines (86 loc) · 5.39 KB

documentation.md

File metadata and controls

164 lines (86 loc) · 5.39 KB

Documentation

GUI looks

The curent (Beta) looks are here.


SFML Documentation


MusicalBash Documentation

The design of the project is based on the design patterns descibed here.
Creational: Builder, Singleton
Structural: Facade, Flyweight
Behavioral: Command, State, Observer


Core

  1. Application

    Main class, initiates/closes the app and the high level classes to start the app.

  2. UI

    Class interacting with the user via the sfml/graphics engine.

  3. Player

    Class taking care of the music player, playlists, etc.

  4. Command

    Mainly virtual class, contains the small logic parts of the code that actually does something, like: playing sounds, searching for files, saves records of songs, actions of buttons clicked, etc...

    Folosim Command Design Pattern

  5. PIndex

    Class that:

    holds records (data) of albums, playlists

    saves records (data) of music files/albums/playlists to the file system

    Returns to the application the list of albums, playlists, songs, etc...

  6. Logger

    Class that enables logging from everywhere in the source code/

    Folosim Singleton Design Pattern


UI-associated classes

Should be some kind of aggregator / always on pieces that change their internal state to reflect what the user does

Folosim State Design Pattern pentru urmatoarele clase Window

  1. UPlayerNavigatorWindow

    Class able to display the buttons and the status bar of the music player.

  2. UMainWindow

    Class that controls the main view (center) of the app.

  3. USideBarWindow

    Class displaying the side bar, containing the albums navigator, and the settings buttons (TODO: see how to implement them).

Sugestie: Nu folositi o lista de stari "externe", adica aplicatia e in starea X Ci mai degraba, Fiecare clasa isi gestioneaza starile ei, si mai apoi, eventual apeland comenzi, (comenzi care sunt triggeruite de butoane, cel mai probabil) fiecare isi schimba state-ul vizual

Basic UI elements

Little objects that are used freely by the 3 main Windows

  1. UBasicElement

    Abstract class, to provide a template for the common UI elements

  2. UButton

  3. UImage

  4. UTextBox

  5. UScrollView

Folosim Builder Design Pattern pentru cateva clase de UI. Cel mai probabil la UScrollView.


Player-associated classes

As Palbum, PPlaylist and PTrack are basically doing the exact same thing, I created Track and the two others shoud inherit from it without changing anything (or almost).

  1. PTrack

    Class that handles the current set of songs played. Do you play asong from an album, a playlist, or from the entire gallery?

    Folosim Observer Design Pattern peste comenzi, pentru a afla cum se schimba track-ul

  2. PAlbum

    Class maintaining a list of musics from a list of files.

  3. PPlaylist

    Class that maintains a hand picked list of files.

  4. PMusic

    Class that holds information about a single music / song. The hash (id) of a music is exactly: path/to/file/song_name.ext NOT needed, as we only have to remember the path, which is stored by default in all albums / tracks

    Folosim Flyweight Design Pattern pentru a optimiza memoria (Clasele PPlaylist, PAlbum, Index o sa foloseasca pointeri catre acest Flyweight)

  5. PMusicPlayer

    Class handeling playing the music from a file. (The Previous sound_player class)

    Folosim Facade Design Pattern, intrucat tratam separat fisierele mp3


Command-associated classes

  1. CStartMusic

    Class requesting a music to start playing.

  2. CPauseMusic

    class requesting a music to pause.

  3. CNextMusic

    class requesting a music to pause.

  4. CPreviousMusic

    class requesting a music to pause.

  5. CClose

    class that handles what happens when the app is exiting

  6. CFileSelect

    class selecting a file from filesistem

  7. CFolderSelect