-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathformatselect.cpp
More file actions
38 lines (32 loc) · 776 Bytes
/
formatselect.cpp
File metadata and controls
38 lines (32 loc) · 776 Bytes
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
#include <QDialog>
#include "formatselect.h"
#include "ui_formatselect.h"
#include "../Lib/alertsound.h"
#include "../Lib/iniconfig.h"
FormatSelect::FormatSelect(QWidget *parent) :
QDialog(parent),
ui(new Ui::FormatSelect)
{
ui->setupUi(this);
}
void FormatSelect::addItem(QString description, QString codec)
{
ui->selectCodec->addItem(description, codec) ;
ui->selectCodec->setCurrentIndex(0) ;
}
QString FormatSelect::getSelection()
{
if (ui->selectCodec->currentIndex()<0) return QString("") ;
else return ui->selectCodec->currentData() ;
}
int FormatSelect::exec()
{
ui->selectCodec->setCurrentIndex(0) ;
ui->helpText->setFocus() ;
play(Query) ;
return QDialog::exec() ;
}
FormatSelect::~FormatSelect()
{
delete ui;
}