Debian Codegraph @

samples/qtvidcap/vidconf.h

raw
1 #ifndef VIDCONFIG_H
2 #define VIDCONFIG_H
3
4 //#include <sys/vfs.h>
5
6 #include "vidconf_p.h"
7 #include <videoencoder.h>
8
9 #include <qlistview.h>
10
11 class v4lxif;
12 class V4LWindow;
13
14 extern int free_diskspace(avm::string path);
15
16 class DirPoolItem : public QCheckListItem
17 {
18 int keep_free; // in MB
19 QString pathname;
20 public:
21 DirPoolItem(QListView *li, QString path, int keepfree) :
22 QCheckListItem( li, "test", QCheckListItem::CheckBox )
23 {
24 pathname=path;
25 keep_free=keepfree;
26
27 setText(0,pathname);
28 setText(1, QString().sprintf("%5d MB",keep_free));
29 }
30
31 const QString& getPath() const { return pathname; };
32 int getKeepFree() const { return keep_free; };
33 int updateSpaceLeft()
34 {
35 int free_mb=free_diskspace(pathname.latin1());
36 setText(2, QString().sprintf("%5d MB",free_mb));
37 return free_mb;
38 }
39 };
40
41 class VidConfig : public VidcapConfigDialog
42 {
43 Q_OBJECT;
44
45 avm::VideoEncoderInfo _info;
46 avm::VideoEncoderInfo _named_info;
47 avm::string _savename;
48 int _regnumber;
49
50 V4LWindow* m_pV4lWin;
51 public:
52 VidConfig( QWidget* parent, v4lxif* v4l, V4LWindow* w );
53 ~VidConfig();
54 void savePage(int);
55 QListView *getDirPool() { return lv_dirpool; };
56 public slots:
57 virtual void change_filename();
58 virtual void change_codec();
59 virtual void toggle_audio(bool);
60 virtual void toggle_segmented(bool);
61 virtual void toggle_limitsize(bool);
62 virtual void toggle_limittime(bool);
63 virtual void updateCodecName();
64 virtual void accept();
65
66 virtual void apply();
67
68 virtual void dirpool_add();
69 virtual void dirpool_rem();
70
71 void set_password();
72 void lock_password();
73
74 void changed_named_codec(int nr);
75
76 void ListCodecs(avm::vector<avm::CodecInfo>& codec_list);
77 };
78
79 #endif // VIDCONFIG_H