Added entries for the documents to the menu.
This commit is contained in:
parent
1defdff854
commit
83192245a0
@ -1754,6 +1754,10 @@
|
||||
RelativePath=".\tmp\MOC_Tool_Abstract.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\tmp\RCC_Documents.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\tmp\RCC_Flags.cpp"
|
||||
>
|
||||
@ -1778,6 +1782,20 @@
|
||||
<Filter
|
||||
Name="Resources"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\res\Documents.qrc"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="RCC "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
CommandLine=""$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\RCC_$(SafeInputName).cpp" -name "$(SafeInputName)" "$(InputPath)""
|
||||
Outputs=""$(SolutionDir)tmp\RCC_$(SafeInputName).cpp""
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\Flags.qrc"
|
||||
>
|
||||
|
@ -2728,6 +2728,10 @@
|
||||
<addaction name="actionCheckUpdates"/>
|
||||
<addaction name="actionVisitHomepage"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionDocumentFAQ"/>
|
||||
<addaction name="actionDocumentChangelog"/>
|
||||
<addaction name="actionDocumentTranslate"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
@ -3031,6 +3035,33 @@
|
||||
<string>Disable Shell Integration</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDocumentFAQ">
|
||||
<property name="icon">
|
||||
<iconset resource="../res/Icons.qrc">
|
||||
<normaloff>:/icons/report.png</normaloff>:/icons/report.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Frequently Asked Questions</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDocumentChangelog">
|
||||
<property name="icon">
|
||||
<iconset resource="../res/Icons.qrc">
|
||||
<normaloff>:/icons/report.png</normaloff>:/icons/report.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Changelog</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDocumentTranslate">
|
||||
<property name="icon">
|
||||
<iconset resource="../res/Icons.qrc">
|
||||
<normaloff>:/icons/report.png</normaloff>:/icons/report.png</iconset>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Translator's Guide</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../res/Icons.qrc"/>
|
||||
@ -3094,6 +3125,8 @@
|
||||
<include location="../res/Icons.qrc"/>
|
||||
<include location="../res/Icons.qrc"/>
|
||||
<include location="../res/Icons.qrc"/>
|
||||
<include location="../res/Icons.qrc"/>
|
||||
<include location="../res/Icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
|
@ -62,6 +62,7 @@
|
||||
<file>icons/page_white_cd.png</file>
|
||||
<file>icons/paste_plain.png</file>
|
||||
<file>icons/play.png</file>
|
||||
<file>icons/report.png</file>
|
||||
<file>icons/resultset_next.png</file>
|
||||
<file>icons/script.png</file>
|
||||
<file>icons/script_edit.png</file>
|
||||
|
@ -25,7 +25,7 @@
|
||||
#define VER_LAMEXP_MAJOR 4
|
||||
#define VER_LAMEXP_MINOR_HI 0
|
||||
#define VER_LAMEXP_MINOR_LO 1
|
||||
#define VER_LAMEXP_BUILD 375
|
||||
#define VER_LAMEXP_BUILD 377
|
||||
#define VER_LAMEXP_SUFFIX Beta-9
|
||||
|
||||
/*
|
||||
|
@ -325,8 +325,14 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
|
||||
connect(actionShowDropBoxWidget, SIGNAL(triggered(bool)), this, SLOT(showDropBoxWidgetActionTriggered(bool)));
|
||||
|
||||
//Activate help menu actions
|
||||
actionDocumentFAQ->setData(QString("%1/FAQ.html").arg(QApplication::applicationDirPath()));
|
||||
actionDocumentChangelog->setData(QString("%1/Changelog.html").arg(QApplication::applicationDirPath()));
|
||||
actionDocumentTranslate->setData(QString("%1/Translate.html").arg(QApplication::applicationDirPath()));
|
||||
connect(actionCheckUpdates, SIGNAL(triggered()), this, SLOT(checkUpdatesActionActivated()));
|
||||
connect(actionVisitHomepage, SIGNAL(triggered()), this, SLOT(visitHomepageActionActivated()));
|
||||
connect(actionDocumentFAQ, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
|
||||
connect(actionDocumentChangelog, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
|
||||
connect(actionDocumentTranslate, SIGNAL(triggered()), this, SLOT(documentActionActivated()));
|
||||
|
||||
//Center window in screen
|
||||
QRect desktopRect = QApplication::desktop()->screenGeometry();
|
||||
@ -1512,6 +1518,38 @@ void MainWindow::visitHomepageActionActivated(void)
|
||||
QDesktopServices::openUrl(QUrl(lamexp_website_url()));
|
||||
}
|
||||
|
||||
/*
|
||||
* Show document
|
||||
*/
|
||||
void MainWindow::documentActionActivated(void)
|
||||
{
|
||||
if(QAction *action = dynamic_cast<QAction*>(QObject::sender()))
|
||||
{
|
||||
if(action->data().isValid() && (action->data().type() == QVariant::String))
|
||||
{
|
||||
QFileInfo document(action->data().toString());
|
||||
QFileInfo resource(QString(":/doc/%1.html").arg(document.baseName()));
|
||||
if(document.exists() && document.isFile() && (document.size() == resource.size()))
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///%1").arg(document.canonicalFilePath())));
|
||||
}
|
||||
else
|
||||
{
|
||||
QFile source(resource.filePath());
|
||||
QFile output(QString("%1/%2.%3.html").arg(lamexp_temp_folder2(), document.baseName(), lamexp_rand_str().left(8)));
|
||||
if(source.open(QIODevice::ReadOnly) && output.open(QIODevice::ReadWrite))
|
||||
{
|
||||
output.write(source.readAll());
|
||||
action->setData(output.fileName());
|
||||
source.close();
|
||||
output.close();
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///%1").arg(output.fileName())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for updates action
|
||||
*/
|
||||
|
@ -70,6 +70,7 @@ private slots:
|
||||
void gotoMusicFolderButtonClicked(void);
|
||||
void checkUpdatesActionActivated(void);
|
||||
void visitHomepageActionActivated(void);
|
||||
void documentActionActivated(void);
|
||||
void openFolderActionActivated(void);
|
||||
void notifyOtherInstance(void);
|
||||
void addFileDelayed(const QString &filePath);
|
||||
|
Loading…
Reference in New Issue
Block a user