mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 08:21:12 +02:00
- audioplayer: small design reworks ...
* use OFFSET defines * use CComponentsScrollbar * rename some variables * many, many position calculation fixes * re-format code Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -160,8 +160,8 @@ audioplayer.add_loc Lokale Radioliste
|
||||
audioplayer.add_sc SHOUTcast
|
||||
audioplayer.artist_title Interpret, Titel
|
||||
audioplayer.building_search_index Erstelle Suchindex
|
||||
audioplayer.button_select_title_by_id Suche n. ID
|
||||
audioplayer.button_select_title_by_name Suche n. Name
|
||||
audioplayer.button_select_title_by_id Suche nach ID
|
||||
audioplayer.button_select_title_by_name Suche nach Name
|
||||
audioplayer.defdir Start-Verzeichnis
|
||||
audioplayer.delete Entfernen
|
||||
audioplayer.deleteall Alle entfernen
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -1,17 +1,9 @@
|
||||
/*
|
||||
$Id: audioplayer.h,v 1.24 2009/10/03 10:36:29 seife Exp $
|
||||
Neutrino-GUI - DBoxII-Project
|
||||
|
||||
Copyright (C) 2001 Steffen Hehn 'McClean'
|
||||
Homepage: http://dbox.cyberphoria.org/
|
||||
|
||||
Kommentar:
|
||||
|
||||
Diese GUI wurde von Grund auf neu programmiert und sollte nun vom
|
||||
Aufbau und auch den Ausbaumoeglichkeiten gut aussehen. Neutrino basiert
|
||||
auf der Client-Server Idee, diese GUI ist also von der direkten DBox-
|
||||
Steuerung getrennt. Diese wird dann von Daemons uebernommen.
|
||||
|
||||
Copyright (C) 2009 Stefan Seyfried
|
||||
Copyright (C) 2017 Sven Hoefer
|
||||
|
||||
License: GPL
|
||||
|
||||
@@ -26,8 +18,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __audioplayergui__
|
||||
@@ -56,7 +47,6 @@ class CFrameBuffer;
|
||||
class CAudiofileExt : public CAudiofile
|
||||
{
|
||||
public:
|
||||
|
||||
CAudiofileExt();
|
||||
|
||||
CAudiofileExt(std::string name, CFile::FileType type);
|
||||
@@ -65,7 +55,6 @@ public:
|
||||
|
||||
void operator=(const CAudiofileExt& src);
|
||||
|
||||
|
||||
char firstChar;
|
||||
};
|
||||
|
||||
@@ -74,14 +63,9 @@ typedef std::vector<CAudiofileExt> CAudioPlayList;
|
||||
class RandomNumber
|
||||
{
|
||||
public:
|
||||
RandomNumber()
|
||||
{
|
||||
std::srand(time(0));
|
||||
}
|
||||
RandomNumber() { std::srand(time(0)); }
|
||||
|
||||
int operator()(int n){
|
||||
return std::rand() / (1.0 + RAND_MAX) * n;
|
||||
}
|
||||
int operator()(int n) { return std::rand() / (1.0 + RAND_MAX) * n; }
|
||||
};
|
||||
|
||||
class CAudioPlayerGui : public CMenuTarget
|
||||
@@ -96,7 +80,11 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
REV
|
||||
};
|
||||
|
||||
enum DisplayOrder {ARTIST_TITLE = 0, TITLE_ARTIST=1};
|
||||
enum DisplayOrder
|
||||
{
|
||||
ARTIST_TITLE = 0,
|
||||
TITLE_ARTIST=1
|
||||
};
|
||||
|
||||
private:
|
||||
void Init(void);
|
||||
@@ -105,10 +93,10 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
int m_current;
|
||||
unsigned int m_liststart;
|
||||
unsigned int m_listmaxshow;
|
||||
int m_fheight; // Fonthoehe Playlist-Inhalt
|
||||
int m_theight; // Fonthoehe Playlist-Titel
|
||||
int m_sheight; // Fonthoehe MP Info
|
||||
int m_buttonHeight;
|
||||
int m_item_height;
|
||||
int m_header_height;
|
||||
int m_meta_height;
|
||||
int m_button_height;
|
||||
int m_title_height;
|
||||
int m_info_height;
|
||||
int m_key_level;
|
||||
@@ -119,7 +107,6 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
std::string m_metainfo;
|
||||
bool m_select_title_by_name;
|
||||
bool m_show_playlist;
|
||||
|
||||
bool m_playlistHasChanged;
|
||||
|
||||
CAudioPlayList m_playlist;
|
||||
@@ -139,8 +126,8 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
int m_idletime;
|
||||
bool m_screensaver;
|
||||
bool m_inetmode;
|
||||
CComponentsDetailsLine *dline;
|
||||
CComponentsInfoBox *ibox;
|
||||
CComponentsDetailsLine *m_detailsline;
|
||||
CComponentsInfoBox *m_infobox;
|
||||
|
||||
SMSKeyInput m_SMSKeyInput;
|
||||
|
||||
@@ -148,16 +135,16 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
void paint();
|
||||
void paintHead();
|
||||
void paintFoot();
|
||||
void paintInfo();
|
||||
void paintTitleBox();
|
||||
void paintCover();
|
||||
void paintLCD();
|
||||
void paintDetailsLine(int pos);
|
||||
void clearDetailsLine();
|
||||
void hide();
|
||||
|
||||
void get_id3(CAudiofileExt * audiofile);
|
||||
void get_mp3info(CAudiofileExt * audiofile);
|
||||
CFileFilter audiofilefilter;
|
||||
void paintItemID3DetailsLine (int pos);
|
||||
void clearItemID3DetailsLine ();
|
||||
void ff(unsigned int seconds=0);
|
||||
void rev(unsigned int seconds=0);
|
||||
int getNext();
|
||||
@@ -197,6 +184,7 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
void readDir_ic(void);
|
||||
|
||||
void selectTitle(unsigned char selectionChar);
|
||||
|
||||
/**
|
||||
* Appends the file information to the given string.
|
||||
* @param fileInfo a string where the file information will be appended
|
||||
@@ -231,8 +219,7 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
* @return the location of absFilename as seen from fromDir
|
||||
* (relative path)
|
||||
*/
|
||||
std::string absPath2Rel(const std::string& fromDir,
|
||||
const std::string& absFilename);
|
||||
std::string absPath2Rel(const std::string& fromDir, const std::string& absFilename);
|
||||
|
||||
/**
|
||||
* Asks the user if the file filename should be overwritten or not
|
||||
@@ -240,6 +227,7 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
* @return true if file should be overwritten, false otherwise
|
||||
*/
|
||||
bool askToOverwriteFile(const std::string& filename);
|
||||
|
||||
bool openFilebrowser(void);
|
||||
bool openSCbrowser(void);
|
||||
bool clearPlaylist(void);
|
||||
@@ -262,5 +250,4 @@ class CAudioPlayerGui : public CMenuTarget
|
||||
int getAudioPlayerM_current() { return m_current; }
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user