summaryrefslogtreecommitdiffstats
path: root/src/outputdirectory.h
blob: 20b5aa3dad59dac72a04e287bd3d5066aea66081 (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
88
89
90
91
92
93


#ifndef OUTPUTDIRECTORY_H
#define OUTPUTDIRECTORY_H

#include <tqwidget.h>
#include <kprocess.h>

class FileListItem;

class Config;
class KComboBox;
class KLineEdit;
class TDEToolBarButton;

/**
 * @short The input area for the output directory
 * @author Daniel Faust <[email protected]>
 * @version 0.3
 */
class OutputDirectory : public TQWidget
{
    Q_OBJECT
  
public:
    enum Mode {
//         Default,
        MetaData,
        Source,
        Specify,
        CopyStructure
    };

    /**
     * Constructor
     */
    OutputDirectory( Config*, TQWidget* parent = 0, const char* name = 0 );

    Mode mode();
    void setMode( Mode );
    TQString directory();
    void setDirectory( const TQString& );

    static TQString calcPath( FileListItem* fileListItem, Config* config, TQString extension = "" );
    static TQString changeExtension( const TQString& filename, const TQString& extension );
    static TQString uniqueFileName( const TQString& filename );
    static TQString makePath( const TQString& path );
    static TQString vfatPath( const TQString& path );

    /**
     * Destructor
     */
    virtual ~OutputDirectory();

public slots:
    //void setActive( bool );
    void enable();
    void disable();

private slots:
    void modeChangedSlot( int );
    void directoryChangedSlot( const TQString& );
    void selectDir();
    void gotoDir();
    //void modeInfo();
    //void dirInfo();
    //void savePaths();

private:
    KComboBox* cMode;
    //TDEToolBarButton* pModeInfo;
    KLineEdit* lDir;
    TDEToolBarButton* pDirSelect;
    TDEToolBarButton* pDirGoto;
    //TDEToolBarButton* pDirInfo;
    TDEToolBarButton* pClear;

    bool modeJustChanged;

    TDEProcess kfm;

    Config* config;

/*    TQString sharedDirPath;
    TQString metadataPath;
    TQString copyStructurePath;
*/
signals:
    void modeChanged( OutputDirectory::Mode );
    void directoryChanged( const TQString& );
};

#endif // OUTPUTDIRECTORY_H