DummyDialog.cpp   DummyDialog.cpp 
skipping to change at line 33 skipping to change at line 33
#include <QDebug> #include <QDebug>
#include <QDialog> #include <QDialog>
#include <QGraphicsProxyWidget> #include <QGraphicsProxyWidget>
#include <QStyleOptionGraphicsItem> #include <QStyleOptionGraphicsItem>
#include <QLineEdit> #include <QLineEdit>
// this is adapted from DummyDialog.cpp // this is adapted from DummyDialog.cpp
class CustomProxy : public QGraphicsProxyWidget class CustomProxy : public QGraphicsProxyWidget
{ {
public: public:
CustomProxy(QGraphicsItem *parent = 0, Qt::WindowFlags wFlag s = 0) : QGraphicsProxyWidget(parent, wFlags) CustomProxy(QGraphicsItem *parent = Q_NULLPTR, Qt::WindowFla gs wFlags = 0) : QGraphicsProxyWidget(parent, wFlags)
{ {
setFocusPolicy(Qt::StrongFocus); setFocusPolicy(Qt::StrongFocus);
} }
//! Reimplement this method to add windows decorations. Curr ently there are invisible 2 px decorations //! Reimplement this method to add windows decorations. Curr ently there are invisible 2 px decorations
void paintWindowFrame(QPainter*, const QStyleOptionGraphicsI tem *, QWidget *) void paintWindowFrame(QPainter*, const QStyleOptionGraphicsI tem *, QWidget *)
{ {
} }
protected: protected:
skipping to change at line 70 skipping to change at line 70
if (!(isActiveWindow() || event->type()==QEvent::Win dowActivate || event->type()==QEvent::GraphicsSceneMousePress)) if (!(isActiveWindow() || event->type()==QEvent::Win dowActivate || event->type()==QEvent::GraphicsSceneMousePress))
{ {
event->setAccepted(false); event->setAccepted(false);
return false; return false;
} }
return QGraphicsProxyWidget::sceneEvent(event); return QGraphicsProxyWidget::sceneEvent(event);
} }
}; };
DummyDialog::DummyDialog(StelModule* eventHandler) DummyDialog::DummyDialog(StelModule* eventHandler)
: proxy(NULL) : proxy(Q_NULLPTR)
, dialog(NULL) , dialog(Q_NULLPTR)
, evtHandler(eventHandler) , evtHandler(eventHandler)
{ {
} }
DummyDialog::~DummyDialog() DummyDialog::~DummyDialog()
{ {
} }
void DummyDialog::close() void DummyDialog::close()
{ {
skipping to change at line 97 skipping to change at line 97
{ {
if (v) if (v)
{ {
if (dialog) if (dialog)
{ {
dialog->show(); dialog->show();
StelMainView::getInstance().scene()->setActiveWindow (proxy); StelMainView::getInstance().scene()->setActiveWindow (proxy);
proxy->setFocus(); proxy->setFocus();
return; return;
} }
dialog = new QDialog(NULL); dialog = new QDialog(Q_NULLPTR);
connect(dialog, SIGNAL(rejected()), this, SLOT(close())); connect(dialog, SIGNAL(rejected()), this, SLOT(close()));
createDialogContent(); createDialogContent();
proxy = new CustomProxy(NULL, Qt::Tool); proxy = new CustomProxy(Q_NULLPTR, Qt::Tool);
proxy->setWidget(dialog); proxy->setWidget(dialog);
StelMainView::getInstance().scene()->addItem(proxy); StelMainView::getInstance().scene()->addItem(proxy);
proxy->setWindowFrameMargins(2,0,2,2); proxy->setWindowFrameMargins(2,0,2,2);
proxy->setCacheMode(QGraphicsItem::DeviceCoordinateCache); proxy->setCacheMode(QGraphicsItem::DeviceCoordinateCache);
proxy->setZValue(100); proxy->setZValue(100);
StelMainView::getInstance().scene()->setActiveWindow(proxy); StelMainView::getInstance().scene()->setActiveWindow(proxy);
proxy->setFocus(); proxy->setFocus();
} }
else else
{ {
 End of changes. 4 change blocks. 
5 lines changed or deleted 5 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/