-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
181 additions
and
25 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#include "gui/help_widget.hpp" | ||
|
||
HelpWidget::HelpWidget(QWidget* parent) : QWidget(parent) { | ||
this->setWindowTitle(tr("Help")); | ||
layout_ = new QVBoxLayout(this); | ||
xtensor_button_ = new QPushButton(tr("About xtensor"), this); | ||
xtl_button_ = new QPushButton(tr("About xtl"), this); | ||
lua_button_ = new QPushButton(tr("About Lua"), this); | ||
casim_button_ = new QPushButton(tr("About Casim"), this); | ||
qt_button_ = new QPushButton(tr("About Qt"), this); | ||
freeglut_button_ = new QPushButton(tr("About FreeGLUT"), this); | ||
|
||
this->setMinimumSize(200, 150); | ||
|
||
layout_->addWidget(casim_button_); | ||
layout_->addWidget(freeglut_button_); | ||
layout_->addWidget(lua_button_); | ||
layout_->addWidget(qt_button_); | ||
layout_->addWidget(xtl_button_); | ||
layout_->addWidget(xtensor_button_); | ||
layout_->addStretch(); | ||
|
||
connect(casim_button_, &QPushButton::clicked, this, | ||
&HelpWidget::casim_handler); | ||
connect(xtensor_button_, &QPushButton::clicked, this, | ||
&HelpWidget::xtensor_handler); | ||
connect(xtl_button_, &QPushButton::clicked, this, &HelpWidget::xtl_handler); | ||
connect(lua_button_, &QPushButton::clicked, this, &HelpWidget::lua_handler); | ||
connect(qt_button_, &QPushButton::clicked, this, &HelpWidget::qt_handler); | ||
connect(freeglut_button_, &QPushButton::clicked, this, | ||
&HelpWidget::freeglut_handler); | ||
} | ||
|
||
void HelpWidget::xtensor_handler() { | ||
QFile license(":/third_party/xtensor/LICENSE"); | ||
license.open(QIODevice::ReadOnly); | ||
QMessageBox::about(this, "About xtensor", license.readAll()); | ||
} | ||
|
||
void HelpWidget::xtl_handler() { | ||
QFile license(":/third_party/xtl/LICENSE"); | ||
license.open(QIODevice::ReadOnly); | ||
QMessageBox::about(this, "About xtl", license.readAll()); | ||
} | ||
|
||
void HelpWidget::casim_handler() { | ||
QFile license(":/LICENSE"); | ||
license.open(QIODevice::ReadOnly); | ||
QMessageBox::about(this, "About Casim", license.readAll()); | ||
} | ||
|
||
void HelpWidget::lua_handler() { | ||
QFile license(":/third_party/lua/LICENSE"); | ||
license.open(QIODevice::ReadOnly); | ||
QMessageBox::about(this, "About Lua", license.readAll()); | ||
} | ||
|
||
void HelpWidget::qt_handler() { | ||
QMessageBox::aboutQt(this, tr("About Qt")); | ||
} | ||
|
||
void HelpWidget::freeglut_handler() { | ||
QFile license(":/third_party/freeglut/COPYING"); | ||
license.open(QIODevice::ReadOnly); | ||
QMessageBox::about(this, "About FreeGLUT", license.readAll()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef CASIM_GUI_HELP_WINDOW_HPP_ | ||
#define CASIM_GUI_HELP_WINDOW_HPP_ | ||
|
||
#include "gui/common.hpp" | ||
|
||
class HelpWidget : public QWidget { | ||
Q_OBJECT | ||
public: | ||
HelpWidget(QWidget* parent = nullptr); | ||
|
||
public slots: | ||
|
||
void xtensor_handler(); | ||
void xtl_handler(); | ||
void casim_handler(); | ||
void lua_handler(); | ||
void qt_handler(); | ||
void freeglut_handler(); | ||
|
||
private: | ||
QPointer<QVBoxLayout> layout_; | ||
QPointer<QPushButton> xtensor_button_; | ||
QPointer<QPushButton> xtl_button_; | ||
QPointer<QPushButton> lua_button_; | ||
QPointer<QPushButton> casim_button_; | ||
QPointer<QPushButton> qt_button_; | ||
QPointer<QPushButton> freeglut_button_; | ||
}; | ||
|
||
#endif // CASIM_GUI_HELP_WINDOW_HPP_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
|
||
Freeglut Copyright | ||
------------------ | ||
|
||
Freeglut code without an explicit copyright is covered by the following | ||
copyright: | ||
|
||
Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies or substantial portions of the Software. | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
|
||
Except as contained in this notice, the name of Pawel W. Olszta shall not be | ||
used in advertising or otherwise to promote the sale, use or other dealings | ||
in this Software without prior written authorization from Pawel W. Olszta. |