add docs integration

This commit is contained in:
arcan1s
2014-08-10 11:05:29 +04:00
parent d44979e95e
commit 11db0fcf8d
23 changed files with 684 additions and 127 deletions

View File

@ -56,9 +56,13 @@ and edit copied file to avoid upgrade problems.
.SH SEE ALSO
.BR netctl-gui (1)
.SH STANDARDS
Some text will be here
See
.B @CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/netctl-gui-dbus-api.html
for more details.
.SH SECURITY CONSIDERATIONS
Some text will be here.
See
.B @CMAKE_INSTALL_PREFIX@/share/doc/netctl-gui/netctl-gui-security-notes.html
for more details.
.SH AUTHOR
@PROJECT_AUTHOR@ <\fI@PROJECT_CONTACT@\fR>
.SH LICENSE

View File

@ -18,6 +18,7 @@
#include "controladaptor.h"
#include "netctlhelper.h"
#include "version.h"
ControlAdaptor::ControlAdaptor(NetctlHelper *parent, const QMap<QString, QString> configuration)
@ -46,6 +47,12 @@ bool ControlAdaptor::Active()
}
QString ControlAdaptor::ApiDocs()
{
return (QString(DOCS_PATH) + QString("netctl-gui-dbus-api.html"));
}
bool ControlAdaptor::Close()
{
helper->quitHelper();
@ -53,6 +60,18 @@ bool ControlAdaptor::Close()
}
QString ControlAdaptor::LibraryDocs()
{
return (QString(DOCS_PATH) + QString("html/index.html"));
}
QString ControlAdaptor::SecurityDocs()
{
return (QString(DOCS_PATH) + QString("netctl-gui-security-notes.html"));
}
QStringList ControlAdaptor::Settings()
{
return helper->printSettings();

View File

@ -38,7 +38,10 @@ public:
public slots:
// helper
bool Active();
QString ApiDocs();
bool Close();
QString LibraryDocs();
QString SecurityDocs();
QStringList Settings();
bool Update();
// netctlCommand

View File

@ -95,6 +95,12 @@ QString infoMessage()
infoMessage += QString("\tDBUS_HELPER_INTERFACE=%1\n").arg(QString(DBUS_HELPER_INTERFACE));
infoMessage += QString("\tDBUS_CTRL_PATH=%1\n").arg(QString(DBUS_CTRL_PATH));
infoMessage += QString("\tDBUS_LIB_PATH=%1\n").arg(QString(DBUS_LIB_PATH));
// docs path
infoMessage += QString("%1:\n").arg(QCoreApplication::translate("NetctlHelper", "Documentation"));
infoMessage += QString("\tDOCS_PATH=%1\n").arg(QString(DOCS_PATH));
QStringList docs = QDir(QString(DOCS_PATH)).entryList(QDir::NoDotAndDotDot);
for (int i=0; i<docs.count(); i++)
infoMessage += QString("\t%1\n").arg(docs[i]);
return infoMessage;
}