mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-22 17:45:48 -05:00
Massive UI revamping (v7): main window documentation
This commit is contained in:
parent
0779ab0c70
commit
f9985ad061
@ -14,10 +14,10 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
|
||||
# configure version
|
||||
set(sdrangel_VERSION_MAJOR "6")
|
||||
set(sdrangel_VERSION_MINOR "20")
|
||||
set(sdrangel_VERSION_PATCH "2")
|
||||
set(sdrangel_VERSION_SUFFIX "")
|
||||
set(sdrangel_VERSION_MAJOR "7")
|
||||
set(sdrangel_VERSION_MINOR "0")
|
||||
set(sdrangel_VERSION_PATCH "0")
|
||||
set(sdrangel_VERSION_SUFFIX "alpha.1")
|
||||
|
||||
# SDRAngel cmake options
|
||||
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
||||
|
BIN
doc/img/Configurations.png
Normal file
BIN
doc/img/Configurations.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
BIN
doc/img/Configurations.xcf
Normal file
BIN
doc/img/Configurations.xcf
Normal file
Binary file not shown.
BIN
doc/img/MainWindow.png
Normal file
BIN
doc/img/MainWindow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
doc/img/Workspace_create_feature.png
Normal file
BIN
doc/img/Workspace_create_feature.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
BIN
doc/img/Workspace_create_rx.png
Normal file
BIN
doc/img/Workspace_create_rx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
doc/img/Workspace_top.png
Normal file
BIN
doc/img/Workspace_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
BIN
doc/img/Workspace_top.xcf
Normal file
BIN
doc/img/Workspace_top.xcf
Normal file
Binary file not shown.
BIN
doc/img/Workspaces.png
Normal file
BIN
doc/img/Workspaces.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
BIN
doc/img/Workspaces.xcf
Normal file
BIN
doc/img/Workspaces.xcf
Normal file
Binary file not shown.
@ -745,6 +745,7 @@ public:
|
||||
friend class WebAPIAdapter;
|
||||
friend class CommandsDialog;
|
||||
friend class DeviceSetPresetsDialog;
|
||||
friend class ConfigurationsDialog;
|
||||
|
||||
signals:
|
||||
void deviceSetAdded(int index, DeviceAPI *device);
|
||||
|
45
sdrgui/configurations.md
Normal file
45
sdrgui/configurations.md
Normal file
@ -0,0 +1,45 @@
|
||||
<h1>Configurations dialog</h1>
|
||||
|
||||
Configuraitons stores the complete setup of a SDRangel instance:
|
||||
|
||||
- Workspaces
|
||||
- Device sets
|
||||
- Features
|
||||
|
||||
It also stores the geometry of all windows and workspaces so that the entire aspect of a configuraiton of the instance can be saved and retrieved. A default configuration is saved at program exit and retrieved at the next prograp start. Use the `--scratch` command line option to skip the retrieval of the default configuration and start with an empty setup.
|
||||
|
||||
![Workspaces feature presets](../doc/img/Configurations.png)
|
||||
|
||||
<h3>1: Configuration selection</h3>
|
||||
|
||||
Move the cursor to select a configuration. Features can be organized into groups at the top level (here "Test"). When selecting a group only Edit and Delete group are available
|
||||
|
||||
<h3>2: Add new configuration</h3>
|
||||
|
||||
Save the current setup in a new configuration.
|
||||
|
||||
<h3>3: Update selected configuration</h3>
|
||||
|
||||
Update the selected configuration with the current setup
|
||||
|
||||
<h3>4: Edit configuration</h3>
|
||||
|
||||
Change configuration name or the configuration group to which this configuration belongs. If selection is a group the group name can be changed.
|
||||
|
||||
<h3>5: Export configuration</h3>
|
||||
Export selected configraton in a file that can be imported on another machine possibly with a different O/S. The configuration binary data (BLOB) is saved in Base-64 format.
|
||||
|
||||
<h3>6: Import preset</h3>
|
||||
This is the opposite of the previous operation. This will create a new configuration in the selected group or the same group as the configuration being selected.
|
||||
|
||||
<h3>7: Delete configuration</h3>
|
||||
|
||||
Delete selected configuration or selected group
|
||||
|
||||
<h3>8: Load configuration</h3>
|
||||
|
||||
Load configuraiton in the current instance. All components and workspaces are deleted first.
|
||||
|
||||
<h3>9: Close dialog</h3>
|
||||
|
||||
This button dismisses the dialog.
|
@ -18,8 +18,10 @@
|
||||
|
||||
#include <QMessageBox>
|
||||
#include <QDebug>
|
||||
#include <QFileDialog>
|
||||
|
||||
#include "gui/addpresetdialog.h"
|
||||
#include "maincore.h"
|
||||
#include "configurationsdialog.h"
|
||||
#include "ui_configurationsdialog.h"
|
||||
|
||||
@ -337,6 +339,100 @@ void ConfigurationsDialog::on_configurationLoad_clicked()
|
||||
emit loadConfiguration(configuration);
|
||||
}
|
||||
|
||||
void ConfigurationsDialog::on_configurationExport_clicked()
|
||||
{
|
||||
QTreeWidgetItem* item = ui->configurationsTree->currentItem();
|
||||
|
||||
if (item)
|
||||
{
|
||||
if (item->type() == PItem)
|
||||
{
|
||||
const Configuration* configuration = qvariant_cast<const Configuration*>(item->data(0, Qt::UserRole));
|
||||
QString base64Str = configuration->serialize().toBase64();
|
||||
QString fileName = QFileDialog::getSaveFileName(
|
||||
this,
|
||||
tr("Open preset export file"),
|
||||
".",
|
||||
tr("Configuration export files (*.cfgx)"),
|
||||
0,
|
||||
QFileDialog::DontUseNativeDialog
|
||||
);
|
||||
|
||||
if (fileName != "")
|
||||
{
|
||||
QFileInfo fileInfo(fileName);
|
||||
|
||||
if (fileInfo.suffix() != "cfgx") {
|
||||
fileName += ".cfgx";
|
||||
}
|
||||
|
||||
QFile exportFile(fileName);
|
||||
|
||||
if (exportFile.open(QIODevice::WriteOnly | QIODevice::Text))
|
||||
{
|
||||
QTextStream outstream(&exportFile);
|
||||
outstream << base64Str;
|
||||
exportFile.close();
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Message"), tr("Cannot open file for writing"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigurationsDialog::on_configurationImport_clicked()
|
||||
{
|
||||
QTreeWidgetItem* item = ui->configurationsTree->currentItem();
|
||||
|
||||
if (item)
|
||||
{
|
||||
QString group;
|
||||
|
||||
if (item->type() == PGroup) {
|
||||
group = item->text(0);
|
||||
} else if (item->type() == PItem) {
|
||||
group = item->parent()->text(0);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
QString fileName = QFileDialog::getOpenFileName(
|
||||
this,
|
||||
tr("Open preset export file"),
|
||||
".",
|
||||
tr("Preset export files (*.cfgx)"),
|
||||
0,
|
||||
QFileDialog::DontUseNativeDialog
|
||||
);
|
||||
|
||||
if (fileName != "")
|
||||
{
|
||||
QFile exportFile(fileName);
|
||||
|
||||
if (exportFile.open(QIODevice::ReadOnly | QIODevice::Text))
|
||||
{
|
||||
QByteArray base64Str;
|
||||
QTextStream instream(&exportFile);
|
||||
instream >> base64Str;
|
||||
exportFile.close();
|
||||
|
||||
Configuration* configuration = MainCore::instance()->m_settings.newConfiguration("", "");
|
||||
configuration->deserialize(QByteArray::fromBase64(base64Str));
|
||||
configuration->setGroup(group); // override with current group
|
||||
|
||||
ui->configurationsTree->setCurrentItem(addConfigurationToTree(configuration));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Message"), tr("Cannot open file for reading"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ConfigurationsDialog::on_configurationTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous)
|
||||
{
|
||||
(void) current;
|
||||
|
@ -65,6 +65,8 @@ private slots:
|
||||
void on_configurationSave_clicked();
|
||||
void on_configurationUpdate_clicked();
|
||||
void on_configurationEdit_clicked();
|
||||
void on_configurationExport_clicked();
|
||||
void on_configurationImport_clicked();
|
||||
void on_configurationDelete_clicked();
|
||||
void on_configurationLoad_clicked();
|
||||
void on_configurationTree_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
|
||||
|
@ -135,6 +135,34 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="configurationExport">
|
||||
<property name="toolTip">
|
||||
<string>Export current configuration to file</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/res.qrc">
|
||||
<normaloff>:/export.png</normaloff>:/export.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="configurationImport">
|
||||
<property name="toolTip">
|
||||
<string>Import configuration from file into current group</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../resources/res.qrc">
|
||||
<normaloff>:/import.png</normaloff>:/import.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
@ -40,6 +40,7 @@ MainSpectrumGUI::MainSpectrumGUI(GLSpectrum *spectrum, GLSpectrumGUI *spectrumGU
|
||||
{
|
||||
qDebug("MainSpectrumGUI::MainSpectrumGUI: %p", parent);
|
||||
setWindowFlags(windowFlags() | Qt::FramelessWindowHint);
|
||||
m_helpURL = "sdrgui/mainspectrum/readme.md";
|
||||
|
||||
m_indexLabel = new QLabel();
|
||||
m_indexLabel->setFixedSize(32, 16);
|
||||
@ -199,7 +200,7 @@ void MainSpectrumGUI::showHelp()
|
||||
if (m_helpURL.startsWith("http")) {
|
||||
url = m_helpURL;
|
||||
} else {
|
||||
url = QString("https://github.com/f4exb/sdrangel/blob/master/%1").arg(m_helpURL); // Something like "plugins/channelrx/chanalyzer/readme.md"
|
||||
url = QString("https://github.com/f4exb/sdrangel/blob/v7/%1").arg(m_helpURL); // Something like "plugins/channelrx/chanalyzer/readme.md"
|
||||
}
|
||||
|
||||
QDesktopServices::openUrl(QUrl(url));
|
||||
|
@ -1870,12 +1870,12 @@ void MainWindow::on_action_saveAll_triggered()
|
||||
|
||||
void MainWindow::on_action_Quick_Start_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/f4exb/sdrangel/wiki/Quick-start"));
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/f4exb/sdrangel/wiki/Quick-start-v7"));
|
||||
}
|
||||
|
||||
void MainWindow::on_action_Main_Window_triggered()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/f4exb/sdrangel/blob/master/sdrgui/readme.md"));
|
||||
QDesktopServices::openUrl(QUrl("https://github.com/f4exb/sdrangel/blob/v7/sdrgui/readme.md"));
|
||||
}
|
||||
|
||||
void MainWindow::on_action_Loaded_Plugins_triggered()
|
||||
|
1097
sdrgui/readme.md
1097
sdrgui/readme.md
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user