blob: 45e33a6fa440a78fb101483b652568068a448e6f (
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
|
#include <qqcombores.h>
#include <sstream>
#include <string>
#include <QDebug>
#include <iostream>
#include <FakeWindow.h>
QqComboRes::QqComboRes(V4L2CamLayer *lay, QqWidget *parent) :
QWidget(parent)
{
m_QqWidget = parent;
m_resBox = new QComboBox(this);
m_resBox->setToolTip("V4L2 resolution");
m_res = lay->getRes();
m_lay = lay;
QStringList res;
QString qx, qy, qres;
for (int i = 0; i < m_res->getNb(); i++){
qx.setNum (m_res->getX(i));
qy.setNum (m_res->getY(i));
qres.clear();
qres = qx + "x" + qy;
res << qres;
}
m_resBox->addItems(res);
m_resBox->setCurrentIndex(m_res->getCurIdx());
connect(m_resBox, SIGNAL(activated(int)), this, SLOT(changeRes(int)));
}
void QqComboRes::changeRes(int line) {
m_lay->chgRes(line, m_res);
m_QqWidget->resetZoom();
}
|