Skip to content

Commit

Permalink
fmk - GA4.html and updating main to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
fmckenna committed Sep 30, 2023
1 parent 8f16bee commit ca77e62
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 31 deletions.
37 changes: 37 additions & 0 deletions GA4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SQHRGYDZ0H"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'G-SQHRGYDZ0H');
</script>
</head>
<body>
<h1> This is the Wind Engineering with Uncertainty Quantification (WE-UQ) Application.</h1>

<p>
The WE-UQ Application (WE-UQ App) is an open-source software
(https://github.com/NHERI-SimCenter/WE-UQ) that provides researchers a tool to
assess the performance of a building to wind loading. The application
focuses on quantifying building performance through decision variables. Given
that the properties of the buildings and the wind events are not known
exactly, and that the simulation software and the user make simplifying
assumptions in the numerical modeling of the structure, the estimate response of
the structure already exhibits significant variability. Such response can be
estimated using our WE-UQ Application

(<a href="https://simcenter.designsafe-ci.org/research-tools/we-uq//">https://simcenter.designsafe-ci.org/research-tools/we-uq/</a>).

<p>
<h2>Acknowledgment</h2>
<p>
<img src=":/imagesCommon/nsf.gif">
This work is based on material supported by the National Science Foundation under grants CMMI 1612843 and CMMI 2131111
</body>
</html>

46 changes: 15 additions & 31 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ int main(int argc, char *argv[])

QApplication a(argc, argv);

//Setting Google Analytics Tracking Information
GoogleAnalytics::SetMeasurementId("G-SQHRGYDZ0H");
GoogleAnalytics::SetAPISecret("SCg4ry-WRee780Oen2WBUA");
GoogleAnalytics::CreateSessionId();
GoogleAnalytics::StartSession();


QByteArray envVar = qgetenv("QTDIR"); // check if the app is run in Qt Creator

if (envVar.isEmpty())
Expand Down Expand Up @@ -233,34 +226,25 @@ int main(int argc, char *argv[])
qDebug() << "could not open stylesheet";
}

//Setting Google Analytics Tracking Information
GoogleAnalytics::SetMeasurementId("G-SQHRGYDZ0H");
GoogleAnalytics::SetAPISecret("SCg4ry-WRee780Oen2WBUA");
GoogleAnalytics::CreateSessionId();
GoogleAnalytics::StartSession();

// Opening a QWebEngineView and using github to get app geographic usage
QWebEngineView view;
view.setUrl(QUrl("https://nheri-simcenter.github.io/WE-UQ/GA4.html"));
view.resize(1024, 750);
view.show();
view.hide();

/*
QFile fileCommon(":/styleCommon/common_experimental.qss");
QFile fileEEUQ(":/styles/stylesheet_eeuq.qss");
if(fileCommon.open(QFile::ReadOnly) && fileEEUQ.open(QFile::ReadOnly)) {
QString styleSheet = QLatin1String(fileCommon.readAll());
QString styleSheetEEUQ = QLatin1String(fileEEUQ.readAll());
// a.setStyleSheet(styleSheet+styleSheetEEUQ);
a.setStyleSheet(styleSheet);
fileCommon.close();
fileEEUQ.close();
}
*/
/*
theInputApp->setStyleSheet("QComboBox {background: #E0E0E0;} \
QGroupBox {font-weight: bold;}\
QLineEdit {background-color: #E0E0E0; border: 2px solid darkgray;} \
QTabWidget::pane {background-color: #ECECEC; border: 1px solid rgb(244, 244, 244);}");
*/

//a.setStyleSheet(openStyleFiles());

//
// exe application event-loop
//

int res = a.exec();


//
// on done with event loop, logout & stop the thread
//
Expand Down

0 comments on commit ca77e62

Please sign in to comment.