link to docs from application Help menu (Ticket #90)

This commit is contained in:
Volker Fischer 2020-05-02 08:24:01 +02:00
parent 9a6653525b
commit 51e1edfad5
6 changed files with 25 additions and 18 deletions

View File

@ -10,13 +10,13 @@
* added bassoon instrument icon, created by dszgit (Ticket #131)
* link to docs from application Help menu (Ticket #90)
* bug fix: for mono capture jack audio interface Jamulus complains it cannot make connections (Ticket #137)
TODO implement panning for channels (Ticket #52, #145)
TODO improve help menu, see https://github.com/corrados/jamulus/issues/90
TODO support internationalization
TODO standard style: meter bar gets smaller sometimes if board is full and fader text is short

View File

@ -283,7 +283,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
pMenu = new QMenuBar ( this );
pMenu->addMenu ( pViewMenu );
pMenu->addMenu ( new CHelpMenu ( this ) );
pMenu->addMenu ( new CHelpMenu ( true, this ) );
// Now tell the layout about the menu
layout()->setMenuBar ( pMenu );

View File

@ -105,8 +105,10 @@ LED bar: lbr
#define DEFAULT_SERVER_ADDRESS "jamulus.fischvolk.de"
#define DEFAULT_SERVER_NAME "Central Server"
// download URL
#define SOFTWARE_DOWNLOAD_URL "http://sourceforge.net/projects/llcon/files"
// getting started and software manual URL
#define CLIENT_GETTING_STARTED_URL "https://github.com/corrados/jamulus/wiki/Software-Manual"
#define SERVER_GETTING_STARTED_URL "https://github.com/corrados/jamulus/wiki/Running-a-Server"
#define SOFTWARE_MANUAL_URL "https://github.com/corrados/jamulus/blob/master/src/res/homepage/manual.md"
// determining server internal address uses well-known host and port
// (Google DNS, or something else reliable)

View File

@ -283,7 +283,7 @@ lvwClients->setMinimumHeight ( 140 );
pMenu = new QMenuBar ( this );
pMenu->addMenu ( pViewMenu );
pMenu->addMenu ( new CHelpMenu ( this ) );
pMenu->addMenu ( new CHelpMenu ( false, this ) );
// Now tell the layout about the menu
layout()->setMenuBar ( pMenu );

View File

@ -806,16 +806,20 @@ void CMusProfDlg::OnSkillActivated ( int iCntryListItem )
// Help menu -------------------------------------------------------------------
CHelpMenu::CHelpMenu ( QWidget* parent ) : QMenu ( "&?", parent )
CHelpMenu::CHelpMenu ( const bool bIsClient, QWidget* parent ) : QMenu ( "&Help", parent )
{
// standard help menu consists of about and what's this help
addAction ( tr ( "What's &This" ), this,
SLOT ( OnHelpWhatsThis() ), QKeySequence ( Qt::SHIFT + Qt::Key_F1 ) );
if ( bIsClient )
{
addAction ( tr ( "Getting &Started..." ), this, SLOT ( OnHelpClientGetStarted() ) );
addAction ( tr ( "Software &Manual..." ), this, SLOT ( OnHelpSoftwareMan() ) );
}
else
{
addAction ( tr ( "Getting &Started..." ), this, SLOT ( OnHelpServerGetStarted() ) );
}
addSeparator();
addAction ( tr ( "&Download Link..." ), this,
SLOT ( OnHelpDownloadLink() ) );
addAction ( tr ( "What's &This" ), this, SLOT ( OnHelpWhatsThis() ), QKeySequence ( Qt::SHIFT + Qt::Key_F1 ) );
addSeparator();
addAction ( tr ( "&About..." ), this, SLOT ( OnHelpAbout() ) );
}

View File

@ -473,16 +473,17 @@ class CHelpMenu : public QMenu
Q_OBJECT
public:
CHelpMenu ( QWidget* parent = nullptr );
CHelpMenu ( const bool bIsClient, QWidget* parent = nullptr );
protected:
CAboutDlg AboutDlg;
public slots:
void OnHelpWhatsThis() { QWhatsThis::enterWhatsThisMode(); }
void OnHelpAbout() { AboutDlg.exec(); }
void OnHelpDownloadLink()
{ QDesktopServices::openUrl ( QUrl ( SOFTWARE_DOWNLOAD_URL ) ); }
void OnHelpWhatsThis() { QWhatsThis::enterWhatsThisMode(); }
void OnHelpAbout() { AboutDlg.exec(); }
void OnHelpClientGetStarted() { QDesktopServices::openUrl ( QUrl ( CLIENT_GETTING_STARTED_URL ) ); }
void OnHelpServerGetStarted() { QDesktopServices::openUrl ( QUrl ( SERVER_GETTING_STARTED_URL ) ); }
void OnHelpSoftwareMan() { QDesktopServices::openUrl ( QUrl ( SOFTWARE_MANUAL_URL ) ); }
};