File: soundkonverterview.h

package info (click to toggle)
soundkonverter 2.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,976 kB
  • ctags: 2,604
  • sloc: cpp: 30,890; sh: 59; xml: 50; makefile: 8
file content (125 lines) | stat: -rw-r--r-- 3,364 bytes parent folder | download
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/*
 * soundkonverterview.h
 *
 * Copyright (C) 2007 Daniel Faust <hessijames@gmail.com>
 */
#ifndef _SOUNDKONVERTERVIEW_H_
#define _SOUNDKONVERTERVIEW_H_

#include <QWidget>
#include <KUrl>

class KPushButton;
class QMenu;
class KAction;
class KActionMenu;
class QToolButton;

class ProgressIndicator;
class ComboButton;
class Config;
class Logger;
class CDManager;
class FileList;
class OptionsLayer;

// class QPainter;
// class KUrl;

/**
 * This is the main view class for soundKonverter.  Most of the non-menu,
 * non-toolbar, and non-statusbar (e.g., non frame) GUI code should go
 * here.
 *
 * @short Main view
 * @author Daniel Faust <hessijames@gmail.com>
 * @version 1.0
 */

class soundKonverterView : public QWidget
{
    Q_OBJECT
public:
    /** Default constructor */
    soundKonverterView( Logger *_logger, Config *_config, CDManager *_cdManager, QWidget *parent );

    /** Destructor */
    ~soundKonverterView();

    void addConvertFiles( const KUrl::List& urls, QString _profile, QString _format, const QString& directory, const QString& notifyCommand = "" );
    void loadAutosaveFileList();
    void loadFileList(const QString& fileListPath);

    KAction *start() { return startAction; }
    KActionMenu *stopMenu() { return stopActionMenu; }

    void startConversion();
    void killConversion();

signals:
    /** Use this signal to change the content of the statusbar */
//     void signalChangeStatusbar(const QString& text);

    /** Use this signal to change the content of the caption */
//     void signalChangeCaption( const QString& text );

public slots:
    bool showCdDialog( const QString& device = "", QString _profile = "", QString _format = "", const QString& directory = "", const QString& notifyCommand = "" );
    void loadFileList( bool user = true );
    void saveFileList( bool user = true );
    void updateFileList();

private slots:
    void addClicked( int index );
    void showFileDialog();
    void showDirDialog();
    void showUrlDialog();
    void showPlaylistDialog();

    // connected to fileList
    /** The count of items in the file list has changed to @p count */
    void fileCountChanged( int count );
    /** The conversion has started */
    void conversionStarted();
    /** The conversion has stopped */
    void conversionStopped( bool failed );
    /** Conversion will continue/stop after current files have been converted */
    void queueModeChanged( bool enabled );

private:
    Config *config;
    Logger *logger;
    CDManager *cdManager;

    FileList *fileList;
    OptionsLayer *optionsLayer;

    /** The combobutton for adding files */
    ComboButton *cAdd;

    /** The button to start the conversion */
    KPushButton *pStart;
    /** Tha start action */
    KAction *startAction;

    /** The button to stop the conversion */
    KPushButton *pStop;
    /** The menu for the stop button */
    KActionMenu *stopActionMenu;
    KAction *killAction;
    KAction *stopAction;
    KAction *continueAction;

    /** Displays the current progress */
    ProgressIndicator *progressIndicator;

    void cleanupParameters( QString *profile, QString *format );

signals:
    void progressChanged( const QString& progress );
    void signalConversionStarted();
    void signalConversionStopped( bool failed );
    void showLog( const int logId );
};

#endif // _soundKonverterVIEW_H_