summaryrefslogtreecommitdiffstats
path: root/k9author/k9menu.h
blob: dc75574bfe6fecf249f1e3f42dfdeecc5da0ec09 (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
//
// C++ Interface: k9menu
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef K9MENU_H
#define K9MENU_H

#include "k9common.h"
#include "k9config.h"
#include <tqobject.h>
#include <tqptrlist.h>
#include <tqimage.h>
#include <tqfont.h>
#include <tqdom.h>
#include <tqcanvas.h>
/**
	@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9MenuButton;
class k9Menu : public TQObject {
    Q_OBJECT
  
public slots:
    void setStartScript(const TQString &);
    void setStartScript2(const TQString &);
    void setEndScript(const TQString& _value);

public:
    enum eFormat {
        PAL=1,NTSC=2
    };
    k9Menu(TQObject *parent = 0, const char *name = 0);
    ~k9Menu();
    k9MenuButton *addButton();
    void createMenus(TQDomElement *_rootNode);
    void setWorkDir(const TQString& _value);
    TQString getWorkDir() const;
    void setFormat(const eFormat& _value);
    void setMenuFileName(const TQString& _value);
    TQString getMenuFileName() const;

    void setCanvas(TQCanvas* _value);
    TQCanvas* getCanvas() const;

    TQString getStartScript() const;
    TQString getEndScript() const;
    TQString getStartScript2() const;
private:
    TQPtrList <k9MenuButton> m_buttons;
    TQString m_workDir;
    TQString m_menuFileName;
    eFormat m_format;
    TQCanvas *m_canvas;
    TQString m_startScript;
    TQString m_startScript2;
    TQString m_endScript;
    k9Config *m_config;
    void convertJpegToMpeg(const TQString &_imageJpg,const TQString &_imageMpg) ;
    void createAudio(const TQString & _audioFile);
    void multiplex(const TQString &_audio, const TQString &_video, const TQString _result);
    void spumux(const TQString &_hiFileName,const TQString &_mpgFileName);
    void appendMenu(TQDomElement *_rootNode);
};

#endif