Commit 324dbb94 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Make XttEv windows non-modal.

parent 3cf2a08b
......@@ -51,10 +51,10 @@
#include <QMenuBar>
#include <QVBoxLayout>
class CallbackWidget : public QDialog {
class CallbackWidget : public QWidget {
public:
CallbackWidget(EvQtObject* parent, void (EvQtObject::*close)(), void (EvQtObject::*focus)())
: QDialog(), ev(parent), close_cb(close), focus_cb(focus) {}
: QWidget(), ev(parent), close_cb(close), focus_cb(focus) {}
protected:
void closeEvent(QCloseEvent* event);
......@@ -69,13 +69,13 @@ private:
void CallbackWidget::closeEvent(QCloseEvent* event)
{
((ev)->*(close_cb))();
QDialog::closeEvent(event);
QWidget::closeEvent(event);
}
void CallbackWidget::focusInEvent(QFocusEvent* event)
{
((ev)->*(focus_cb))();
QDialog::focusInEvent(event);
QWidget::focusInEvent(event);
}
EvQt::EvQt(void* ev_parent_ctx, char* eve_name, char* ala_name, char* blk_name,
......@@ -613,19 +613,16 @@ void EvQt::unmap_blk()
void EvQt::set_transient_eve(void* basewidget)
{
parent_wid_eve->setParent(((QWidget*)basewidget));
parent_wid_eve->setModal(true);
}
void EvQt::set_transient_ala(void* basewidget)
{
parent_wid_ala->setParent(((QWidget*)basewidget));
parent_wid_ala->setModal(true);
}
void EvQt::set_transient_blk(void* basewidget)
{
parent_wid_blk->setParent(((QWidget*)basewidget));
parent_wid_blk->setModal(true);
}
void EvQt::set_title_ala(char* title)
......
......@@ -41,7 +41,6 @@
#include "xtt_ev.h"
#include <QDialog>
#include <QWidget>
class EvQtObject;
......@@ -54,9 +53,9 @@ public:
int ev_eventname_seg, pwr_tStatus* status);
~EvQt();
QDialog* parent_wid_eve;
QDialog* parent_wid_ala;
QDialog* parent_wid_blk;
QWidget* parent_wid_eve;
QWidget* parent_wid_ala;
QWidget* parent_wid_blk;
QWidget* eve_widget;
QWidget* ala_widget;
QWidget* blk_widget;
......@@ -137,4 +136,4 @@ private:
EvQt* ev;
};
#endif
\ No newline at end of file
#endif
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