ui: different ui for trial and app
This commit is contained in:
@@ -1,24 +0,0 @@
|
||||
#ifndef LICENSES_H
|
||||
#define LICENSES_H
|
||||
|
||||
// This File(licenses.h) is generated with CMake
|
||||
|
||||
struct ThirdPartyLicense {
|
||||
const char* name;
|
||||
const char* url;
|
||||
const char* license;
|
||||
|
||||
ThirdPartyLicense() : name(0), url(0), license(0) {}
|
||||
ThirdPartyLicense(const char* name, const char* url, const char* license)
|
||||
: name(name), url(url), license(license) {}
|
||||
bool isEmpty() const { return (name == 0 && url == 0 && license == 0); }
|
||||
};
|
||||
|
||||
// License Textfiles
|
||||
@LICENSES@
|
||||
|
||||
static const ThirdPartyLicense licenses3rdParties[] = {
|
||||
@LICENSE_ARRAY@
|
||||
};
|
||||
|
||||
#endif //LICENSES_H
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <QTextEdit>
|
||||
|
||||
#include "licenses.h"
|
||||
#include "isTrial.h"
|
||||
|
||||
QtAboutLicense::QtAboutLicense(QWidget *parent)
|
||||
: QtSettingsWindow(parent)
|
||||
@@ -34,24 +35,28 @@ void QtAboutLicense::populateForm(QFormLayout* layout)
|
||||
{
|
||||
for(ThirdPartyLicense license : licenses3rdParties)
|
||||
{
|
||||
QLabel* licenseName = new QLabel();
|
||||
licenseName->setText( QString::fromLatin1(license.name));
|
||||
QFont _font = licenseName->font();
|
||||
_font.setPixelSize(36);
|
||||
licenseName->setFont(_font);
|
||||
layout->addWidget(licenseName);
|
||||
if( !(isTrial() && license.isNotInTrial) )
|
||||
{
|
||||
QLabel* licenseName = new QLabel();
|
||||
licenseName->setText( QString::fromLatin1(license.name));
|
||||
QFont _font = licenseName->font();
|
||||
_font.setPixelSize(36);
|
||||
licenseName->setFont(_font);
|
||||
layout->addWidget(licenseName);
|
||||
|
||||
QLabel* licenseURL = new QLabel();
|
||||
licenseURL->setText(QString::fromLatin1("(<a href=\"%1\">Website</a>)")
|
||||
.arg(QString::fromLatin1(license.url)));
|
||||
licenseURL->setOpenExternalLinks(true);
|
||||
layout->addWidget(licenseURL);
|
||||
QLabel* licenseURL = new QLabel();
|
||||
licenseURL->setText(QString::fromLatin1("(<a href=\"%1\">Website</a>)")
|
||||
.arg(QString::fromLatin1(license.url)));
|
||||
licenseURL->setOpenExternalLinks(true);
|
||||
layout->addWidget(licenseURL);
|
||||
|
||||
QLabel* licenseText = new QLabel();
|
||||
licenseText->setFixedWidth(450);
|
||||
licenseText->setWordWrap(true);
|
||||
licenseText->setText(QString::fromLatin1(license.license));
|
||||
layout->addWidget(licenseText);
|
||||
}
|
||||
|
||||
QLabel* licenseText = new QLabel();
|
||||
licenseText->setFixedWidth(450);
|
||||
licenseText->setWordWrap(true);
|
||||
licenseText->setText(QString::fromLatin1(license.license));
|
||||
layout->addWidget(licenseText);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "utility/messaging/type/MessageWindowFocus.h"
|
||||
#include "utility/messaging/type/MessageZoom.h"
|
||||
#include "version.h"
|
||||
#include "isTrial.h"
|
||||
|
||||
std::string QtMainWindow::m_windowSettingsPath = "data/window_settings.ini";
|
||||
|
||||
@@ -407,16 +408,19 @@ void QtMainWindow::setupProjectMenu()
|
||||
QMenu *menu = new QMenu(tr("&Project"), this);
|
||||
menuBar()->addMenu(menu);
|
||||
|
||||
menu->addAction(tr("&New Project..."), this, SLOT(newProject()), QKeySequence::New);
|
||||
menu->addAction(tr("&Open Project..."), this, SLOT(openProject()), QKeySequence::Open);
|
||||
menu->addAction(tr("&Edit Project..."), this, SLOT(editProject()));
|
||||
if(!isTrial())
|
||||
{
|
||||
menu->addAction(tr("&New Project..."), this, SLOT(newProject()), QKeySequence::New);
|
||||
menu->addAction(tr("&Open Project..."), this, SLOT(openProject()), QKeySequence::Open);
|
||||
menu->addAction(tr("&Edit Project..."), this, SLOT(editProject()));
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(tr("&Save Project"), this, SLOT(saveProject()), QKeySequence::Save);
|
||||
menu->addAction(tr("Save Project as..."), this, SLOT(saveAsProject()), QKeySequence::SaveAs);
|
||||
menu->addAction(tr("&Save Project"), this, SLOT(saveProject()), QKeySequence::Save);
|
||||
menu->addAction(tr("Save Project as..."), this, SLOT(saveAsProject()), QKeySequence::SaveAs);
|
||||
|
||||
menu->addSeparator();
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
QMenu *recentProjectMenu = new QMenu(tr("Recent Projects"));
|
||||
menu->addMenu(recentProjectMenu);
|
||||
@@ -480,16 +484,17 @@ void QtMainWindow::setupEditMenu()
|
||||
menu->addAction(tr("Redo"), this, SLOT(redo()), QKeySequence::Redo);
|
||||
|
||||
menu->addSeparator();
|
||||
|
||||
menu->addAction(tr("&Refresh"), this, SLOT(refresh()), QKeySequence::Refresh);
|
||||
|
||||
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
|
||||
if(!isTrial())
|
||||
{
|
||||
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::Key_F5));
|
||||
}
|
||||
else
|
||||
{
|
||||
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_R));
|
||||
menu->addAction(tr("&Refresh"), this, SLOT(refresh()), QKeySequence::Refresh);
|
||||
if (QSysInfo::windowsVersion() != QSysInfo::WV_None)
|
||||
{
|
||||
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::Key_F5));
|
||||
}
|
||||
else
|
||||
{
|
||||
menu->addAction(tr("&Force Refresh"), this, SLOT(forceRefresh()), QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_R));
|
||||
}
|
||||
}
|
||||
|
||||
menu->addAction(tr("&Find"), this, SLOT(find()), QKeySequence::Find);
|
||||
@@ -517,7 +522,11 @@ void QtMainWindow::setupHelpMenu()
|
||||
|
||||
menu->addAction(tr("&About"), this, SLOT(about()));
|
||||
menu->addAction(tr("Licences"), this, SLOT(showLicenses()));
|
||||
menu->addAction(tr("Preferences..."), this, SLOT(openSettings()));
|
||||
if(!isTrial())
|
||||
{
|
||||
menu->addAction(tr("Preferences..."), this, SLOT(openSettings()));
|
||||
//Todo: Enter License Window
|
||||
}
|
||||
}
|
||||
|
||||
void QtMainWindow::setupShortcuts()
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "qt/utility/QtDeviceScaledPixmap.h"
|
||||
#include "qt/utility/utilityQt.h"
|
||||
#include "isTrial.h"
|
||||
|
||||
QtRecentProjectButton::QtRecentProjectButton(const QString &text, QWidget *parent)
|
||||
: QPushButton(text, parent)
|
||||
@@ -41,17 +42,20 @@ void QtStartScreen::setup()
|
||||
coatiLogoLabel->resize(coati_logo.width(), coati_logo.height());
|
||||
coatiLogoLabel->move(30,10);
|
||||
|
||||
m_newProjectButton = new QPushButton("New Project", this);
|
||||
m_newProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
m_newProjectButton->setGeometry(30, 495, 140, 30);
|
||||
m_newProjectButton->setObjectName("projectButton");
|
||||
connect(m_newProjectButton, SIGNAL(clicked()), this, SLOT(handleNewProjectButton()));
|
||||
if(!isTrial())
|
||||
{
|
||||
m_newProjectButton = new QPushButton("New Project", this);
|
||||
m_newProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
m_newProjectButton->setGeometry(30, 495, 140, 30);
|
||||
m_newProjectButton->setObjectName("projectButton");
|
||||
connect(m_newProjectButton, SIGNAL(clicked()), this, SLOT(handleNewProjectButton()));
|
||||
|
||||
m_openProjectButton = new QPushButton("Open Project", this);
|
||||
m_openProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
m_openProjectButton->setGeometry(30, 540, 140, 30);
|
||||
m_openProjectButton->setObjectName("projectButton");
|
||||
connect(m_openProjectButton, SIGNAL(clicked()), this, SLOT(handleOpenProjectButton()));
|
||||
m_openProjectButton = new QPushButton("Open Project", this);
|
||||
m_openProjectButton->setAttribute(Qt::WA_LayoutUsesWidgetRect); // fixes layouting on Mac
|
||||
m_openProjectButton->setGeometry(30, 540, 140, 30);
|
||||
m_openProjectButton->setObjectName("projectButton");
|
||||
connect(m_openProjectButton, SIGNAL(clicked()), this, SLOT(handleOpenProjectButton()));
|
||||
}
|
||||
|
||||
QLabel* recentProjectsLabel = new QLabel("Recent Projects: ", this);
|
||||
recentProjectsLabel->setGeometry(300, 234, 300, 50);
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#ifndef COATI_VERSION_H
|
||||
#define COATI_VERSION_H
|
||||
|
||||
#define GIT_BRANCH "@GIT_BRANCH@"
|
||||
#define GIT_VERSION_NUMBER "@GIT_VERSION_NUMBER@"
|
||||
#define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"
|
||||
#define GIT_COMMIT_TIME "@GIT_COMMIT_TIME@"
|
||||
|
||||
#endif // COATI_VERSION_H
|
||||
Reference in New Issue
Block a user