GSI Object Oriented Online Offline (Go4)
GO4-6.4.0
Loading...
Searching...
No Matches
qt4
Go4GUI
QGo4LineEdit.cpp
Go to the documentation of this file.
1
// $Id$
2
//-----------------------------------------------------------------------
3
// The GSI Online Offline Object Oriented (Go4) Project
4
// Experiment Data Processing at EE department, GSI
5
//-----------------------------------------------------------------------
6
// Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7
// Planckstr. 1, 64291 Darmstadt, Germany
8
// Contact: http://go4.gsi.de
9
//-----------------------------------------------------------------------
10
// This software can be used under the license agreements as stated
11
// in Go4License.txt file which is part of the distribution.
12
//-----------------------------------------------------------------------
13
14
#include "
QGo4LineEdit.h
"
15
16
#include <QDropEvent>
17
#include <QDragEnterEvent>
18
#include <QMimeData>
19
20
21
QGo4LineEdit::QGo4LineEdit
(QWidget *parent,
const
char
*name) :
22
QLineEdit(parent)
23
{
24
setObjectName(name ? name :
"Go4LineEdit"
);
25
setAcceptDrops(
true
);
26
}
27
28
QGo4LineEdit::~QGo4LineEdit
()
29
{
30
}
31
32
void
QGo4LineEdit::dragEnterEvent
(QDragEnterEvent* event)
33
{
34
if
(event->mimeData()->hasText())
35
event
->acceptProposedAction();
36
}
37
38
void
QGo4LineEdit::dropEvent
(QDropEvent* event)
39
{
40
setText(event->mimeData()->text());
41
emit
textDropped
();
42
}
QGo4LineEdit.h
QGo4LineEdit::dropEvent
void dropEvent(QDropEvent *) override
Definition
QGo4LineEdit.cpp:38
QGo4LineEdit::dragEnterEvent
void dragEnterEvent(QDragEnterEvent *) override
Definition
QGo4LineEdit.cpp:32
QGo4LineEdit::~QGo4LineEdit
virtual ~QGo4LineEdit()
Definition
QGo4LineEdit.cpp:28
QGo4LineEdit::QGo4LineEdit
QGo4LineEdit(QWidget *parent=nullptr, const char *name=nullptr)
Definition
QGo4LineEdit.cpp:21
QGo4LineEdit::textDropped
void textDropped()
Generated by
1.13.2