add Pony() call <3

helper and library refatoring
This commit is contained in:
arcan1s
2014-08-11 21:51:50 +04:00
parent d166668feb
commit 61d814d9a2
14 changed files with 95 additions and 36 deletions

View File

@ -76,6 +76,11 @@ th.sub {
<td>returns path to the library documentation</td>
<td>no</td>
</tr>
<tr>
<td>QString Pony()</td>
<td>prints Pinkie Pie to stdout. Really, just try</td>
<td>no</td>
</tr>
<tr>
<td>QString SecurityDocs()</td>
<td>returns path to the security documentation</td>
@ -272,6 +277,11 @@ th.sub {
<td>opens the library documentation</td>
<td>no</td>
</tr>
<tr>
<td>QString Pony()</td>
<td>prints Pinkie Pie to stdout. Really, just try</td>
<td>no</td>
</tr>
<tr>
<td>bool Restore()</td>
<td><code>true</code> and restores the application</td>

View File

@ -17,6 +17,8 @@
#include "netctlguiadaptor.h"
#include <QTextCodec>
#include "mainwindow.h"
@ -57,6 +59,19 @@ void NetctlGuiAdaptor::LibraryDocs()
}
QString NetctlGuiAdaptor::Pony()
{
QString pony;
QFile ponyFile(QString(":pinkiepie"));
if (!ponyFile.open(QIODevice::ReadOnly))
return pony;
pony = QTextCodec::codecForMib(106)->toUnicode(ponyFile.readAll());
ponyFile.close();
return pony;
}
bool NetctlGuiAdaptor::Restore()
{
mainWindow->show();

View File

@ -38,6 +38,7 @@ public slots:
bool Close();
QStringList Information();
void LibraryDocs();
QString Pony();
bool Restore();
void SecurityDocs();
QStringList Settings();