juk.h 2.81 KB
Newer Older
1 2
/***************************************************************************
    begin                : Mon Feb  4 23:40:41 EST 2002
3
    copyright            : (C) 2002 - 2004 by Scott Wheeler
4
    email                : wheeler@kde.org
5
***************************************************************************/
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

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

#include <kmainwindow.h>

21
#include "playermanager.h"
22 23 24

class QTimer;
class QListViewItem;
25

Scott Wheeler's avatar
Scott Wheeler committed
26 27 28 29 30
class KToggleAction;
class KSelectAction;
class KToolBarPopupAction;
class KGlobalAccel;

31
class SliderAction;
32
class StatusLabel;
33
class SystemTray;
Scott Wheeler's avatar
Scott Wheeler committed
34
class PlayerManager;
35
class PlaylistSplitter;
36

37
class JuK : public KMainWindow
38
{
39
    Q_OBJECT
40

41
public:
42
    JuK(QWidget* parent = 0, const char *name = 0);
43
    virtual ~JuK();
44
    virtual KActionCollection *actionCollection() const;
45

46 47
private:
    void setupLayout();
48
    void setupActions();
49
    void setupSystemTray();
50
    void setupGlobalAccels();
51
    void processArgs();
52

53 54
    void keyPressEvent(QKeyEvent *);

55
    /**
56 57
     * readSettings() is separate from readConfig() in that it contains settings
     * that need to be read before the GUI is setup.
58 59
     */
    void readSettings();
60
    void readConfig();
61
    void saveConfig();
62

63
    virtual bool queryExit();
64 65
    virtual bool queryClose();

66
private slots:
67
    void slotShowHide();
68
    void slotQuit();
69
    void slotToggleSystemTray(bool enabled);
70
    void slotEditKeys();
71
    void slotConfigureTagGuesser();
72
    void slotConfigureFileRenamer();
73

74
private:
75 76 77
    PlaylistSplitter *m_splitter;
    StatusLabel *m_statusLabel;
    SystemTray *m_systemTray;
78

79 80 81
    typedef QPair<KAction *, const char *> SplitterConnection;
    QValueList<SplitterConnection> m_splitterConnections;

82
    SliderAction *m_sliderAction;
83
    KToggleAction *m_showHistoryAction;
84 85
    KToggleAction *m_randomPlayAction;
    KToggleAction *m_toggleSystemTrayAction;
86
    KToggleAction *m_toggleDockOnCloseAction;
87
    KToggleAction *m_togglePopupsAction;
88
    KToggleAction *m_toggleSplashAction;
89
    KToggleAction *m_loopPlaylistAction;
90
    KSelectAction *m_outputSelectAction;
91
    KToolBarPopupAction *m_backAction;
92

93
    PlayerManager *m_player;
94
    KGlobalAccel *m_accel;
95

96
    bool m_startDocked;
97
    bool m_showSplash;
98
    bool m_shuttingDown;
99 100 101
};

#endif