summaryrefslogtreecommitdiff
path: root/src/ui/preferencesdlg.h
blob: 93ac3777e0ed69681eedd8234a3ac403ae6db7dd (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
#pragma once

#include <kdialogbase.h>
#include <tqvaluelist.h>
#include <tqstring.h>

class TQCheckBox;
class TQComboBox;
class TQLabel;
class TQSpinBox;
class TQWidgetStack;

#ifdef WITH_ALSA
class AlsaModel;
#endif

class PreferencesDlg : public KDialogBase
{
    TQ_OBJECT

public:
    explicit PreferencesDlg( TQWidget *parent = 0 );

#ifdef WITH_ALSA
    PreferencesDlg( AlsaModel *model, TQWidget *parent = 0 );
#endif

    void load();

signals:
    void settingsChanged();

protected slots:
    void slotOk();
    void slotApply();

private slots:
    void onPopupModeChanged( int idx );
    void onBackendComboChanged( int idx );
    void onNoTabsToggled( bool checked );

private:
    void buildGeneralPage();
    void buildBackendPage();
    void save();

    // General — shared
    TQComboBox    *m_backend;
    TQCheckBox    *m_dockInTray;
    TQComboBox    *m_popupMode;
    TQSpinBox     *m_scrollStep;
    TQCheckBox    *m_confirmQuit;
    TQCheckBox    *m_middleClickMute;
    TQCheckBox    *m_startOnLogin;

    // Backend settings stack
    TQWidgetStack *m_backendStack;

    // Pulse widgets — always built, may be on the inactive stack page
    TQCheckBox *m_popupShowOutput;
    TQCheckBox *m_popupShowMic;
    TQCheckBox *m_popupShowApps;
    TQCheckBox *m_showRecTray;
    TQCheckBox *m_noTabs;
    TQLabel    *m_showTabsLabel;
    TQCheckBox *m_showOutput;
    TQCheckBox *m_showInput;
    TQCheckBox *m_showPlayback;
    TQCheckBox *m_showRecording;

#ifdef WITH_ALSA
    AlsaModel            *m_alsaModel;
    TQComboBox            *m_trayDevice;
    TQValueList<int>       m_trayCardIndices;
    TQValueList<TQString>   m_trayDeviceNames;
#endif
};