[GB.QT5.EXT]
* NEW: Add the LCDNumber class from gb.qt4.ext also remove the Qt3 transitional header/code
This commit is contained in:
parent
7e07d833c5
commit
faa630b567
5 changed files with 15 additions and 3 deletions
|
@ -27,8 +27,6 @@
|
|||
|
||||
#include <qapplication.h>
|
||||
#include <qlcdnumber.h>
|
||||
//Added by qt3to4:
|
||||
#include <Q3Frame>
|
||||
|
||||
#include "gambas.h"
|
||||
|
||||
|
@ -44,7 +42,7 @@ BEGIN_METHOD(CLCDNUMBER_new, GB_OBJECT parent)
|
|||
QT.InitWidget(wid, _object, false);
|
||||
//QT.SetBackgroundRole(_object, QColorGroup::Base);
|
||||
|
||||
wid->setFrameStyle(Q3Frame::NoFrame);
|
||||
wid->setFrameStyle(QFrame::NoFrame);
|
||||
|
||||
wid->show();
|
||||
|
||||
|
@ -62,7 +60,11 @@ END_PROPERTY
|
|||
BEGIN_PROPERTY(CLCDNUMBER_digits)
|
||||
|
||||
if (READ_PROPERTY)
|
||||
#if (HAVE_QTEXT_COMPONENT)
|
||||
GB.ReturnInteger(WIDGET->numDigits());
|
||||
#else
|
||||
GB.ReturnInteger(WIDGET->digitCount());
|
||||
#endif
|
||||
else
|
||||
{
|
||||
int n = VPROP(GB_INTEGER);
|
||||
|
@ -72,7 +74,11 @@ BEGIN_PROPERTY(CLCDNUMBER_digits)
|
|||
else if (n > 32)
|
||||
n = 32;
|
||||
|
||||
#if (HAVE_QTEXT_COMPONENT)
|
||||
WIDGET->setNumDigits(n);
|
||||
#else
|
||||
WIDGET->setDigitCount(n);
|
||||
#endif
|
||||
/* Increasing the number of digits does not redisplay value */
|
||||
WIDGET->repaint();
|
||||
WIDGET->display(WIDGET->value());
|
||||
|
|
1
gb.qt5/src/ext/CLCDNumber.cpp
Symbolic link
1
gb.qt5/src/ext/CLCDNumber.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../gb.qt4/src/ext/CLCDNumber.cpp
|
1
gb.qt5/src/ext/CLCDNumber.h
Symbolic link
1
gb.qt5/src/ext/CLCDNumber.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../gb.qt4/src/ext/CLCDNumber.h
|
|
@ -11,5 +11,6 @@ gb_qt5_ext_la_CPPFLAGS = @QT5EXT_INC@ -I$(top_srcdir)/share -I$(top_srcdir)/src/
|
|||
|
||||
gb_qt5_ext_la_SOURCES = \
|
||||
main.h main.cpp \
|
||||
CLCDNumber.h CLCDNumber_moc.cpp CLCDNumber.cpp \
|
||||
CDial.h CDial_moc.cpp CDial.cpp \
|
||||
CTextEdit.h CTextEdit_moc.cpp CTextEdit.cpp
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "main.h"
|
||||
|
||||
#include "CLCDNumber.h"
|
||||
#include "CDial.h"
|
||||
#include "CTextEdit.h"
|
||||
|
||||
|
@ -40,6 +41,8 @@ QT_INTERFACE QT;
|
|||
|
||||
GB_DESC *GB_CLASSES[] EXPORT =
|
||||
{
|
||||
CLCDNumberDesc,
|
||||
|
||||
CDialDesc,
|
||||
|
||||
CTextEditSelectionDesc,
|
||||
|
|
Loading…
Reference in a new issue