1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-22 17:45:48 -05:00

Added options to display scope primary or secondary displays exclusively

This commit is contained in:
f4exb 2015-07-12 22:22:04 +02:00
parent b10cab79ae
commit 3d75f2f899
8 changed files with 760 additions and 450 deletions

View File

@ -42,6 +42,12 @@ public:
ModeCyclostationary
};
enum Displays {
DisplayBoth,
DisplayFirstOnly,
DisplaySecondOnly
};
GLScope(QWidget* parent = NULL);
~GLScope();
@ -51,6 +57,7 @@ public:
void setTimeBase(int timeBase);
void setTimeOfsProMill(int timeOfsProMill);
void setMode(Mode mode);
void setDisplays(Displays displays);
void setOrientation(Qt::Orientation orientation);
void setDisplayGridIntensity(int intensity);
@ -72,6 +79,7 @@ private:
bool m_dataChanged;
bool m_configChanged;
Mode m_mode;
Displays m_displays;
Qt::Orientation m_orientation;
// traces

View File

@ -67,6 +67,8 @@ private slots:
void on_horizView_clicked();
void on_vertView_clicked();
void on_onlyPrimeView_clicked();
void on_onlySecondView_clicked();
};
#endif // INCLUDE_GLSCOPEGUI_H

File diff suppressed because it is too large Load Diff

View File

@ -248,24 +248,63 @@ void GLScopeGUI::on_dataMode_currentIndexChanged(int index)
void GLScopeGUI::on_horizView_clicked()
{
std::cerr << "GLScopeGUI::on_horizView_clicked" << std::endl;
m_displayOrientation = Qt::Horizontal;
if(ui->horizView->isChecked()) {
ui->vertView->setChecked(false);
ui->onlyPrimeView->setChecked(false);
ui->onlySecondView->setChecked(false);
m_glScope->setOrientation(Qt::Horizontal);
m_glScope->setDisplays(GLScope::DisplayBoth);
} else {
ui->horizView->setChecked(true);
m_glScope->setOrientation(Qt::Horizontal);
m_glScope->setDisplays(GLScope::DisplayBoth);
}
}
void GLScopeGUI::on_vertView_clicked()
{
std::cerr << "GLScopeGUI::on_vertView_clicked" << std::endl;
m_displayOrientation = Qt::Vertical;
if(ui->vertView->isChecked()) {
ui->horizView->setChecked(false);
ui->onlyPrimeView->setChecked(false);
ui->onlySecondView->setChecked(false);
m_glScope->setOrientation(Qt::Vertical);
m_glScope->setDisplays(GLScope::DisplayBoth);
} else {
ui->vertView->setChecked(true);
m_glScope->setOrientation(Qt::Vertical);
m_glScope->setDisplays(GLScope::DisplayBoth);
}
}
void GLScopeGUI::on_onlyPrimeView_clicked()
{
std::cerr << "GLScopeGUI::on_onlyPrimeView_clicked" << std::endl;
if(ui->onlyPrimeView->isChecked()) {
ui->horizView->setChecked(false);
ui->vertView->setChecked(false);
ui->onlySecondView->setChecked(false);
m_glScope->setDisplays(GLScope::DisplayFirstOnly);
} else {
ui->onlyPrimeView->setChecked(true);
m_glScope->setDisplays(GLScope::DisplayFirstOnly);
}
}
void GLScopeGUI::on_onlySecondView_clicked()
{
std::cerr << "GLScopeGUI::on_onlySecondView_clicked" << std::endl;
if(ui->onlySecondView->isChecked()) {
ui->horizView->setChecked(false);
ui->vertView->setChecked(false);
ui->onlyPrimeView->setChecked(false);
m_glScope->setDisplays(GLScope::DisplaySecondOnly);
} else {
ui->onlySecondView->setChecked(true);
m_glScope->setDisplays(GLScope::DisplaySecondOnly);
}
}

View File

@ -79,27 +79,27 @@
</property>
<item>
<property name="text">
<string>I+Q (linear)</string>
<string>1:I 2:Q (linear)</string>
</property>
</item>
<item>
<property name="text">
<string>Mag (linear) + Phi</string>
<string>1:Mag (linear) 2:Phi</string>
</property>
</item>
<item>
<property name="text">
<string>Mag (dB) + Phi</string>
<string>1:Mag (dB) 2: Phi</string>
</property>
</item>
<item>
<property name="text">
<string>Derived 1+2nd </string>
<string>1:Derived 1 2:2nd </string>
</property>
</item>
<item>
<property name="text">
<string>Cyclostationary</string>
<string>1,2:Cyclostationary</string>
</property>
</item>
</widget>
@ -116,10 +116,56 @@
<property name="spacing">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="onlyPrimeView">
<property name="toolTip">
<string>Only primary display</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/display1.png</normaloff>:/display1.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="onlySecondView">
<property name="toolTip">
<string>Only secondary display</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../resources/res.qrc">
<normaloff>:/display2.png</normaloff>:/display2.png</iconset>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="horizView">
<property name="toolTip">
<string>Horizontal display arrangement</string>
<string>Both displays horizontally arranged</string>
</property>
<property name="text">
<string/>
@ -145,7 +191,7 @@
<item>
<widget class="QToolButton" name="vertView">
<property name="toolTip">
<string>Vertical display arrangement</string>
<string>Both displays vertically arranged</string>
</property>
<property name="text">
<string/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

View File

@ -14,5 +14,7 @@
<file>grid.png</file>
<file>invertspectrum.png</file>
<file>preset-last.png</file>
<file>display1.png</file>
<file>display2.png</file>
</qresource>
</RCC>