blob: 339a203cf055556e365a2fce5ad42977ffb31330 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/***************************************************************************
dlgpreflibrary.h - description
-------------------
begin : Thu Apr 17 2003
copyright : (C) 2003 by Tue & Ken Haste Andersen
email : haste@diku.dk
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef DLGPREFLIBRARY_H
#define DLGPREFLIBRARY_H
#include <QStandardItemModel>
#include <QWidget>
#include <QFont>
#include "preferences/dialog/ui_dlgpreflibrarydlg.h"
#include "preferences/usersettings.h"
#include "library/library.h"
#include "preferences/dlgpreferencepage.h"
/**
*@author Tue & Ken Haste Andersen
*/
class DlgPrefLibrary : public DlgPreferencePage, public Ui::DlgPrefLibraryDlg {
Q_OBJECT
public:
enum TrackLoadAction {
LOAD_TRACK_DECK, // Load track to next available deck.
ADD_TRACK_BOTTOM, // Add track to Auto-DJ Queue (bottom).
ADD_TRACK_TOP // Add track to Auto-DJ Queue (top).
};
DlgPrefLibrary(QWidget *parent, UserSettingsPointer config,
Library *pLibrary);
virtual ~DlgPrefLibrary();
public slots:
// Common preference page slots.
void slotUpdate();
void slotShow();
void slotHide();
void slotResetToDefaults();
void slotApply();
void slotCancel();
// Dialog to browse for music file directory
void slotAddDir();
void slotRemoveDir();
void slotRelocateDir();
void slotExtraPlugins();
signals:
void apply();
void scanLibrary();
void requestAddDir(QString dir);
void requestRemoveDir(QString dir, Library::RemovalType removalType);
void requestRelocateDir(QString currentDir, QString newDir);
void setTrackTableFont(const QFont& font);
void setTrackTableRowHeight(int rowHeight);
private slots:
void slotRowHeightValueChanged(int);
void slotSelectFont();
private:
void initializeDirList();
void setLibraryFont(const QFont& font);
QStandardItemModel m_dirListModel;
UserSettingsPointer m_pconfig;
Library* m_pLibrary;
bool m_baddedDirectory;
QFont m_originalTrackTableFont;
int m_iOriginalTrackTableRowHeight;
};
#endif
|