Commit d57cb5fb authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: Make XttEv popup windows non-modal.

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