0000787: Patch for Space navigator support on windows

This commit is contained in:
wmayer
2012-07-06 13:02:09 +02:00
parent 7e8269ac4c
commit fbb17d1b8b
10 changed files with 1124 additions and 20 deletions

View File

@@ -26,6 +26,7 @@
# include <Python.h>
# include <QApplication>
# include <QClipboard>
# include <QDialogButtonBox>
# include <QMutex>
# include <QProcess>
# include <QSysInfo>
@@ -182,7 +183,11 @@ AboutDialogFactory::~AboutDialogFactory()
QDialog *AboutDialogFactory::create(QWidget *parent) const
{
#ifdef _USE_3DCONNEXION_SDK
return new AboutDialog(true, parent);
#else
return new AboutDialog(false, parent);
#endif
}
const AboutDialogFactory *AboutDialogFactory::defaultFactory()
@@ -334,8 +339,54 @@ void AboutDialog::setupLabels()
}
}
namespace Gui {
namespace Dialog {
class GuiExport LicenseDialog : public QDialog
{
public:
LicenseDialog(QWidget *parent = 0) : QDialog(parent, Qt::FramelessWindowHint)
{
QString info;
#ifdef _USE_3DCONNEXION_SDK
info = QString::fromAscii(
"3D Mouse Support:\n"
"Development tools and related technology provided under license from 3Dconnexion.\n"
"(c) 1992 - 2012 3Dconnexion. All rights reserved");
#endif
statusLabel = new QLabel(info);
buttonBox = new QDialogButtonBox;
buttonBox->setStandardButtons(QDialogButtonBox::Ok);
connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
QHBoxLayout *topLayout = new QHBoxLayout;
topLayout->addWidget(statusLabel);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addLayout(topLayout);
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
setWindowTitle(tr("Copyright"));
}
~LicenseDialog()
{
}
private:
QLabel *statusLabel;
QDialogButtonBox *buttonBox;
};
} // namespace Dialog
} // namespace Gui
void AboutDialog::on_licenseButton_clicked()
{
#ifdef _USE_3DCONNEXION_SDK
LicenseDialog dlg(this);
dlg.exec();
#endif
}
void AboutDialog::on_copyButton_clicked()