-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://dvbcut.svn.sourceforge.net/svnroot/dvbcut/trunk@165 36490176-9c1c-0410-b649-dbf2af5787bf
- Loading branch information
too-tired
committed
Jun 27, 2009
1 parent
ef83275
commit b6e7d05
Showing
7 changed files
with
197 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
2009-06-27 Michael Riepe <[email protected]> | ||
|
||
* src/dvbcut.cpp: | ||
* src/dvbcut.h: | ||
* src/dvbcutbase.ui: | ||
Add help dialog and about box. | ||
* src/dvbcut_en.html: | ||
Initial (rudimentary) help file. | ||
* DISTFILES: | ||
Add dvbcut_en.html. | ||
* src/Makefile.in: | ||
Install dvbcut_en.html. | ||
|
||
2009-06-27 Michael Riepe <[email protected]> | ||
|
||
* src/stream.h: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2381,3 +2381,90 @@ void dvbcut::update_quick_picture_lookup_table() { | |
update_time_display(); | ||
} | ||
|
||
void dvbcut::helpAboutAction_activated() | ||
{ | ||
QMessageBox::about(this, tr("dvbcut"), | ||
tr("<head></head><body><span style=\"font-family: Helvetica,Arial,sans-serif;\">" | ||
"<p>dvbcut Version %1</p>" | ||
"eMail: <a href=\"mailto:[email protected]?subject=Comment%20about%20dvbcut\">" | ||
"[email protected]</a></p>" | ||
"<p>This program is free software; you can redistribute it and/or " | ||
"modify it under the terms of the GNU General Public License as " | ||
"published by the Free Software Foundation; either version 2 of " | ||
"the License, or (at your option) any later version. This " | ||
"program is distributed in the hope that it will be useful, " | ||
"but WITHOUT ANY WARRANTY; without even the implied warranty of " | ||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU " | ||
"General Public License for more details.</p>" | ||
"<p>You should have received a copy of the GNU General Public License along " | ||
"with this program; if not, see " | ||
"<a href=\"http://www.gnu.org/licenses/\">http://www.gnu.org/licenses/</a>.</p>" | ||
"</span></body></html>").arg(VERSION_STRING)); | ||
} | ||
|
||
#include <qhbox.h> | ||
#include <qvbox.h> | ||
#include <qdialog.h> | ||
#include <qtextbrowser.h> | ||
#include <qpushbutton.h> | ||
|
||
class helpDialog : public QDialog { | ||
public: | ||
helpDialog(QWidget *parent, const char *name, QString file) | ||
: QDialog(parent, name) | ||
{ | ||
vbox = new QVBox(this); | ||
vbox->resize(640, 480); | ||
viewer = new QTextBrowser(vbox); | ||
hbox = new QHBox(vbox); | ||
prev = new QPushButton(tr("Prev"), hbox); | ||
next = new QPushButton(tr("Next"), hbox); | ||
home = new QPushButton(tr("Home"), hbox); | ||
close = new QPushButton(tr("Close"), hbox); | ||
close->setDefault(true); | ||
connect(prev, SIGNAL(clicked()), viewer, SLOT(backward())); | ||
connect(viewer, SIGNAL(backwardAvailable(bool)), prev, SLOT(setEnabled(bool))); | ||
connect(next, SIGNAL(clicked()), viewer, SLOT(forward())); | ||
connect(viewer, SIGNAL(forwardAvailable(bool)), next, SLOT(setEnabled(bool))); | ||
connect(home, SIGNAL(clicked()), viewer, SLOT(home())); | ||
connect(close, SIGNAL(clicked()), this, SLOT(accept())); | ||
viewer->setSource(file); | ||
setCaption(tr("dvbcut help")); | ||
show(); | ||
} | ||
virtual ~helpDialog() { | ||
delete prev; | ||
delete next; | ||
delete home; | ||
delete close; | ||
delete hbox; | ||
delete viewer; | ||
delete vbox; | ||
} | ||
private: | ||
QVBox *vbox; | ||
QHBox *hbox; | ||
QTextBrowser *viewer; | ||
QPushButton *prev, *next, *home, *close; | ||
}; | ||
|
||
void dvbcut::helpContentAction_activated() | ||
{ | ||
QFileInfo appDir(qApp->applicationDirPath()); | ||
// first search in the directory containing dvbcut | ||
QString helpFile = appDir.absFilePath() + "/dvbcut_en.html"; | ||
#ifndef __WIN32__ | ||
// Unix/Linux: search in the associated share subdirectory | ||
if (!QFile::exists(helpFile)) { | ||
helpFile = appDir.dirPath(true) + "/share/help/dvbcut_en.html"; | ||
} | ||
#endif | ||
if (QFile::exists(helpFile)) { | ||
helpDialog dlg(this, "helpDialog", helpFile); | ||
dlg.exec(); | ||
} | ||
else { | ||
QMessageBox::information(this, tr("dvbcut"), | ||
tr("Help file %1 not available").arg(helpFile)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<h1>Keyboard Shortcuts</h1> | ||
<table> | ||
<tr><td><b><u>Shortcut</u></b></td><td><b><u>Description</u></b></td></tr> | ||
<tr><td>Alt+F</td><td>Open file menu</td></tr> | ||
<tr><td>Alt+E</td><td>Open edit menu</td></tr> | ||
<tr><td>Alt+V</td><td>Open view menu</td></tr> | ||
<tr><td>Alt+H</td><td>Open help menu</td></tr> | ||
<tr><td>O</td><td>Open a new file</td></tr> | ||
<tr><td>S</td><td>Save the current project</td></tr> | ||
<tr><td>G</td><td>Save a snapshot</td></tr> | ||
<tr><td>Ctrl+G</td><td>Save chapter snapshots</td></tr> | ||
<tr><td>E</td><td>Export Video</td></tr> | ||
<tr><td>Ctrl+Q</td><td>Quit the program</td></tr> | ||
<tr><td>A</td><td>Set start marker</td></tr> | ||
<tr><td>N</td><td>Set stop marker</td></tr> | ||
<tr><td>C</td><td>Set chapter marker</td></tr> | ||
<tr><td>B</td><td>Set bookmark</td></tr> | ||
<tr><td>Ctrl+C</td><td>Auto chapters</td></tr> | ||
<tr><td>M</td><td>Suggest bookmarks</td></tr> | ||
<tr><td>I</td><td>Import bookmarks</td></tr> | ||
<tr><td>Ctrl+N</td><td>Normal view</td></tr> | ||
<tr><td>Ctrl+U</td><td>Unscaled view</td></tr> | ||
<tr><td>Ctrl+D</td><td>Show difference to current picture</td></tr> | ||
<tr><td>Ctrl++</td><td>Zoom in</td></tr> | ||
<tr><td>Ctrl+—</td><td>Zoom out</td></tr> | ||
<tr><td>Ctrl+1</td><td>View full size</td></tr> | ||
<tr><td>Ctrl+2</td><td>View half size</td></tr> | ||
<tr><td>Ctrl+4</td><td>View quarter size</td></tr> | ||
<tr><td>Ctrl+3</td><td>View custom size</td></tr> | ||
<tr><td>P</td><td>Play video</td></tr> | ||
<tr><td>Q</td><td>Stop playing video</td></tr> | ||
<tr><td>Shift+></td><td>Play last 2 seconds audio</td></tr> | ||
<tr><td><</td><td>Play next 2 seconds audio</td></tr> | ||
<tr><td>F1</td><td>Show this file</td></tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters