Add collection tab to About FreeCAD
This commit is contained in:
@@ -268,6 +268,7 @@ AboutDialog::AboutDialog(bool showLic, QWidget* parent)
|
||||
ui->tabWidget->setCurrentIndex(0); // always start on the About tab
|
||||
setupLabels();
|
||||
showLicenseInformation();
|
||||
showCollectionInformation();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -695,6 +696,23 @@ void AboutDialog::showLicenseInformation()
|
||||
connect(textField, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkActivated(QUrl)));
|
||||
}
|
||||
|
||||
void AboutDialog::showCollectionInformation()
|
||||
{
|
||||
QString doc = QString::fromUtf8(App::Application::getHelpDir().c_str());
|
||||
QString path = doc + QLatin1String("Collection.html");
|
||||
if (!QFile::exists(path))
|
||||
return;
|
||||
|
||||
QWidget *tab_collection = new QWidget();
|
||||
tab_collection->setObjectName(QString::fromLatin1("tab_collection"));
|
||||
ui->tabWidget->addTab(tab_collection, tr("Collection"));
|
||||
QVBoxLayout* hlayout = new QVBoxLayout(tab_collection);
|
||||
QTextBrowser* textField = new QTextBrowser(tab_collection);
|
||||
textField->setOpenExternalLinks(true);
|
||||
hlayout->addWidget(textField);
|
||||
textField->setSource(path);
|
||||
}
|
||||
|
||||
void AboutDialog::linkActivated(const QUrl& link)
|
||||
{
|
||||
//#if defined(Q_OS_WIN) && QT_VERSION < 0x050602
|
||||
|
||||
@@ -102,6 +102,7 @@ public:
|
||||
protected:
|
||||
void setupLabels();
|
||||
void showLicenseInformation();
|
||||
void showCollectionInformation();
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void on_copyButton_clicked();
|
||||
|
||||
Reference in New Issue
Block a user