mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-09 20:05:53 +00:00
add docs integration
This commit is contained in:
@ -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
|
||||
|
@ -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();
|
||||
|
@ -38,7 +38,10 @@ public:
|
||||
public slots:
|
||||
// helper
|
||||
bool Active();
|
||||
QString ApiDocs();
|
||||
bool Close();
|
||||
QString LibraryDocs();
|
||||
QString SecurityDocs();
|
||||
QStringList Settings();
|
||||
bool Update();
|
||||
// netctlCommand
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user