mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 23:35:33 +08:00
refs #828, added HTML template
This commit is contained in:
@@ -6,12 +6,14 @@ CONFIG -= qt
|
|||||||
|
|
||||||
OTHER_FILES += share/images/flags/*.png
|
OTHER_FILES += share/images/flags/*.png
|
||||||
OTHER_FILES += share/images/airlines/*.png
|
OTHER_FILES += share/images/airlines/*.png
|
||||||
OTHER_FILES += shared//bootstrap/*.*
|
OTHER_FILES += shared/bootstrap/*.*
|
||||||
|
OTHER_FILES += shared/html/*.*
|
||||||
OTHER_FILES += shared/dbdata/*.*
|
OTHER_FILES += shared/dbdata/*.*
|
||||||
OTHER_FILES += shared/updateinfo/*.*
|
OTHER_FILES += shared/updateinfo/*.*
|
||||||
|
|
||||||
COPY_FILES += $$PWD/share/images/flags/*.png
|
COPY_FILES += $$PWD/share/images/flags/*.png
|
||||||
COPY_FILES += $$PWD/share/images/airlines/*.png
|
COPY_FILES += $$PWD/share/images/airlines/*.png
|
||||||
|
COPY_FILES += $$PWD/share/html/*.*
|
||||||
COPY_FILES += $$PWD/share/shared/bootstrap/*.*
|
COPY_FILES += $$PWD/share/shared/bootstrap/*.*
|
||||||
COPY_FILES += $$PWD/share/shared/dbdata/*.*
|
COPY_FILES += $$PWD/share/shared/dbdata/*.*
|
||||||
COPY_FILES += $$PWD/share/shared/updateinfo/*.*
|
COPY_FILES += $$PWD/share/shared/updateinfo/*.*
|
||||||
|
|||||||
43
resources/share/html/swifttemplate.html
Normal file
43
resources/share/html/swifttemplate.html
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>swift</title>
|
||||||
|
<meta name="description" content="swift page">
|
||||||
|
<meta name="author" content="swift team">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: white;
|
||||||
|
font-family: arial;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
tr:nth-child(even) {
|
||||||
|
background-color: #c0c0c0;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid lightblue;
|
||||||
|
}
|
||||||
|
th {
|
||||||
|
background:#001;
|
||||||
|
color:#fff;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.mouseoverdisplay {
|
||||||
|
background-color: #eeeeee;
|
||||||
|
position: absolute;
|
||||||
|
z-index:100;
|
||||||
|
display: none;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
a:hover + .mouseoverdisplay {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
%1
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
//! \cond PRIVATE
|
//! \cond PRIVATE
|
||||||
|
|
||||||
#include "blackconfig/buildconfig.h"
|
#include "blackconfig/buildconfig.h"
|
||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -196,7 +195,7 @@ namespace BlackConfig
|
|||||||
{
|
{
|
||||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||||
if (d.isEmpty()) { return ""; }
|
if (d.isEmpty()) { return ""; }
|
||||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "shared/dbdata"));
|
const QDir dir(QDir::cleanPath(d + QDir::separator() + "shared/dbdata"));
|
||||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
@@ -211,7 +210,7 @@ namespace BlackConfig
|
|||||||
{
|
{
|
||||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||||
if (d.isEmpty()) { return ""; }
|
if (d.isEmpty()) { return ""; }
|
||||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "sounds"));
|
const QDir dir(QDir::cleanPath(d + QDir::separator() + "sounds"));
|
||||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
@@ -226,7 +225,7 @@ namespace BlackConfig
|
|||||||
{
|
{
|
||||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||||
if (d.isEmpty()) { return ""; }
|
if (d.isEmpty()) { return ""; }
|
||||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "qss"));
|
const QDir dir(QDir::cleanPath(d + QDir::separator() + "qss"));
|
||||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
@@ -240,7 +239,7 @@ namespace BlackConfig
|
|||||||
QString getImagesDirImpl()
|
QString getImagesDirImpl()
|
||||||
{
|
{
|
||||||
const QString d(CBuildConfig::getSwiftResourceDir());
|
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||||
QDir dir(QDir::cleanPath(d + QDir::separator() + "images"));
|
const QDir dir(QDir::cleanPath(d + QDir::separator() + "images"));
|
||||||
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||||
return dir.absolutePath();
|
return dir.absolutePath();
|
||||||
}
|
}
|
||||||
@@ -251,6 +250,26 @@ namespace BlackConfig
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString getHtmlDirImpl()
|
||||||
|
{
|
||||||
|
const QString d(CBuildConfig::getSwiftResourceDir());
|
||||||
|
const QDir dir(QDir::cleanPath(d + QDir::separator() + "html"));
|
||||||
|
Q_ASSERT_X(dir.exists(), Q_FUNC_INFO, "missing dir");
|
||||||
|
return dir.absolutePath();
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CBuildConfig::getHtmlDir()
|
||||||
|
{
|
||||||
|
static const QString s(getHtmlDirImpl());
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
const QString &CBuildConfig::getHtmlTemplateFileName()
|
||||||
|
{
|
||||||
|
static const QString s(getHtmlDir() + QDir::separator() + "swifttemplate.html");
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
bool CBuildConfig::canRunInDeveloperEnvironment()
|
bool CBuildConfig::canRunInDeveloperEnvironment()
|
||||||
{
|
{
|
||||||
if (CBuildConfig::isBetaTest()) { return true; }
|
if (CBuildConfig::isBetaTest()) { return true; }
|
||||||
|
|||||||
@@ -106,6 +106,12 @@ namespace BlackConfig
|
|||||||
//! Where images are located
|
//! Where images are located
|
||||||
static const QString &getImagesDir();
|
static const QString &getImagesDir();
|
||||||
|
|
||||||
|
//! Where HTML files are located
|
||||||
|
static const QString &getHtmlDir();
|
||||||
|
|
||||||
|
//! Where HTML files are located
|
||||||
|
static const QString &getHtmlTemplateFileName();
|
||||||
|
|
||||||
//! Directory where data can be stored
|
//! Directory where data can be stored
|
||||||
static const QString &getDocumentationDirectory();
|
static const QString &getDocumentationDirectory();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user