Skip to content

Commit

Permalink
Added basic Help / App Keys command.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahlstromcj committed Aug 26, 2023
1 parent 62b54ce commit e810557
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 13 deletions.
10 changes: 3 additions & 7 deletions TODO
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
TO DO for Seq66 0.99.8
Chris Ahlstrom
2019-04-13 to 2023-08-25
2019-04-13 to 2023-08-26

Misc:

- The time-line shows measures 11, 21, etc. for Peter Gunn tune.
The main window shows PPQN = 1920, but in qseqtime get_ppqn()
shows 192! Setting ppqn in 'usr' file fixes this issue.
- Make sure L/R looping buttons (main and song) works.
- There are many "TODOs" in the automation slots.
- Add a feature to start playback when the first note comes
into a pattern when recording is set. [Turns out to be quite tricky!]
- Document and test all this churn.
- Document better all of the keys on the seqroll, etc. Add a
context/focus-sensitive Help / Keyboard menu
- Make the performer get/put_settings() functions robust.
- Randomizing seems to have a negative bias (after many repeats).
- Add a feature to start playback when the first note comes
into a pattern when recording is set. [Turns out to be quite tricky!]

Some of these issues will be pushed off for the distant Seq66v2.

Expand Down
5 changes: 2 additions & 3 deletions seq_qt5/forms/qsappinfo.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<widget class="QDialogButtonBox" name="buttonBox">
<property name="geometry">
<rect>
<x>204</x>
<x>340</x>
<y>428</y>
<width>91</width>
<height>32</height>
Expand Down Expand Up @@ -81,8 +81,7 @@ hr { height: 1px; border-width: 0; }
li.unchecked::marker { content: &quot;\2610&quot;; }
li.checked::marker { content: &quot;\2612&quot;; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Noto Sans'; font-size:12pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Each pane has keystrokes separate from the automation keystrokes, and thus not modifiable. The arrow-keys are hardwired for scroll the pane.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;(Filled at runtime)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</widget>
Expand Down
6 changes: 6 additions & 0 deletions seq_qt5/forms/qsmainwnd.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,7 @@ beats/minute.</string>
<addaction name="actionBuildInfo"/>
<addaction name="actionSongSummary"/>
<addaction name="separator"/>
<addaction name="actionAppInfo"/>
<addaction name="actionTutorial"/>
<addaction name="actionUserManual"/>
</widget>
Expand Down Expand Up @@ -1706,6 +1707,11 @@ beats/minute.</string>
<string>&amp;Build Info...</string>
</property>
</action>
<action name="actionAppInfo">
<property name="text">
<string>App &amp;Keys...</string>
</property>
</action>
<action name="actionAbout_Qt">
<property name="text">
<string>About Qt...</string>
Expand Down
5 changes: 4 additions & 1 deletion seq_qt5/include/qsmainwnd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2018-01-01
* \updates 2023-07-08
* \updates 2023-08-26
* \license GNU GPLv2 or above
*
* The main window is known as the "Patterns window" or "Patterns panel". It
Expand Down Expand Up @@ -89,6 +89,7 @@ namespace seq66
class qperfeditframe64;
class qplaylistframe;
class qsabout;
class qsappinfo;
class qsbuildinfo;
class qseditoptions;
class qseqeditex;
Expand Down Expand Up @@ -321,6 +322,7 @@ class qsmainwnd final : public QMainWindow, protected performer::callbacks
qseditoptions * m_dialog_prefs;
qsabout * m_dialog_about;
qsbuildinfo * m_dialog_build_info;
qsappinfo * m_dialog_app_info;
qsessionframe * m_session_frame;
qsetmaster * m_set_master;
qmutemaster * m_mute_master;
Expand Down Expand Up @@ -474,6 +476,7 @@ private slots:
void show_save_mutes_dialog (); /* NOT YET CONNECTED */
void show_qsabout ();
void show_qsbuildinfo ();
void show_qsappinfo ();
void tabWidgetClicked (int newindex);
void conditional_update (); /* redraw certain GUI elements */
void load_editor (int seqid);
Expand Down
50 changes: 49 additions & 1 deletion seq_qt5/src/qsappinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,54 @@
namespace seq66
{

/**
* Currently just test code.
*/

const std::string s_main_html
{
"<html>"
"<head>"
"<meta name=\"qrichtext\" content=\"1\" />"
"<meta charset=\"utf-8\" />"
"<style type=\"text/css\">"
"p, li { white-space: pre-wrap; }"
"hr { height: 1px; border-width: 0; }"
"li.unchecked::marker { content: \"\2610\"; }"
"li.checked::marker { content: \"\2612\"; }"
"</style>"
"</head>"
"<body>"
" <p> <b> Common Keystrokes</b> </p>"
" <p>"
" Each piano roll panel has keystrokes separate from the automation keystrokes, and thus not configurable. The arrow keys and some other characters provide functions that are common to the pattern edit and song \"piano rolls\"."
" <br>"
" <table>"
" <tr>"
" <td> Standard movement keys</td>"
" <td> Arrow-left, -right, -up, -down</td>"
" </tr>"
" <tr>"
" <td> vi-like movement keys</td>"
" <td> h, j, k, l</rd>"
" </tr>"
" <tr>"
" <td> Standard large movement keys</td>"
" <td> Page-Up, Page-Down, and Ctrl-Home, Ctrl-End</rd>"
" </tr>"
" <tr>"
" <td> Horizontal zoom keys</td>"
" <td> Zoom out 'z', zoom in 'Z', reset '0'</rd>"
" </tr>"
" <tr>"
" <td> Vertical zoom keys</td>"
" <td> Zoom out 'v', zoom in 'V', reset '0'</rd>"
" </tr>"
" </table>"
"</body>"
"</html>"
};

/**
* Principal constructor.
*/
Expand All @@ -70,7 +118,7 @@ qsappinfo::qsappinfo (QWidget * parent) :
ui (new Ui::qsappinfo)
{
ui->setupUi(this);

ui->textBrowser->setHtml(qt(s_main_html));
}

qsappinfo::~qsappinfo ()
Expand Down
18 changes: 17 additions & 1 deletion seq_qt5/src/qsmainwnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* \library seq66 application
* \author Chris Ahlstrom
* \date 2018-01-01
* \updates 2023-08-21
* \updates 2023-08-26
* \license GNU GPLv2 or above
*
* The main window is known as the "Patterns window" or "Patterns panel". It
Expand Down Expand Up @@ -59,6 +59,7 @@
* Quit/Exit quit() Normal Qt application closing
* Help show_qsabout() Show Help About (version info)
* show_qsbuildinfo() Show features of the build
* show_qsappinfo() Show additional features
*/

#include <QErrorMessage> /* QErrorMessage */
Expand Down Expand Up @@ -93,6 +94,7 @@
#include "qperfeditframe64.hpp" /* seq66::qperfeditframe64 class */
#include "qplaylistframe.hpp" /* seq66::qplaylistframe class */
#include "qsabout.hpp" /* seq66::qsabout dialog class */
#include "qsappinfo.hpp" /* seq66::qsappinfo dialog class */
#include "qsbuildinfo.hpp" /* seq66::qsbuildinfo dialog class */
#include "qseditoptions.hpp" /* seq66::qseditoptions dialog */
#include "qseqeditex.hpp" /* seq66::qseqeditex container */
Expand Down Expand Up @@ -241,6 +243,7 @@ qsmainwnd::qsmainwnd
m_dialog_prefs (nullptr),
m_dialog_about (nullptr),
m_dialog_build_info (nullptr),
m_dialog_app_info (nullptr),
m_session_frame (nullptr),
m_set_master (nullptr),
m_mute_master (nullptr),
Expand Down Expand Up @@ -372,6 +375,7 @@ qsmainwnd::qsmainwnd
cb_perf(), ui->verticalWidget /*this*/, 4, 4
);
m_dialog_about = new (std::nothrow) qsabout(this);
m_dialog_app_info = new (std::nothrow) qsappinfo(this);
m_dialog_build_info = new (std::nothrow) qsbuildinfo(this);
make_perf_frame_in_tab(); /* create m_song_frame64 pointer */
m_live_frame = new (std::nothrow) qslivegrid
Expand Down Expand Up @@ -474,6 +478,11 @@ qsmainwnd::qsmainwnd
this, SLOT(show_qsbuildinfo())
);
connect
(
ui->actionAppInfo, SIGNAL(triggered(bool)),
this, SLOT(show_qsappinfo())
);
connect
(
ui->actionSongSummary, SIGNAL(triggered(bool)),
this, SLOT(slot_summary_save())
Expand Down Expand Up @@ -2421,6 +2430,13 @@ qsmainwnd::show_qsbuildinfo ()
m_dialog_build_info->show();
}

void
qsmainwnd::show_qsappinfo ()
{
if (not_nullptr(m_dialog_app_info))
m_dialog_app_info->show();
}

/**
* Loads a slightly compressed qseqeditframe64 for the selected
* sequence into the "Edit" tab. It is compressed by hiding some of
Expand Down

0 comments on commit e810557

Please sign in to comment.