Merge branch 'qt5ext' into 'master'
gb.qt5.ext: Add LCDnumber and Dial classes from gb.qt4.ext See merge request !5
This commit is contained in:
commit
bbdf062936
7 changed files with 22 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/CDial.cpp
Symbolic link
1
gb.qt5/src/ext/CDial.cpp
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../gb.qt4/src/ext/CDial.cpp
|
1
gb.qt5/src/ext/CDial.h
Symbolic link
1
gb.qt5/src/ext/CDial.h
Symbolic link
|
@ -0,0 +1 @@
|
|||
../../../gb.qt4/src/ext/CDial.h
|
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,4 +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
|
||||
|
|
|
@ -29,6 +29,9 @@
|
|||
#include <string.h>
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#include "CLCDNumber.h"
|
||||
#include "CDial.h"
|
||||
#include "CTextEdit.h"
|
||||
|
||||
extern "C" {
|
||||
|
@ -38,6 +41,10 @@ QT_INTERFACE QT;
|
|||
|
||||
GB_DESC *GB_CLASSES[] EXPORT =
|
||||
{
|
||||
CLCDNumberDesc,
|
||||
|
||||
CDialDesc,
|
||||
|
||||
CTextEditSelectionDesc,
|
||||
CTextEditFormatDesc,
|
||||
CTextEditDesc,
|
||||
|
|
Loading…
Reference in a new issue