summaryrefslogtreecommitdiffstats
path: root/src/preferences/dialog/dlgprefvinyl.h
blob: 86a64f95a32144b76fd4c79fc22ae68ed7e8439e (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
/***************************************************************************
                          dlgprefvinyl.h  -  description
                             -------------------
    begin                : Thu Oct 23 2006
    copyright            : (C) 2006 by Stefan Langhammer
    email                : stefan.langhammer@9elements.com
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 DLGPREFVINYL_H
#define DLGPREFVINYL_H

#include <QWidget>

#include "preferences/dialog/ui_dlgprefvinyldlg.h"
#include "preferences/usersettings.h"
#include "vinylcontrol/vinylcontrolsignalwidget.h"
#include "preferences/dlgpreferencepage.h"

class ControlObjectSlave;
class VinylControlManager;

class DlgPrefVinyl : public DlgPreferencePage, Ui::DlgPrefVinylDlg  {
    Q_OBJECT
  public:
    DlgPrefVinyl(QWidget* pParent, VinylControlManager* m_pVCMan, UserSettingsPointer _config);
    virtual ~DlgPrefVinyl();

  public slots:
    void slotUpdate();
    void slotApply();
    void slotResetToDefaults();

    void slotHide();
    void slotShow();
    void VinylTypeSlotApply();
    void slotVinylGainApply();
    void slotUpdateVinylGain();

  private slots:
    void slotNumDecksChanged(double);
    void slotVinylType1Changed(QString);
    void slotVinylType2Changed(QString);
    void slotVinylType3Changed(QString);
    void slotVinylType4Changed(QString);

  private:
    void setDeckWidgetsVisible(int deck, bool visible);
    void setDeck1WidgetsVisible(bool visible);
    void setDeck2WidgetsVisible(bool visible);
    void setDeck3WidgetsVisible(bool visible);
    void setDeck4WidgetsVisible(bool visible);
    void verifyAndSaveLeadInTime(QLineEdit* widget, QString group, QString vinyl_type);
    int getDefaultLeadIn(QString vinyl_type) const;


    QList<VinylControlSignalWidget*> m_signalWidgets;

    VinylControlManager* m_pVCManager;
    UserSettingsPointer config;
    QList<ControlObjectSlave*> m_COSpeeds;
    ControlObjectSlave* m_pNumDecks;
    int m_iConfiguredDecks;
};

#endif