Massive UI revamping (v7): main window documentation

pull/1214/head v7.0.0-alpha.1
f4exb 2022-04-19 07:03:28 +02:00
rodzic 0779ab0c70
commit f9985ad061
18 zmienionych plików z 375 dodań i 909 usunięć

Wyświetl plik

@ -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)

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 26 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 17 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 7.6 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 11 KiB

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 8.9 KiB

Plik binarny nie jest wyświetlany.

Plik binarny nie jest wyświetlany.

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 53 KiB

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -745,6 +745,7 @@ public:
friend class WebAPIAdapter;
friend class CommandsDialog;
friend class DeviceSetPresetsDialog;
friend class ConfigurationsDialog;
signals:
void deviceSetAdded(int index, DeviceAPI *device);

Wyświetl plik

@ -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.

Wyświetl plik

@ -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;

Wyświetl plik

@ -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);

Wyświetl plik

@ -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">

Wyświetl plik

@ -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));

Wyświetl plik

@ -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()

Plik diff jest za duży Load Diff