diff -r 000e4543f204 -r fd707afbc3a2 QTfrontend/ui/page/pagevideos.h --- a/QTfrontend/ui/page/pagevideos.h Sun Jun 24 20:31:26 2012 +0400 +++ b/QTfrontend/ui/page/pagevideos.h Sun Jun 24 20:57:02 2012 +0400 @@ -20,11 +20,12 @@ #ifndef PAGE_VIDEOS_H #define PAGE_VIDEOS_H -#include -#include +#include #include "AbstractPage.h" class GameUIConfig; +class HWRecorder; +class VideoItem; class PageVideos : public AbstractPage { @@ -33,44 +34,77 @@ public: PageVideos(QWidget* parent = 0); - QComboBox *CBAVFormats; - QComboBox *CBVideoCodecs; - QComboBox *CBAudioCodecs; QSpinBox *framerateBox; QLineEdit *widthEdit; QLineEdit *heightEdit; - QCheckBox *CBUseGameRes; - QCheckBox *CBRecordAudio; + QCheckBox *checkUseGameRes; + QCheckBox *checkRecordAudio; - QString getFormat() - { return CBAVFormats->itemData(CBAVFormats->currentIndex()).toString(); } + GameUIConfig * config; - QString getVideoCodec() - { return CBVideoCodecs->itemData(CBVideoCodecs->currentIndex()).toString(); } + QString format() + { return comboAVFormats->itemData(comboAVFormats->currentIndex()).toString(); } - QString getAudioCodec() - { return CBAudioCodecs->itemData(CBAudioCodecs->currentIndex()).toString(); } + QString videoCodec() + { return comboVideoCodecs->itemData(comboVideoCodecs->currentIndex()).toString(); } + + QString audioCodec() + { return comboAudioCodecs->itemData(comboAudioCodecs->currentIndex()).toString(); } void setDefaultCodecs(); bool tryCodecs(const QString & format, const QString & vcodec, const QString & acodec); - - GameUIConfig * config; - - signals: + void addRecorder(HWRecorder* pRecorder); private: + // virtuals from AbstractPage QLayout * bodyLayoutDefinition(); QLayout * footerLayoutDefinition(); void connectSignals(); - QPushButton *BtnDefaults; + // virtual from QWidget + void keyPressEvent(QKeyEvent * pEvent); + + void setName(VideoItem * item, const QString & newName); + void updateSize(int row); + int appendRow(const QString & name); + VideoItem* nameItem(int row); + void play(int row); + void updateDescription(); + + // options group + QComboBox *comboAVFormats; + QComboBox *comboVideoCodecs; + QComboBox *comboAudioCodecs; + QPushButton *btnDefaults; + + // file list group QTableWidget *filesTable; + QPushButton *btnOpenDir; + + // description group + QPushButton *btnPlay, *btnDelete; + QLabel *labelDesc; + QLabel *labelThumbnail; + QPixmap picThumbnail; + + // this flag is used to distinguish if cell was changed from code or by user + // (in signal cellChanged) + bool nameChangedFromCode; private slots: void changeAVFormat(int index); void changeUseGameRes(int state); void changeRecordAudio(int state); void setDefaultOptions(); + void encodingFinished(bool success); + void updateProgress(float value); + void cellDoubleClicked(int row, int column); + void cellChanged(int row, int column); + void currentCellChanged(int row, int column, int previousRow, int previousColumn); + void playSelectedFile(); + void deleteSelectedFiles(); + void openVideosDirectory(); + void updateFileList(const QString & path); }; #endif // PAGE_VIDEOS_H