Revision: 6174
Author: nogu.dev
Date: Sat Feb 27 15:02:35 2010
Log: * qt4/candwin/qt4.cpp
* qt4/candwin/qt4.h
- Replace Q3VBox with QFrame.
http://code.google.com/p/uim/source/detail?r=6174
Modified:
/trunk/qt4/candwin/qt4.cpp
/trunk/qt4/candwin/qt4.h
=======================================
--- /trunk/qt4/candwin/qt4.cpp Sat Feb 27 15:02:03 2010
+++ /trunk/qt4/candwin/qt4.cpp Sat Feb 27 15:02:35 2010
@@ -41,6 +41,7 @@
#include <qstringlist.h>
#include <qtextcodec.h>
#include <qrect.h>
+#include <QtGui/QVBoxLayout>
#include <clocale>
#include <cstdio>
@@ -67,8 +68,8 @@
);
static QSocketNotifier *notifier = 0;
-CandidateWindow::CandidateWindow( QWidget *parent, const char * name )
- : Q3VBox( parent, name, candidateFlag )
+CandidateWindow::CandidateWindow( QWidget *parent )
+ : QFrame( parent, candidateFlag )
{
setFrameStyle( Raised | NoFrame );
setFocusPolicy( Qt::NoFocus );
@@ -103,6 +104,13 @@
connect( notifier, SIGNAL( activated( int ) ),
this, SLOT( slotStdinActivated( int ) ) );
hide();
+
+ QVBoxLayout *layout = new QVBoxLayout;
+ layout->setMargin( 0 );
+ layout->setSpacing( 0 );
+ layout->addWidget( cList );
+ layout->addWidget( numLabel );
+ setLayout( layout );
}
CandidateWindow::~CandidateWindow()
=======================================
--- /trunk/qt4/candwin/qt4.h Sat Feb 27 15:02:17 2010
+++ /trunk/qt4/candwin/qt4.h Sat Feb 27 15:02:35 2010
@@ -33,7 +33,6 @@
#ifndef UIM_QT4_CANDWIN_QT_H
#define UIM_QT4_CANDWIN_QT_H
-#include <Q3VBox>
#include <Q3ListView>
#include <QtCore/QList>
@@ -48,11 +47,11 @@
QString str;
};
-class CandidateWindow : public Q3VBox
+class CandidateWindow : public QFrame
{
Q_OBJECT
public:
- CandidateWindow( QWidget *parent = 0, const char * name = 0 );
+ CandidateWindow( QWidget *parent = 0 );
~CandidateWindow();
void activateCand( const QStringList &list );