-
Notifications
You must be signed in to change notification settings - Fork 2
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
31 changed files
with
3,661 additions
and
0 deletions.
There are no files selected for viewing
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,39 @@ | ||
#Enabled the qt modules. | ||
QT += core gui widgets | ||
|
||
#Enabled c++ 11 syntax. | ||
CONFIG += c++11 | ||
|
||
SOURCES += \ | ||
main.cpp \ | ||
mainwindow.cpp \ | ||
ground.cpp \ | ||
robot.cpp \ | ||
panel.cpp \ | ||
menubar.cpp \ | ||
robotmanagement.cpp \ | ||
paneldock.cpp \ | ||
robotaddwidget.cpp \ | ||
groundpreviewwidget.cpp \ | ||
generateground.cpp \ | ||
groundeditor.cpp \ | ||
generategroundbase.cpp \ | ||
barrackseditor.cpp \ | ||
barrackseditorbase.cpp | ||
|
||
HEADERS += \ | ||
mainwindow.h \ | ||
ground.h \ | ||
robot.h \ | ||
panel.h \ | ||
groundbase.h \ | ||
menubar.h \ | ||
robotmanagement.h \ | ||
paneldock.h \ | ||
robotaddwidget.h \ | ||
groundpreviewwidget.h \ | ||
generateground.h \ | ||
groundeditor.h \ | ||
generategroundbase.h \ | ||
barrackseditor.h \ | ||
barrackseditorbase.h |
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,24 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#include "barrackseditor.h" | ||
|
||
BarracksEditor::BarracksEditor(QWidget *parent) : | ||
BarracksEditorBase(parent) | ||
{ | ||
} |
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,36 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef BARRACKSEDITOR_H | ||
#define BARRACKSEDITOR_H | ||
|
||
#include "barrackseditorbase.h" | ||
|
||
class BarracksEditor : public BarracksEditorBase | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit BarracksEditor(QWidget *parent = 0); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
}; | ||
|
||
#endif // BARRACKSEDITOR_H |
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,24 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#include "barrackseditorbase.h" | ||
|
||
BarracksEditorBase::BarracksEditorBase(QWidget *parent) : | ||
QWidget(parent) | ||
{ | ||
} |
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,36 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef BARRACKSEDITORBASE_H | ||
#define BARRACKSEDITORBASE_H | ||
|
||
#include <QWidget> | ||
|
||
class BarracksEditorBase : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit BarracksEditorBase(QWidget *parent = 0); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
}; | ||
|
||
#endif // BARRACKSEDITORBASE_H |
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,76 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
#include <QBoxLayout> | ||
#include <QPushButton> | ||
#include <QTabWidget> | ||
|
||
#include "groundeditor.h" | ||
#include "barrackseditor.h" | ||
|
||
#include "generateground.h" | ||
|
||
GenerateGround::GenerateGround(QWidget *parent) : | ||
GenerateGroundBase(parent), | ||
m_tabManager(new QTabWidget(this)), | ||
m_groundEditor(new GroundEditor(this)), | ||
m_barracksEditor(new BarracksEditor(this)), | ||
m_okay(new QPushButton(this)), | ||
m_cancel(new QPushButton(this)) | ||
{ | ||
//Set properties. | ||
#ifdef Q_OS_MACX | ||
setWindowFlags(Qt::Sheet); | ||
#endif | ||
|
||
//Configure buttons. | ||
m_cancel->setShortcut(QKeySequence(Qt::Key_Escape)); | ||
connect(m_cancel, | ||
static_cast<void (QPushButton::*)(bool)>(&QPushButton::clicked), | ||
[=] | ||
{ | ||
close(); | ||
}); | ||
|
||
//Initial the layout. | ||
QBoxLayout *mainLayout=new QBoxLayout(QBoxLayout::LeftToRight, | ||
this); | ||
setLayout(mainLayout); | ||
|
||
mainLayout->addWidget(m_tabManager, 1); | ||
|
||
m_tabManager->addTab(m_groundEditor, ""); | ||
m_tabManager->addTab(m_barracksEditor, ""); | ||
|
||
QBoxLayout *buttonLayout=new QBoxLayout(QBoxLayout::TopToBottom, | ||
mainLayout->widget()); | ||
mainLayout->addLayout(buttonLayout); | ||
buttonLayout->addWidget(m_okay); | ||
buttonLayout->addWidget(m_cancel); | ||
buttonLayout->addStretch(); | ||
|
||
retranslate(); | ||
} | ||
|
||
void GenerateGround::retranslate() | ||
{ | ||
m_okay->setText(tr("Ok")); | ||
m_cancel->setText(tr("Cancel")); | ||
|
||
m_tabManager->setTabText(0, tr("Ground")); | ||
m_tabManager->setTabText(1, tr("Barracks")); | ||
} |
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,56 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef GENERATEGROUND_H | ||
#define GENERATEGROUND_H | ||
|
||
#include "generategroundbase.h" | ||
|
||
class QPushButton; | ||
class QTabWidget; | ||
class GroundEditor; | ||
class BarracksEditor; | ||
/*! | ||
* \brief The GenerateGround class is a default realization of | ||
* GenerateGroundBase. | ||
*/ | ||
class GenerateGround : public GenerateGroundBase | ||
{ | ||
Q_OBJECT | ||
public: | ||
/*! | ||
* \brief Construct ground generator widget. | ||
* \param parent The parent widget. | ||
*/ | ||
explicit GenerateGround(QWidget *parent = 0); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
private slots: | ||
void retranslate(); | ||
|
||
private: | ||
QTabWidget *m_tabManager; | ||
GroundEditor *m_groundEditor; | ||
BarracksEditor *m_barracksEditor; | ||
QPushButton *m_okay, *m_cancel; | ||
}; | ||
|
||
#endif // GENERATEGROUND_H |
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,24 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#include "generategroundbase.h" | ||
|
||
GenerateGroundBase::GenerateGroundBase(QWidget *parent) : | ||
QDialog(parent) | ||
{ | ||
} |
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,44 @@ | ||
/* | ||
* Copyright (C) Kreogist Dev Team | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
*/ | ||
|
||
#ifndef GENERATEGROUNDBASE_H | ||
#define GENERATEGROUNDBASE_H | ||
|
||
#include <QDialog> | ||
|
||
/*! | ||
* \brief The GenerateGround class is a widget which can help user to generate | ||
* the border and barracks. | ||
*/ | ||
class GenerateGroundBase : public QDialog | ||
{ | ||
Q_OBJECT | ||
public: | ||
/*! | ||
* \brief Construct a GenerateGroundBase dialog. | ||
* \param parent Set the parent widget. | ||
*/ | ||
explicit GenerateGroundBase(QWidget *parent = 0); | ||
|
||
signals: | ||
|
||
public slots: | ||
|
||
}; | ||
|
||
#endif // GENERATEGROUNDBASE_H |
Oops, something went wrong.