mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Highlight the current workspace
This commit is contained in:
parent
c7c0247f81
commit
af712de404
@ -299,7 +299,7 @@ void ChannelGUI::showHelp()
|
|||||||
void ChannelGUI::openMoveToWorkspaceDialog()
|
void ChannelGUI::openMoveToWorkspaceDialog()
|
||||||
{
|
{
|
||||||
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
||||||
WorkspaceSelectionDialog dialog(numberOfWorkspaces, this);
|
WorkspaceSelectionDialog dialog(numberOfWorkspaces, getWorkspaceIndex(), this);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
if (dialog.hasChanged()) {
|
if (dialog.hasChanged()) {
|
||||||
|
@ -370,7 +370,7 @@ void DeviceGUI::showHelp()
|
|||||||
void DeviceGUI::openMoveToWorkspaceDialog()
|
void DeviceGUI::openMoveToWorkspaceDialog()
|
||||||
{
|
{
|
||||||
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
||||||
WorkspaceSelectionDialog dialog(numberOfWorkspaces, this);
|
WorkspaceSelectionDialog dialog(numberOfWorkspaces, getWorkspaceIndex(), this);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
if (dialog.hasChanged()) {
|
if (dialog.hasChanged()) {
|
||||||
|
@ -250,7 +250,7 @@ void FeatureGUI::showHelp()
|
|||||||
void FeatureGUI::openMoveToWorkspaceDialog()
|
void FeatureGUI::openMoveToWorkspaceDialog()
|
||||||
{
|
{
|
||||||
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
||||||
WorkspaceSelectionDialog dialog(numberOfWorkspaces, this);
|
WorkspaceSelectionDialog dialog(numberOfWorkspaces, getWorkspaceIndex(), this);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
if (dialog.hasChanged()) {
|
if (dialog.hasChanged()) {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "workspaceselectiondialog.h"
|
#include "workspaceselectiondialog.h"
|
||||||
#include "ui_workspaceselectiondialog.h"
|
#include "ui_workspaceselectiondialog.h"
|
||||||
|
|
||||||
WorkspaceSelectionDialog::WorkspaceSelectionDialog(int numberOfWorkspaces, QWidget *parent) :
|
WorkspaceSelectionDialog::WorkspaceSelectionDialog(int numberOfWorkspaces, int workspaceIndex, QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
ui(new Ui::WorkspaceSelectionDialog),
|
ui(new Ui::WorkspaceSelectionDialog),
|
||||||
m_numberOfWorkspaces(numberOfWorkspaces),
|
m_numberOfWorkspaces(numberOfWorkspaces),
|
||||||
@ -34,6 +34,7 @@ WorkspaceSelectionDialog::WorkspaceSelectionDialog(int numberOfWorkspaces, QWidg
|
|||||||
for (int i = 0; i < m_numberOfWorkspaces; i++) {
|
for (int i = 0; i < m_numberOfWorkspaces; i++) {
|
||||||
ui->workspaceList->addItem(tr("W:%1").arg(i));
|
ui->workspaceList->addItem(tr("W:%1").arg(i));
|
||||||
}
|
}
|
||||||
|
ui->workspaceList->setCurrentRow(workspaceIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
WorkspaceSelectionDialog::~WorkspaceSelectionDialog()
|
WorkspaceSelectionDialog::~WorkspaceSelectionDialog()
|
||||||
|
@ -33,7 +33,7 @@ class SDRGUI_API WorkspaceSelectionDialog : public QDialog
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit WorkspaceSelectionDialog(int numberOfWorkspaces, QWidget *parent = nullptr);
|
explicit WorkspaceSelectionDialog(int numberOfWorkspaces, int workspaceIndex, QWidget *parent = nullptr);
|
||||||
~WorkspaceSelectionDialog();
|
~WorkspaceSelectionDialog();
|
||||||
|
|
||||||
bool hasChanged() const { return m_hasChanged; }
|
bool hasChanged() const { return m_hasChanged; }
|
||||||
|
@ -257,7 +257,7 @@ void MainSpectrumGUI::showHelp()
|
|||||||
void MainSpectrumGUI::openMoveToWorkspaceDialog()
|
void MainSpectrumGUI::openMoveToWorkspaceDialog()
|
||||||
{
|
{
|
||||||
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
int numberOfWorkspaces = MainWindow::getInstance()->getNumberOfWorkspaces();
|
||||||
WorkspaceSelectionDialog dialog(numberOfWorkspaces, this);
|
WorkspaceSelectionDialog dialog(numberOfWorkspaces, getWorkspaceIndex(), this);
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
|
|
||||||
if (dialog.hasChanged()) {
|
if (dialog.hasChanged()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user