Skip to content

Commit

Permalink
Adding back the license file
Browse files Browse the repository at this point in the history
  • Loading branch information
wol101 committed May 19, 2020
1 parent ddd0df4 commit 624f7fe
Show file tree
Hide file tree
Showing 33 changed files with 1,960 additions and 795 deletions.
58 changes: 58 additions & 0 deletions GaitSymQt/DialogOutputSelect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "Driver.h"
#include "DataTarget.h"
#include "Reporter.h"
#include "Controller.h"
#include "Warehouse.h"
#include "MainWindow.h"
#include "Preferences.h"
Expand All @@ -38,6 +39,7 @@ DialogOutputSelect::DialogOutputSelect(QWidget *parent) :
listWidgetJoint = 0;
listWidgetMuscle = 0;
listWidgetReporter = 0;
listWidgetController = 0;
listWidgetWarehouse = 0;

gridLayout = new QGridLayout(this);
Expand All @@ -56,6 +58,7 @@ DialogOutputSelect::DialogOutputSelect(QWidget *parent) :
std::map<std::string, Driver *> *driverList = simulation->GetDriverList();
std::map<std::string, DataTarget *> *dataTargetList = simulation->GetDataTargetList();
std::map<std::string, Reporter *> *reporterList = simulation->GetReporterList();
std::map<std::string, Controller *> *controllerList = simulation->GetControllerList();
std::map<std::string, Warehouse *> *warehouseList = simulation->GetWarehouseList();

m_columns = 0;
Expand Down Expand Up @@ -213,6 +216,28 @@ DialogOutputSelect::DialogOutputSelect(QWidget *parent) :
QObject::connect(listWidgetReporter, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(menuRequestReporter(QPoint)));
}

if (controllerList->size() > 0)
{
listWidgetController = new QListWidget(this);
listWidgetController->setFont(listWidgetFont);
listWidgetController->setContextMenuPolicy(Qt::CustomContextMenu);
count = 0;
listWidgetController->clear();
std::map<std::string, Controller *>::const_iterator controllerIterator;
for (controllerIterator = controllerList->begin(); controllerIterator != controllerList->end(); controllerIterator++)
{
listWidgetController->addItem(controllerIterator->first.c_str());
item = listWidgetController->item(count++);
if (controllerIterator->second->GetDump()) item->setCheckState(Qt::Checked);
else item->setCheckState(Qt::Unchecked);
}
gridLayout->addWidget(listWidgetController, 1, m_columns);
label = new QLabel("Controller List", this);
gridLayout->addWidget(label, 0, m_columns);
m_columns++;
QObject::connect(listWidgetController, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(menuRequestController(QPoint)));
}

if (warehouseList->size() > 0)
{
listWidgetWarehouse = new QListWidget(this);
Expand Down Expand Up @@ -507,6 +532,39 @@ void DialogOutputSelect::menuRequestReporter(QPoint p)
}
}

void DialogOutputSelect::menuRequestController(QPoint p)
{
QMenu menu(this);
menu.addAction(tr("All On"));
menu.addAction(tr("All Off"));

QPoint gp = listWidgetController->mapToGlobal(p);

QAction *action = menu.exec(gp);
QListWidgetItem *item;
Qt::CheckState state;
int i;
bool dump;
if (action)
{
if (action->text() == tr("All On"))
{
state = Qt::Checked;
dump = true;
}
else
{
state = Qt::Unchecked;
dump = false;
}
for (i = 0; i < listWidgetController->count(); i++)
{
item = listWidgetController->item(i);
item->setCheckState(state);
}
}
}

void DialogOutputSelect::menuRequestWarehouse(QPoint p)
{
QMenu menu(this);
Expand Down
2 changes: 2 additions & 0 deletions GaitSymQt/DialogOutputSelect.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class DialogOutputSelect : public QDialog {
QListWidget *listWidgetJoint;
QListWidget *listWidgetMuscle;
QListWidget *listWidgetReporter;
QListWidget *listWidgetController;
QListWidget *listWidgetWarehouse;


Expand All @@ -44,6 +45,7 @@ public slots:
void menuRequestDriver(QPoint);
void menuRequestDataTarget(QPoint);
void menuRequestReporter(QPoint);
void menuRequestController(QPoint);
void menuRequestWarehouse(QPoint);
void acceptButtonClicked();
void rejectButtonClicked();
Expand Down
21 changes: 6 additions & 15 deletions GaitSymQt/GaitSym2017.pro
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ macx {
NO_IRR_COMPILE_WITH_PNG_LOADER_ NO_IRR_COMPILE_WITH_PNG_WRITER_ \
NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ NO_IRR_COMPILE_WITH_ZLIB_ NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ NO_IRR_COMPILE_WITH_BZIP2_ NO_IRR_COMPILE_WITH_LZMA_ \
NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ \
HAVE_ALLOCA_H
HAVE_ALLOCA_H EXPERIMENTAL RAPIDXML_NO_EXCEPTIONS
# USE_OPENCL \
# USE_LIBTIFF USE_TIFF_LZW \
# USE_PCA USE_CBLAS \
RAPIDXML_NO_EXCEPTIONS
# USE_PCA USE_CBLAS
INCLUDEPATH += \
../ann_1.1.2/include \
../rapidxml-1.13 \
Expand Down Expand Up @@ -51,10 +50,6 @@ macx {

CONFIG(debug, debug|release) {
message(Debug build)
COMPUTERNAME = $$system(scutil --get ComputerName)
contains(COMPUTERNAME, H14-Mac-Pro) { DEFINES += EXPERIMENTAL }
contains(COMPUTERNAME, GraphiteG4) { DEFINES += EXPERIMENTAL }
contains(COMPUTERNAME, WIS-MacBookAir) { DEFINES += EXPERIMENTAL }
}
CONFIG(release, debug|release) {
message(Release build)
Expand All @@ -77,7 +72,7 @@ else:win32 {
IGNORE_DLL_API _IRR_STATIC_LIB_ _IRR_WCHAR_FILESYSTEM \
BYTE_ORDER=LITTLE_ENDIAN \
HAVE_MALLOC_H USE_UNIX_ERRORS NEED_BCOPY \
_USE_MATH_DEFINES
_USE_MATH_DEFINES EXPERIMENTAL
INCLUDEPATH += \
../ann_1.1.2/include \
../rapidxml-1.13 \
Expand Down Expand Up @@ -105,8 +100,6 @@ else:win32 {
CONFIG(debug, debug|release) {
message(Debug build)
COMPUTERNAME = $$system(hostname.exe)
contains(COMPUTERNAME, ASL-WORK) { DEFINES += EXPERIMENTAL }
contains(COMPUTERNAME, GRAPHITE-G4) { DEFINES += EXPERIMENTAL }
}
CONFIG(release, debug|release) {
message(Release build)
Expand All @@ -125,11 +118,11 @@ else:unix {
NO_IRR_COMPILE_WITH_PNG_LOADER_ NO_IRR_COMPILE_WITH_PNG_WRITER_ \
NO__IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ NO_IRR_COMPILE_WITH_ZLIB_ NO_IRR_COMPILE_WITH_ZIP_ENCRYPTION_ NO_IRR_COMPILE_WITH_BZIP2_ NO_IRR_COMPILE_WITH_LZMA_ \
NO__IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ NO__IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_ \
HAVE_ALLOCA_H
HAVE_ALLOCA_H exprtk_disable_enhanced_features \
RAPIDXML_NO_EXCEPTIONS EXPERIMENTAL
# USE_OPENCL \
# USE_LIBTIFF USE_TIFF_LZW \
# USE_PCA USE_CBLAS \
RAPIDXML_NO_EXCEPTIONS
INCLUDEPATH += \
../ann_1.1.2/include \
../rapidxml-1.13 \
Expand All @@ -147,7 +140,7 @@ else:unix {
HEADERS +=
SOURCES += \
../irrlicht-1.9/source/COSOperator.cpp ../irrlicht-1.9/source/Irrlicht.cpp
QMAKE_CXXFLAGS += -std=c++11
QMAKE_CXXFLAGS += -std=gnu++11
QMAKE_CXXFLAGS_RELEASE += -O3 -ffast-math
}

Expand Down Expand Up @@ -1278,7 +1271,6 @@ HEADERS += \
../src/Marker.h \
../src/MD5.h \
../src/MovingAverage.h \
../src/MPIStuff.h \
../src/Muscle.h \
../src/NamedObject.h \
../src/NPointStrap.h \
Expand All @@ -1294,7 +1286,6 @@ HEADERS += \
../src/SimpleStrap.h \
../src/Simulation.h \
../src/SliderJoint.h \
../src/SocketMessages.h \
../src/SphereGeom.h \
../src/StackedBoxCarDriver.h \
../src/StepDriver.h \
Expand Down
Loading

0 comments on commit 624f7fe

Please sign in to comment.