SeExpr
ExprPopupDoc.cpp
Go to the documentation of this file.
1 /*
2 * Copyright Disney Enterprises, Inc. All rights reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License
6 * and the following modification to it: Section 6 Trademarks.
7 * deleted and replaced with:
8 *
9 * 6. Trademarks. This License does not grant permission to use the
10 * trade names, trademarks, service marks, or product names of the
11 * Licensor and its affiliates, except as required for reproducing
12 * the content of the NOTICE file.
13 *
14 * You may obtain a copy of the License at
15 * http://www.apache.org/licenses/LICENSE-2.0
16 */
17 #include "ExprPopupDoc.h"
18 #include <QtGui/QLabel>
19 #include <QtGui/QHBoxLayout>
20 
21 ExprPopupDoc::ExprPopupDoc(QWidget* parent,const QPoint& placecr,const QString& msg)
22 {
23  Q_UNUSED(parent);
24  label=new QLabel(msg);
25  QHBoxLayout* layout=new QHBoxLayout;
26  setLayout(layout);
27  layout->addWidget(label);
28 
29  setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::CustomizeWindowHint |Qt::X11BypassWindowManagerHint);
30  setAttribute(Qt::WA_ShowWithoutActivating);
31  setFocusPolicy(Qt::NoFocus);
32  move(placecr);
33  raise();
34  show();
35 }
36 
37 void ExprPopupDoc::
38 mousePressEvent ( QMouseEvent * event )
39 {
40  Q_UNUSED(event);
41  hide();
42 }
QLabel * label
Definition: ExprPopupDoc.h:25
ExprPopupDoc(QWidget *parent, const QPoint &cr, const QString &msg)
void mousePressEvent(QMouseEvent *event)