Commit 05317afa authored by Claes Sjofors's avatar Claes Sjofors

Merge branch 'master'

parents e9761ca8 07568922
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,47 +6,7 @@
</head>
<body>
<div class="toolbar" role="toolbar">
<div id="toolitem1" tabindex="0" class="toolbar-item" role="button">
<img src="toolbar_ack.png"/>....
</div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_navigator.png"/>
</div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_plc.png"/>....
</div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_graph.png"/>
</div>
<div id="toolitem5" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_objectgraph.png"/>
</div>
<div id="toolitem6" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_navigator.png"/>
</div>
<div id="toolitem7" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_plc.png"/>
</div>
<div id="toolitem8" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_history.png"/>
</div>
<div id="toolitem9" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_object.png"/>
</div>
<div id="toolitem10" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_crossref.png"/>
</div>
<div id="toolitem11" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_help.png"/>
</div>
<div id="toolitem12" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_classhelp.png"/>
</div>
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=ev.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
<canvas id="canvas" width="1200" height="800"></canvas>
<script src="ev.bundle.js"></script>
</body>
</html>
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Trace</title>
......@@ -6,23 +6,7 @@
</head>
<body>
<div class="toolbar" role="toolbar">
<div id="toolitem1" tabindex="0" class="toolbar-item" role="button">
<img src="toolbar_graph.png"/>
</div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_navigator.png"/>
</div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_history.png"/>
</div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_object.png"/>
</div>
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=flow.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
<canvas id="canvas" width="1200" height="800"></canvas>
<script src="flow.bundle.js"></script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
......@@ -6,9 +6,7 @@
</head>
<body>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=ge.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
<canvas id="canvas" width="1200" height="800"></canvas>
<script src="ge.bundle.js"></script>
</body>
</html>
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Operator window</title>
<link rel="stylesheet" type="text/css" href="toolbar.css">
<style>
.menu {
float: left;
width: 20%;
height: 100%;
}
.main {
float: left;
width: 79%;
height: 100%;
}
</style>
</head>
<body>
<iframe class="menu" src="opwind_menu.html"></iframe>
<iframe class="main" src="xtt_help_index.html"></iframe>
<script src="opwind.bundle.js"></script>
</body>
</html>
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<title>Operator Menu</title>
<link rel="stylesheet" type="text/css" href="toolbar.css">
</head>
<body>
<div id="opwindmenu" width="120" height="800">
<h1 id="opwind_title"></h1>
<p id="opwind_text"></p>
<hr>
<button id="login_button" type="button" class="leftmenu-button">Login</button>
<div id="login_frame" class="login-frame">
Username
<br>
<input id="login_user" name="username" class="login-field" />
<br>
Password
<br>
<input id="login_passw" name="password" type="password" class="login-field" />
<br>
<button id="apply_button" type="button" style="flex-grow:1">Apply</button>
<button id="cancel_button" type="button" style="float:right">Cancel</button>
<br>
<button id="logout_button" type="button" class="leftmenu-button">Logout</button>
</div>
</div>
<script src=opwind.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
</body>
</html>
.annotate {
color: #366ED4;
font-style: italic;
color: #366ED4;
font-style: italic;
}
.toolbar {
border-left: 1px solid #aaa;
margin-top: 10px;
margin: 0 0 0 0;
font-size: 0;
border-left: 1px solid #aaa;
margin-top: 10px;
margin: 0 0 0 0;
font-size: 0;
}
.toolbar-item {
display: inline-block;
padding: 0.0em 0.0em;
padding: 0.0em 0.0em;
background: #fff;
margin: 0 0 0 0;
border: 0px solid #aaa;
border-left: none;
color: blue;
font-size: 16px;
line-height: 1.5em;
vertical-align: top;
border-left: none;
color: blue;
font-size: 16px;
line-height: 1.5em;
vertical-align: top;
}
.toolbar-item.selected {
background-color: #ccc;
color: black;
font-weight: bold;
background-color: #ccc;
color: black;
font-weight: bold;
}
.menu-wrapper {
display: inline-block;
font-size: 16px;
display: inline-block;
font-size: 16px;
}
.menu-button {
padding-right: 2.5em;
position: relative;
padding-right: 2.5em;
position: relative;
}
.menu-button::after {
content: " ";
border-left: 0.4em solid transparent;
border-right: 0.4em solid transparent;
border-top: 0.4em solid black;
position: absolute;
right: 1em;
top: 1.1em;
content: " ";
border-left: 0.4em solid transparent;
border-right: 0.4em solid transparent;
border-top: 0.4em solid black;
position: absolute;
right: 1em;
top: 1.1em;
}
.leftmenu-button {
width:100%;
.nav {
margin: 0;
padding: 0;
overflow: hidden;
background-color: cornflowerblue;
width: 1200px;
}
.login-frame {
background-color: #ddeeff;
padding: 10px;
display: block;
overflow: hidden;
li a, .dropbtn {
display: inline-block;
color: white;
padding: 14px 16px;
}
li a:hover, .dropdown:hover .dropbtn {
background-color: coral;
}
.login-field {
width:100%;
li.dropdown {
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
display: block;
text-align: left;
}
.dropdown-content a:hover {background-color: #f1f1f1;}
.dropdown:hover .dropdown-content {
display: block;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -6,35 +6,7 @@
</head>
<body>
<div class="toolbar" role="toolbar">
<div id="toolitem1" tabindex="0" class="toolbar-item" role="button">
<img src="toolbar_graph.png"/>
</div>
<div id="toolitem2" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_objectgraph.png"/>
</div>
<div id="toolitem3" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_plc.png"/>
</div>
<div id="toolitem4" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_history.png"/>
</div>
<div id="toolitem5" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_object.png"/>
</div>
<div id="toolitem6" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_crossref.png"/>
</div>
<div id="toolitem7" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_help.png"/>
</div>
<div id="toolitem8" tabindex="-1" class="toolbar-item" role="button">
<img src="toolbar_classhelp.png"/>
</div>
</div>
<canvas id="flowcanvas" width="1200" height="800"></canvas>
<script src=xtt.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
<canvas id="canvas" width="1200" height="800"></canvas>
<script src="xtt.bundle.js"></script>
</body>
</html>
This diff is collapsed.
......@@ -517,6 +517,8 @@ bool wb_print_wbl::printValue(wb_volume& v, pwr_eType type, unsigned int flags,
strcpy(sval, "ATTIME_MIN");
else if (memcmp(val, &pwr_cAtMax, sizeof(pwr_tTime)) == 0)
strcpy(sval, "ATTIME_MAX");
else if (memcmp(val, &pwr_cNotATime, sizeof(pwr_tTime)) == 0)
strcpy(sval, "NotATime");
else {
sts = time_AtoAscii(
(pwr_tTime*)val, time_eFormat_DateAndTime, timbuf, sizeof(timbuf));
......@@ -535,6 +537,8 @@ bool wb_print_wbl::printValue(wb_volume& v, pwr_eType type, unsigned int flags,
strcpy(sval, "DTTIME_MIN");
else if (memcmp(val, &pwr_cDtMax, sizeof(pwr_tDeltaTime)) == 0)
strcpy(sval, "DTTIME_MAX");
else if (memcmp(val, &pwr_cNotADeltaTime, sizeof(pwr_tDeltaTime)) == 0)
strcpy(sval, "NotADeltaTime");
else {
sts = time_DtoAscii((pwr_tDeltaTime*)val, 1, timbuf, sizeof(timbuf));
if (ODD(sts)) {
......
......@@ -2206,6 +2206,8 @@ int wb_wblnode::attrStringToValue(int type_id, char* value_str,
memcpy(buffer_ptr, &pwr_cAtMin, sizeof(pwr_tTime));
else if (streq(value_str, "ATTIME_MAX"))
memcpy(buffer_ptr, &pwr_cAtMax, sizeof(pwr_tTime));
else if (streq(value_str, "NotATime"))
memcpy(buffer_ptr, &pwr_cNotATime, sizeof(pwr_tTime));
else {
sts = time_AsciiToA(value_str, &time);
if (EVEN(sts))
......@@ -2221,6 +2223,8 @@ int wb_wblnode::attrStringToValue(int type_id, char* value_str,
memcpy(buffer_ptr, &pwr_cDtMin, sizeof(pwr_tDeltaTime));
else if (streq(value_str, "DTTIME_MAX"))
memcpy(buffer_ptr, &pwr_cDtMax, sizeof(pwr_tDeltaTime));
else if (streq(value_str, "NotADeltaTime"))
memcpy(buffer_ptr, &pwr_cNotADeltaTime, sizeof(pwr_tDeltaTime));
else {
sts = time_AsciiToD(value_str, &deltatime);
if (EVEN(sts))
......
......@@ -596,7 +596,7 @@ XttQt::XttQt(int argc, char* argv[], int* return_sts)
// Qt
toplevel = new XttQtWidget(this);
toplevel->setMinimumSize(window_width, window_height);
toplevel->resize(window_width, window_height);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
......
......@@ -68,6 +68,7 @@
#include <QPrinter>
#include <QPushButton>
#include <QScrollArea>
#include <QTime>
#include <QTimer>
#include <QVBoxLayout>
......@@ -265,6 +266,8 @@ CoWowListWidgetQt::CoWowListWidgetQt(QWidget* parent, const char* title,
list->resizeColumnToContents(0);
show();
pop(this);
list->setFocus();
}
......@@ -388,6 +391,10 @@ CoWowWarrantQt::CoWowWarrantQt(CoWowQtObject* parent)
void CoWowQtObject::DisplayWarranty()
{
// Display only once
if (wow->HideWarranty()) {
return;
}
new CoWowWarrantQt(this);
}
......@@ -607,6 +614,7 @@ void CoWowEntryQt::keyPressEvent(QKeyEvent* event)
}
case Qt::Key_Escape:
if (m_hide_on_esc) {
emit editingFinished();
clearFocus();
hide();
}
......@@ -622,6 +630,10 @@ void CoWowEntryQt::keyPressEvent(QKeyEvent* event)
}
}
void CoWowEntryQt::focusOutEvent(QFocusEvent *event) {
event->ignore();
}
//
// Modal Dialog with text and tree buttons
//
......@@ -887,13 +899,12 @@ pwr_tStatus CoWowQt::DeleteMenuItem(const char* name, void* menu)
return 1;
}
void CoWowQtObject::wait_cb()
{
}
void CoWowQt::Wait(float time)
{
initOneShotTimer(m_wait_timerid, SLOT(wait_cb()), int(time * 1000));
QTime start = QTime::currentTime().addMSecs(int(time * 1000));
while (QTime::currentTime() < start) {
QCoreApplication::processEvents(QEventLoop::AllEvents, 100);
}
}
void CoWowQt::update_title(QWidget* w, int editmode)
......@@ -912,7 +923,7 @@ void CoWowQt::update_title(QWidget* w, int editmode)
CoWowQt::CoWowQt(QWidget* parent)
{
object = new CoWowQtObject(parent);
object = new CoWowQtObject(parent, this);
m_wait_timerid = new QTimer(object);
}
......
......@@ -65,6 +65,7 @@ public:
protected:
void keyPressEvent(QKeyEvent* event);
void focusOutEvent(QFocusEvent *);
};
class CoWowModalDialogQt : public QDialog {
......@@ -233,14 +234,13 @@ class CoWowQtObject : public QObject {
Q_OBJECT
public:
CoWowQtObject(QWidget* parent) : QObject(), parent_wid(parent) {}
CoWowQtObject(QWidget* parent, CoWowQt* w) : QObject(), parent_wid(parent), wow(w) {}
QWidget* parent_wid;
CoWowQt* wow;
public slots:
void DisplayWarranty();
void DisplayLicense();
void wait_cb();
};
#endif
......@@ -234,69 +234,6 @@ void XttGeQtWidget::closeEvent(QCloseEvent* event)
event->ignore();
}
void XttGeQtWidget::resizeEvent(QResizeEvent* event)
{
int oldWidth = event->oldSize().width();
int oldHeight = event->oldSize().height();
int width = event->size().width();
int height = event->size().height();
event->accept();
if (width != oldWidth && height != oldHeight) {
if (ge->min_aspect * height > width) {
int delta = height - width / ge->min_aspect;
if (height - delta >= 0) {
height -= delta;
} else {
delta = height * ge->min_aspect - width;
if (width + delta <= INT_MAX) {
width += delta;
}
}
}
if (ge->max_aspect * height < width) {
int delta = width - height * ge->max_aspect;
if (width - delta >= 0) {
width -= delta;
} else {
delta = width / ge->max_aspect - height;
if (height + delta <= INT_MAX) {
height += delta;
}
}
}
} else if (width != oldWidth) {
if (ge->min_aspect * height > width) {
int delta = height - width / ge->min_aspect;
if (height - delta >= 0) {
height -= delta;
}
}
if (ge->max_aspect * height < width) {
int delta = width / ge->max_aspect - height;
if (height + delta <= INT_MAX) {
height += delta;
}
}
} else if (height != oldHeight) {
if (ge->min_aspect * height > width) {
int delta = height * ge->min_aspect - width;
if (width + delta <= INT_MAX) {
width += delta;
}
}
if (ge->max_aspect * height < width) {
int delta = width - height * ge->max_aspect;
if (width - delta >= 0) {
width -= delta;
}
}
}
resize(width, height);
}
XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
const char* xg_filename, int xg_scrollbar, int xg_menu, int xg_navigator,
int xg_width, int xg_height, int x, int y, double scan_time,
......@@ -367,7 +304,7 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
graph->sound_cb = &ge_sound_cb;
graph->eventlog_cb = &ge_eventlog_cb;
grow_widget->setMinimumSize(window_width, window_height);
grow_widget->resize(window_width, window_height);
QObject::connect(((GraphQt*)graph)->grow_widget,
SIGNAL(resize_signal(QResizeEvent*)), toplevel,
......@@ -454,10 +391,6 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
window_height = zoom * (y1 - y0);
}
float rd = (window_width < 300 || window_height < 300) ? 0.2 : 0.05;
min_aspect = double(window_width) / window_height * (1.0 - rd);
max_aspect = double(window_width) / window_height * (1.0 + rd);
toplevel->resize(window_width, window_height);
}
......
......@@ -102,7 +102,6 @@ public:
protected:
void focusInEvent(QFocusEvent* event);
void closeEvent(QCloseEvent* event);
void resizeEvent(QResizeEvent* event);
public slots:
void activate_confirm_ok();
......
......@@ -55,6 +55,7 @@
#include "xtt_trace_qt.h"
#include <QAction>
#include <QCloseEvent>
#include <QMenu>
#include <QMenuBar>
#include <QSplitter>
......@@ -173,14 +174,12 @@ void RtTraceQtWidget::activate_helpplclist()
RtTraceQt::~RtTraceQt()
{
trace_tNode *node, *fnode;
trace_stop();
/* Delete all trace children windows */
for (node = trace_list; node;) {
for (trace_tNode *node = trace_list; node;) {
delete node->tractx;
fnode = node->Next;
trace_tNode *fnode = node->Next;
free((char*)node);
node = fnode;
}
......@@ -188,6 +187,10 @@ RtTraceQt::~RtTraceQt()
nav_shell->close();
}
if (toplevel) {
delete toplevel;
}
if (trace_timerid) {
delete trace_timerid;
}
......@@ -211,7 +214,7 @@ RtTrace* RtTraceQt::subwindow_new(void* ctx, pwr_tObjid oid, pwr_tStatus* sts)
void RtTraceQtWidget::closeEvent(QCloseEvent* event)
{
rt->activate_close();
QWidget::closeEvent(event);
event->ignore();
}
RtTraceQt::RtTraceQt(void* tr_parent_ctx, pwr_tObjid tr_objid,
......@@ -468,4 +471,4 @@ RtTraceQt::RtTraceQt(void* tr_parent_ctx, pwr_tObjid tr_objid,
}
wow->DisplayError("Version mismatch", msg);
}
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment