Skip to content

Commit 858a117

Browse files
committed
Help item
1 parent 48d3e8b commit 858a117

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

src/Interface/Application/SCIRunMainWindow.cc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ static const char* ToolkitIconURL = "ToolkitIconURL";
8686
static const char* ToolkitURL = "ToolkitURL";
8787
static const char* ToolkitFilename = "ToolkitFilename";
8888

89-
SCIRunMainWindow::SCIRunMainWindow() : shortcuts_(nullptr), firstTimePythonShown_(true), returnCode_(0), quitAfterExecute_(false)
89+
SCIRunMainWindow::SCIRunMainWindow() : shortcuts_(nullptr), returnCode_(0), quitAfterExecute_(false)
9090
{
9191
setupUi(this);
9292
setAttribute(Qt::WA_DeleteOnClose);
@@ -240,6 +240,7 @@ SCIRunMainWindow::SCIRunMainWindow() : shortcuts_(nullptr), firstTimePythonShown
240240
connect(helpActionSnippets_, SIGNAL(triggered()), this, SLOT(showSnippetHelp()));
241241
connect(helpActionClipboard_, SIGNAL(triggered()), this, SLOT(showClipboardHelp()));
242242
connect(helpActionTagLayer_, SIGNAL(triggered()), this, SLOT(showTagHelp()));
243+
connect(helpActionTriggeredScripts_, SIGNAL(triggered()), this, SLOT(showTriggerHelp()));
243244

244245
connect(actionReset_Window_Layout, SIGNAL(triggered()), this, SLOT(resetWindowLayout()));
245246

@@ -1031,7 +1032,6 @@ void SCIRunMainWindow::setupPythonConsole()
10311032
#ifdef BUILD_WITH_PYTHON
10321033
pythonConsole_ = new PythonConsoleWidget(this);
10331034
connect(actionPythonConsole_, SIGNAL(toggled(bool)), pythonConsole_, SLOT(setVisible(bool)));
1034-
connect(actionPythonConsole_, SIGNAL(toggled(bool)), this, SLOT(showPythonWarning(bool)));
10351035
actionPythonConsole_->setIcon(QPixmap(":/general/Resources/terminal.png"));
10361036
connect(pythonConsole_, SIGNAL(visibilityChanged(bool)), actionPythonConsole_, SLOT(setChecked(bool)));
10371037
pythonConsole_->setVisible(false);
@@ -1073,14 +1073,6 @@ void SCIRunMainWindow::updateMiniView()
10731073
Qt::SmoothTransformation));
10741074
}
10751075

1076-
void SCIRunMainWindow::showPythonWarning(bool visible)
1077-
{
1078-
if (visible && firstTimePythonShown_)
1079-
{
1080-
firstTimePythonShown_ = false;
1081-
}
1082-
}
1083-
10841076
void SCIRunMainWindow::makeModulesLargeSize()
10851077
{
10861078
networkEditor_->setModuleMini(false);
@@ -1925,6 +1917,17 @@ void SCIRunMainWindow::loadPythonAPIDoc()
19251917
openPythonAPIDoc();
19261918
}
19271919

1920+
void SCIRunMainWindow::showTriggerHelp()
1921+
{
1922+
QMessageBox::information(this, "Triggered Scripts",
1923+
"TODO"
1924+
// "\n\nTo cut/copy/paste, see the Edit menu and the corresponding hotkeys."
1925+
// "\n\nClipboard history items can be starred like module favorites. When starred, they are saved as fragments under \"Saved Subnetworks,\" which are preserved in application settings. "
1926+
// "\n\nThe user may edit the text of the saved subnetwork items to give them informative names, which are also saved. Hover over them to see a tooltip representation of the saved fragment."
1927+
// "\n\nCurrently there is no way to delete a saved subnetwork in the GUI."
1928+
);
1929+
}
1930+
19281931
FileDownloader::FileDownloader(QUrl imageUrl, QStatusBar* statusBar, QObject *parent) : QObject(parent), reply_(nullptr), statusBar_(statusBar)
19291932
{
19301933
connect(&webCtrl_, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileDownloaded(QNetworkReply*)));

src/Interface/Application/SCIRunMainWindow.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ public Q_SLOTS:
154154
QStringList recentFiles_;
155155
QString currentFile_;
156156
QDir latestNetworkDirectory_;
157-
bool firstTimePythonShown_;
158157
int returnCode_;
159158
QMap<QString,QMap<QString,QString>> styleSheetDetails_;
160159
QMap<QString, QAction*> currentModuleActions_;
@@ -190,7 +189,6 @@ private Q_SLOTS:
190189
void setGlobalPortCaching(bool enable);
191190
void readDefaultNotePosition(int index);
192191
void updateMiniView();
193-
void showPythonWarning(bool visible);
194192
void makeModulesLargeSize();
195193
void makeModulesSmallSize();
196194
void alertForNetworkCycles(int code);
@@ -216,6 +214,7 @@ private Q_SLOTS:
216214
void showSnippetHelp();
217215
void showClipboardHelp();
218216
void showTagHelp();
217+
void showTriggerHelp();
219218
void copyVersionToClipboard();
220219
void updateClipboardHistory(const QString& xml);
221220
void changeExecuteActionIconToStop();

src/Interface/Application/SCIRunMainWindow.ui

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
<addaction name="helpActionNetworkFileImport_"/>
156156
<addaction name="helpActionNetworkEditorGUI_"/>
157157
<addaction name="helpActionClipboard_"/>
158+
<addaction name="helpActionTriggeredScripts_"/>
158159
</widget>
159160
<addaction name="actionShow_Tooltips_"/>
160161
<addaction name="actionAbout_"/>
@@ -1034,6 +1035,11 @@
10341035
<string>Clipboard</string>
10351036
</property>
10361037
</action>
1038+
<action name="helpActionTriggeredScripts_">
1039+
<property name="text">
1040+
<string>Triggered Scripts</string>
1041+
</property>
1042+
</action>
10371043
</widget>
10381044
<resources/>
10391045
<connections>

0 commit comments

Comments
 (0)