WSL/SLF GitLab Repository

Commit e8c6983a authored by Michael Reisecker's avatar Michael Reisecker
Browse files

Remove obsolete instruction in settings page

- No need to refresh apps anymore
- change link syntax from help:// to doc://
- add link to help from settings page
- some comments
parent f6dc7646
......@@ -10,7 +10,7 @@ Releases of the INIshell project will be documented in this file.
Sections can now be replicated as Input1, Input2, ...
- Support for internal links in the XMLs:
Hyperlinks can now open help topics and highlight input parameters
- 'Duplicate', "Open parent folder" and "Delete" context menu for INI files
- "Duplicate", "Open parent folder" and "Delete" context menu for INI files
- Prompt to auto-restart Inishell after appearance settings change
### Changed
......@@ -20,7 +20,7 @@ Releases of the INIshell project will be documented in this file.
(handling all help topics)
- Settings are now a separate window:
Standard "reset", "save" and "clear" buttons (in addition to cmd line)
- Display sections for missing INI keys
- Display sections for missing mandatory INI keys
- Jump to 1st missing input value if saving is cancelled
- Workflow panel is now toggled instead of separate show/hide menus
......@@ -28,14 +28,14 @@ Releases of the INIshell project will be documented in this file.
- MacOS help and other menus
- Replicator default value labelling
- 'Unsaved' marker bug in the Preview Editor
- "Unsaved" marker bug in the Preview Editor
- Edge case crash of the help file
- Context help works reliably now
- Several macOS integration improvements
- Several overall UI improvements
- Selectors and Replicators are not reported missing if they have children
- Performance improvements
- Tests
- Fixed unit test
- Transportation of unknown keys to preview and output
- Example simulation paths with new working directory field
- Several minor bugs
......@@ -43,7 +43,7 @@ Releases of the INIshell project will be documented in this file.
### Framework
- Easy-to-use subclassed TabBar which is now the main recursion container
(therefore XMLs can now transparently loaded into any area we'd like)
(therefore XMLs can now be transparently loaded into any area we'd like)
- Easy usage of "do not show again" dialogs now possible
- Major refactoring and logic improvements in MainWindow and MainPanel
- "Highlight" functionality for all input panels
......@@ -112,7 +112,7 @@ several smaller issues.
- Text conversion features for the Preview Editor
- INI file features for the Preview Editor
- 'filename' mode in FilePath
- "filename" mode in FilePath
- Line numbering in Preview
- Numerous XML descriptions of features
......
......@@ -10,10 +10,10 @@
<help>A (missing) text value.</help>
</parameter>
<parameter key="TEXT" label="" type="text" optional="false" default="def">
<parameter key="TEXT2" label="" type="text" optional="false" default="def">
<help>How it looks for explicitly empty labels</help>
</parameter>
<parameter key="TEXT" type="text" optional="false" default="${env:USeR}">
<parameter key="TEXT3" type="text" optional="false" default="${env:USeR}">
<help>Styling of invalid expression</help>
</parameter>
......@@ -24,7 +24,7 @@
<help>... but not if the box does have a label</help>
</parameter>
<parameter key="CHECKLIST" type="checklist" optional="false" default="OP1">
<parameter key="CHECKLIST" type="checklist" optional="false">
<option value="OP1"/>
<option value="OP2"/>
</parameter>
......
......@@ -90,10 +90,10 @@ This is INIshell's user guide.
<parameter type="label" label="&lt;h3&gt;First steps&lt;/h3&gt;" color="sl_violet">
<section name="First steps" color="sl_violet"/>
</parameter>
<frame caption="Loading applications">
<frame caption="Loading applications" key="help-load-apps">
<section name="First steps"/>
<parameter type="helptext" wrap="true">
<help>An &lt;b&gt;application&lt;/b&gt; in this scope is software that can be configured via INI keys, for example SLF's &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/meteoio/&quot;&gt;MeteoIO&lt;/a&gt;&lt;/i&gt;, &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/snowpack/&quot;&gt;SNOWPACK&lt;/a&gt;&lt;/i&gt; and &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/alpine3d&quot;&gt;Alpine3D&lt;/a&gt;&lt;/i&gt;. You should see a list of applications for which configuration files have been shipped with &lt;i&gt;INIshell&lt;/i&gt; in the &lt;font color=&quot;#268bd2&quot;&gt;Applications&lt;/font&gt; tab of the workflow panel. If not, see the &lt;a href=&quot;help://troubleshooting::help-no-applications&quot;&gt;Troubleshooting&lt;/a&gt; part of this help.</help>
<help>An &lt;b&gt;application&lt;/b&gt; in this scope is software that can be configured via INI keys, for example SLF's &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/meteoio/&quot;&gt;MeteoIO&lt;/a&gt;&lt;/i&gt;, &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/snowpack/&quot;&gt;SNOWPACK&lt;/a&gt;&lt;/i&gt; and &lt;i&gt;&lt;a href=&quot;https://models.slf.ch/p/alpine3d&quot;&gt;Alpine3D&lt;/a&gt;&lt;/i&gt;. You should see a list of applications for which configuration files have been shipped with &lt;i&gt;INIshell&lt;/i&gt; in the &lt;font color=&quot;#268bd2&quot;&gt;Applications&lt;/font&gt; tab of the workflow panel. If not, see the &lt;a href=&quot;doc://troubleshooting::help-no-applications&quot;&gt;Troubleshooting&lt;/a&gt; part of this help.</help>
</parameter>
<parameter type="helptext" wrap="true">
<help>Once you have loaded the application by double-clicking it, all its INI settings will be displayed in the main panel. You can now start configuring the application / simulation in the main panel.</help>
......@@ -137,7 +137,7 @@ This is INIshell's user guide.
<help>If you already have your toolchain set up this may be all there is to do and you can start your simulation with the new INI file. However, &lt;i&gt;INIshell&lt;/i&gt; can be configured to provide a workflow that is specific to an application. Hence, the workflow panel may change depending on which application you have loaded.</help>
</parameter>
<parameter type="helptext" wrap="true">
<help>To follow an example workflow, click the &lt;a href=&quot;help://example workflow&quot;&gt;Example workflow&lt;/a&gt; tab of this help. To set up your own simulations, see the &lt;a href=&quot;help://configuring simulations&quot;&gt;Configuring simulations&lt;/a&gt; tab of this help.&lt;br&gt;</help>
<help>To follow an example workflow, click the &lt;a href=&quot;doc://example workflow&quot;&gt;Example workflow&lt;/a&gt; tab of this help. To set up your own simulations, see the &lt;a href=&quot;doc://configuring simulations&quot;&gt;Configuring simulations&lt;/a&gt; tab of this help.&lt;br&gt;</help>
</parameter>
<frame caption="Note" color="info" background_color="sl_base2">
<parameter type="helptext" wrap="true">
......@@ -441,7 +441,7 @@ This is INIshell's user guide.
</parameter>
<parameter type="helptext" wrap="true">
<section name="Example Workflow"/>
<help>This is a walkthrough of the different steps of the provided example simulation. If you don't see the experiment &quot;Weißfluhjoch&quot; in the &lt;font color=&quot;#268bd2&quot;&gt;Simulations&lt;/font&gt; workflow tab, please check the &lt;a href=&quot;help://troubleshooting::help-no-simulations&quot;&gt;Troubleshooting&lt;/a&gt; part of this help.&lt;br&gt;</help>
<help>This is a walkthrough of the different steps of the provided example simulation. If you don't see the experiment &quot;Weißfluhjoch&quot; in the &lt;font color=&quot;#268bd2&quot;&gt;Simulations&lt;/font&gt; workflow tab, please check the &lt;a href=&quot;doc://troubleshooting::help-no-simulations&quot;&gt;Troubleshooting&lt;/a&gt; part of this help.&lt;br&gt;</help>
</parameter>
<frame caption="Working directory" key="help-workingdir">
<section name="Example Workflow"/>
......
......@@ -27,10 +27,10 @@ For changes, note that the keys used here are hardcoded in INIshell also.
<frame caption="Applications and Simulations paths" section="settings">
<parameter type="helptext" wrap="true">
<help>Here you can select paths that will be searched for Applications and Simulations (see the respective help file pages). In addition to the paths you set here, &lt;i&gt;INIshell&lt;/i&gt; will decide on a number of standard paths to walk (you can view a list via the command line options).</help>
<help>Here you can select paths that will be searched for Applications and Simulations (see the respective &lt;a href=&quot;doc://First steps::help-load-apps&quot;&gt;help file pages&lt;/a&gt;). In addition to the paths you set here, &lt;i&gt;INIshell&lt;/i&gt; will decide on a number of standard paths to walk (you can view a list via the command line options).</help>
</parameter>
<parameter key="user::xmlpaths::path#" label="Add path to search for Applications and Simulations:" type="path" replicate="true" mode="input" help="Enter path to search for Applications and Simulations">
<help>After saving the settings you must right-click the Applications or Simulations view and click &quot;Refresh&quot; (or check the "View" menu for the keyboard shortcut).</help>
<help>Point to an arbitrary number of folders which contain application files known to &lt;i&gt;INIshell&lt;/i&gt;.</help>
</parameter>
</frame>
<frame caption="Appearance" section="settings">
......
......@@ -406,7 +406,7 @@ bool SectionTab::showPanel(const QString &section, const QString &element_key)
(void) panel->getIniValue(section, key);
if (QString::compare(key, element_key, Qt::CaseInsensitive) == 0) {
const QString id( section + Cst::sep + key ); //a frame can also have an (arbitrary) key
auto panel = getMainWindow()->getControlPanel()->getSectionTab()->findChild<Atomic *>(Atomic::getQtKey(id));
this->findChild<Atomic *>(Atomic::getQtKey(id));
if (!panel)
continue;
parent->ensureWidgetVisible(panel->getEmphasisWidget()); //scroll the ScrollBar until visible
......
......@@ -125,12 +125,12 @@ void Atomic::clear(const bool &set_default)
void Atomic::setHighlightedStyle(const bool &on, const int &reset_interval)
{
Group *me = qobject_cast<Group *>(this);
if (me) {
if (me) { //I'm a frame --> flash border
QString stylesheet_copy( getEmphasisWidget()->styleSheet() );
getEmphasisWidget()->setStyleSheet(stylesheet_copy.replace( //flash frame border color
colors::getQColor(on? "frameborder" : "sl_yellow").name(QColor::HexRgb).toLower(),
colors::getQColor(on? "sl_yellow" : "frameborder").name()));
} else {
} else { //panel --> highlight
emphasis_widget_->setProperty("highlight", (on? "true" : "false"));
}
this->style()->unpolish(emphasis_widget_);
......
......@@ -103,13 +103,13 @@ void Helptext::initHelpLabel()
* @details We catch custom urls to help pages and forward the rest
* to the desktop services as usual.
* The syntax of the link must be
* help://section or help://section::frame-key
* doc://section or doc://section::element-key
* @param link The link to open.
*/
void Helptext::onLinkClicked(const QString &link)
{
if (link.startsWith("help://")) { //link to our own help system
QStringList topic( link.mid(7).split("::") );
if (link.startsWith("doc://")) { //link to our own help system
QStringList topic( link.mid(6).split("::") );
if (topic.count() == 1)
topic.append(QString());
getMainWindow()->loadHelp(topic.at(0), topic.at(1));
......@@ -130,7 +130,7 @@ void Helptext::onLinkClicked(const QString &link)
*/
void Helptext::onLinkHover(const QString &link)
{
if (link.startsWith("help://"))
if (link.startsWith("doc://"))
this->setCursor(QCursor(Qt::CursorShape::WhatsThisCursor));
else if (link.startsWith("app://"))
this->setCursor(QCursor(Qt::CrossCursor));
......
......@@ -41,7 +41,7 @@ class Replicator : public Atomic {
explicit Replicator(const QString &section, const QString &key, const QDomNode &options,
const bool &no_spacers, QWidget *parent = nullptr);
int count() const { return container_->count(); }
bool isEmpty() const { return container_->count() == 0; }
bool isEmpty() const { return container_->isEmpty(); }
void clear(const bool &set_default = true) override;
private:
......
......@@ -282,6 +282,10 @@ int main(int argc, char *argv[])
loadSettings(xml_settings_filename, errors); //load global settings file
checkSettings(); //make sure valid settings can be read throughout this program run
//NOTE: Due to the issues outlined in setAppStylesheet() font inheritance is stopped as soon
//as a custom font, stylesheet, or style is set (e. g. for macOS styling).
//We would need to set the font manually for each label, widget, ... and always when we
//apply a stylesheet...
QFont global_font(QApplication::font());
global_font.setPointSize(getSetting("user::appearance::fontsize", "value").toInt());
QApplication::setFont(global_font);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment