Revision: 6984
Author: [email protected]
Date: Sat Mar 26 18:48:08 2011
Log: * qt4/chardict/kseparator.cpp
* qt4/chardict/kseparator.h
* qt4/pref/kseparator.cpp
* qt4/pref/kseparator.h
- Remove.
* qt4/chardict/Makefile.am
* qt4/chardict/qt4.cpp
* qt4/chardict/uim-chardict-qt4.pro.in
* qt4/pref/Makefile.am
* qt4/pref/qt4.cpp
* qt4/pref/uim-pref-qt4.pro.in
- Remove kseparator.cpp and kseparator.h.
http://code.google.com/p/uim/source/detail?r=6984
Deleted:
/trunk/qt4/chardict/kseparator.cpp
/trunk/qt4/chardict/kseparator.h
/trunk/qt4/pref/kseparator.cpp
/trunk/qt4/pref/kseparator.h
Modified:
/trunk/qt4/chardict/Makefile.am
/trunk/qt4/chardict/qt4.cpp
/trunk/qt4/chardict/uim-chardict-qt4.pro.in
/trunk/qt4/pref/Makefile.am
/trunk/qt4/pref/qt4.cpp
/trunk/qt4/pref/uim-pref-qt4.pro.in
=======================================
--- /trunk/qt4/chardict/kseparator.cpp Sun May 2 07:29:31 2010
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* Copyright (C) 1997 Michael Roth <[email protected]>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public
License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
-*
-*/
-#include "kseparator.h"
-
-#include <QtGui/QStyle>
-#include <QtGui/QStyleOption>
-
-KSeparator::KSeparator( QWidget* parent, Qt::WindowFlags f )
- : QFrame( parent, f )
-{
- setLineWidth( 1 );
- setMidLineWidth( 0 );
- setOrientation( HLine );
-}
-
-
-
-KSeparator::KSeparator( int orientation, QWidget* parent, Qt::WindowFlags
f )
- : QFrame( parent, f )
-{
- setLineWidth( 1 );
- setMidLineWidth( 0 );
- setOrientation( orientation );
-}
-
-
-
-void KSeparator::setOrientation( int orientation )
-{
- switch ( orientation )
- {
- case Qt::Vertical:
- case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
- setMinimumSize( 2, 0 );
- break;
-
- default:
- qDebug( "KSeparator::setOrientation(): invalid orientation, using
default orientation HLine" );
-
- case Qt::Horizontal:
- case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
- setMinimumSize( 0, 2 );
- break;
- }
-}
-
-
-
-int KSeparator::orientation() const
-{
- if ( frameStyle() & VLine )
- return VLine;
-
- if ( frameStyle() & HLine )
- return HLine;
-
- return 0;
-}
-
-void KSeparator::drawFrame( QPainter *p )
-{
- QPoint p1, p2;
- QRect r = frameRect();
-
- if ( frameStyle() & HLine )
- {
- p1 = QPoint( r.x(), r.height() / 2 );
- p2 = QPoint( r.x() + r.width(), p1.y() );
- }
- else
- {
- p1 = QPoint( r.x() + r.width() / 2, 0 );
- p2 = QPoint( p1.x(), r.height() );
- }
-
- QStyleOption opt( lineWidth(), midLineWidth() );
- opt.state = QStyle::State_Sunken;
- style()->drawPrimitive( QStyle::PE_IndicatorToolBarSeparator, &opt, p
);
-}
-
-
-QSize KSeparator::sizeHint() const
-{
- if ( frameStyle() & VLine )
- return QSize( 2, 0 );
-
- if ( frameStyle() & HLine )
- return QSize( 0, 2 );
-
- return QSize( -1, -1 );
-}
-
-void KSeparator::virtual_hook( int, void* )
-{ /*BASE::virtual_hook( id, data );*/ }
=======================================
--- /trunk/qt4/chardict/kseparator.h Sun May 2 07:29:31 2010
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright (C) 1997 Michael Roth <[email protected]>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public
License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
-*
-*/
-
-#ifndef KSEPARATOR_H
-#define KSEPARATOR_H
-
-#include <QtGui/QFrame>
-
-/**
- * Standard horizontal or vertical separator.
- *
- * @author Michael Roth <[email protected]>
- * @version $Id: kseparator.h,v 1.14 2004/09/09 15:23:53 faure Exp $
-*/
-class KSeparator : public QFrame
-{
- Q_OBJECT
- Q_PROPERTY( int orientation READ orientation WRITE setOrientation )
-public:
- /**
- * Constructor.
- * @param parent parent object.
- * @param f extra QWidget flags.
- **/
- explicit KSeparator( QWidget* parent = 0, Qt::WindowFlags f = 0 );
-
- /**
- * Constructor.
- * @param orientation Set the orientation of the separator.
- * Possible values are HLine or Horizontal and VLine or Vertical.
- * @param parent parent object.
- * @param f extra QWidget flags.
- **/
- explicit KSeparator( int orientation, QWidget* parent = 0,
- Qt::WindowFlags f = 0 );
-
- /**
- * Returns the orientation of the separator.
- * @return int Possible values are VLine and HLine.
- **/
- int orientation() const;
-
- /**
- * Set the orientation of the separator to @p orient
- *
- * @param orient Possible values are VLine and HLine.
- */
- void setOrientation( int orient );
-
- /**
- * The recommended height (width) for a horizontal (vertical)
separator.
- **/
- virtual QSize sizeHint() const;
-
-protected:
- /**
- * @param p pointer to painter
- */
- virtual void drawFrame( QPainter *p );
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KSeparatorPrivate* d;
-};
-
-
-#endif // __KSEPARATOR_H__
=======================================
--- /trunk/qt4/pref/kseparator.cpp Sun May 2 07:29:31 2010
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-* Copyright (C) 1997 Michael Roth <[email protected]>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public
License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
-*
-*/
-#include "kseparator.h"
-
-#include <QtGui/QStyle>
-#include <QtGui/QStyleOption>
-
-KSeparator::KSeparator( QWidget* parent, Qt::WindowFlags f )
- : QFrame( parent, f )
-{
- setLineWidth( 1 );
- setMidLineWidth( 0 );
- setOrientation( HLine );
-}
-
-
-
-KSeparator::KSeparator( int orientation, QWidget* parent, Qt::WindowFlags
f )
- : QFrame( parent, f )
-{
- setLineWidth( 1 );
- setMidLineWidth( 0 );
- setOrientation( orientation );
-}
-
-
-
-void KSeparator::setOrientation( int orientation )
-{
- switch ( orientation )
- {
- case Qt::Vertical:
- case VLine:
- setFrameStyle( QFrame::VLine | QFrame::Sunken );
- setMinimumSize( 2, 0 );
- break;
-
- default:
- qDebug( "KSeparator::setOrientation(): invalid orientation, using
default orientation HLine" );
-
- case Qt::Horizontal:
- case HLine:
- setFrameStyle( QFrame::HLine | QFrame::Sunken );
- setMinimumSize( 0, 2 );
- break;
- }
-}
-
-
-
-int KSeparator::orientation() const
-{
- if ( frameStyle() & VLine )
- return VLine;
-
- if ( frameStyle() & HLine )
- return HLine;
-
- return 0;
-}
-
-void KSeparator::drawFrame( QPainter *p )
-{
- QPoint p1, p2;
- QRect r = frameRect();
-
- if ( frameStyle() & HLine )
- {
- p1 = QPoint( r.x(), r.height() / 2 );
- p2 = QPoint( r.x() + r.width(), p1.y() );
- }
- else
- {
- p1 = QPoint( r.x() + r.width() / 2, 0 );
- p2 = QPoint( p1.x(), r.height() );
- }
-
- QStyleOption opt( lineWidth(), midLineWidth() );
- opt.state = QStyle::State_Sunken;
- style()->drawPrimitive( QStyle::PE_IndicatorToolBarSeparator, &opt, p
);
-}
-
-
-QSize KSeparator::sizeHint() const
-{
- if ( frameStyle() & VLine )
- return QSize( 2, 0 );
-
- if ( frameStyle() & HLine )
- return QSize( 0, 2 );
-
- return QSize( -1, -1 );
-}
-
-void KSeparator::virtual_hook( int, void* )
-{ /*BASE::virtual_hook( id, data );*/ }
=======================================
--- /trunk/qt4/pref/kseparator.h Sun May 2 07:29:31 2010
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-* Copyright (C) 1997 Michael Roth <[email protected]>
-*
-* This program is free software; you can redistribute it and/or modify
-* it under the terms of the GNU Library General Public License as
published by
-* the Free Software Foundation; either version 2 of the License, or
-* (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU Library General Public License for more details.
-*
-* You should have received a copy of the GNU Library General Public
License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
-*
-*/
-
-#ifndef KSEPARATOR_H
-#define KSEPARATOR_H
-
-#include <QtGui/QFrame>
-
-/**
- * Standard horizontal or vertical separator.
- *
- * @author Michael Roth <[email protected]>
- * @version $Id: kseparator.h,v 1.14 2004/09/09 15:23:53 faure Exp $
-*/
-class KSeparator : public QFrame
-{
- Q_OBJECT
- Q_PROPERTY( int orientation READ orientation WRITE setOrientation )
-public:
- /**
- * Constructor.
- * @param parent parent object.
- * @param f extra QWidget flags.
- **/
- explicit KSeparator( QWidget* parent = 0, Qt::WindowFlags f = 0 );
-
- /**
- * Constructor.
- * @param orientation Set the orientation of the separator.
- * Possible values are HLine or Horizontal and VLine or Vertical.
- * @param parent parent object.
- * @param f extra QWidget flags.
- **/
- explicit KSeparator( int orientation, QWidget* parent = 0,
- Qt::WindowFlags f = 0 );
-
- /**
- * Returns the orientation of the separator.
- * @return int Possible values are VLine and HLine.
- **/
- int orientation() const;
-
- /**
- * Set the orientation of the separator to @p orient
- *
- * @param orient Possible values are VLine and HLine.
- */
- void setOrientation( int orient );
-
- /**
- * The recommended height (width) for a horizontal (vertical)
separator.
- **/
- virtual QSize sizeHint() const;
-
-protected:
- /**
- * @param p pointer to painter
- */
- virtual void drawFrame( QPainter *p );
-protected:
- virtual void virtual_hook( int id, void* data );
-private:
- class KSeparatorPrivate* d;
-};
-
-
-#endif // __KSEPARATOR_H__
=======================================
--- /trunk/qt4/chardict/Makefile.am Wed Jul 28 00:21:17 2010
+++ /trunk/qt4/chardict/Makefile.am Sat Mar 26 18:48:08 2011
@@ -25,13 +25,11 @@
EXTRA_DIST = uim-chardict-qt4.pro.in \
bushuviewwidget.h \
chargridview.h \
- kseparator.h \
qt4.h \
qtgettext.h \
unicodeviewwidget.h \
bushuviewwidget.cpp \
chargridview.cpp \
- kseparator.cpp \
qt4.cpp \
unicodeviewwidget.cpp \
bushu.t
=======================================
--- /trunk/qt4/chardict/qt4.cpp Thu Jan 6 18:09:56 2011
+++ /trunk/qt4/chardict/qt4.cpp Sat Mar 26 18:48:08 2011
@@ -32,7 +32,6 @@
*/
#include "qt4.h"
#include "bushuviewwidget.h"
-#include "kseparator.h"
#include "unicodeviewwidget.h"
#include <QtCore/QSettings>
@@ -186,9 +185,12 @@
connect( m_modeCombo, SIGNAL( activated( int ) ),
m_widgetStack, SLOT( setCurrentIndex( int ) ) );
+ QFrame *separator = new QFrame( this );
+ separator->setFrameShape( QFrame::HLine );
+ separator->setFrameShadow( QFrame::Sunken );
layout->setMargin( 0 );
layout->addWidget( upperHWidget );
- layout->addWidget( new KSeparator( this ) );
+ layout->addWidget( separator );
layout->addWidget( m_widgetStack );
}
=======================================
--- /trunk/qt4/chardict/uim-chardict-qt4.pro.in Sun Jan 2 23:04:42 2011
+++ /trunk/qt4/chardict/uim-chardict-qt4.pro.in Sat Mar 26 18:48:08 2011
@@ -5,13 +5,11 @@
# Input
HEADERS += @srcdir@/bushuviewwidget.h \
@srcdir@/chargridview.h \
- @srcdir@/kseparator.h \
@srcdir@/qt4.h \
@srcdir@/qtgettext.h \
@srcdir@/unicodeviewwidget.h
SOURCES += @srcdir@/bushuviewwidget.cpp \
@srcdir@/chargridview.cpp \
- @srcdir@/kseparator.cpp \
@srcdir@/qt4.cpp \
@srcdir@/unicodeviewwidget.cpp
=======================================
--- /trunk/qt4/pref/Makefile.am Mon Mar 29 21:24:26 2010
+++ /trunk/qt4/pref/Makefile.am Sat Mar 26 18:48:08 2011
@@ -17,6 +17,6 @@
FORCE:
EXTRA_DIST = uim-pref-qt4.pro.in \
- customwidgets.h kseparator.h qt4.h \
+ customwidgets.h qt4.h \
keyeditformbase.ui olisteditformbase.ui \
- customwidgets.cpp kseparator.cpp qt4.cpp
+ customwidgets.cpp qt4.cpp
=======================================
--- /trunk/qt4/pref/qt4.cpp Thu Jan 6 18:09:56 2011
+++ /trunk/qt4/pref/qt4.cpp Sat Mar 26 18:48:08 2011
@@ -34,7 +34,6 @@
#include "qt4.h"
#include "customwidgets.h"
-#include "kseparator.h"
#include <QtCore/QFile>
#include <QtCore/QSettings>
@@ -175,9 +174,12 @@
buttonHLayout->addWidget( m_applyButton );
buttonHLayout->addWidget( cancelButton );
+ QFrame *separator = new QFrame( this );
+ separator->setFrameShape( QFrame::HLine );
+ separator->setFrameShadow( QFrame::Sunken );
mainVLayout->setMargin( 0 );
mainVLayout->addWidget( mainSplitter );
- mainVLayout->addWidget( new KSeparator( this ) );
+ mainVLayout->addWidget( separator );
mainVLayout->addWidget( buttonHWidget );
mainSplitter->setStretchFactor( 1, 1 );
@@ -354,7 +356,9 @@
vLayout->setSpacing( 6 );
vLayout->setMargin( 6 );
QLabel *msgLabel = new QLabel( msg, this );
- KSeparator *sep = new KSeparator( this );
+ QFrame *sep = new QFrame( this );
+ sep->setFrameShape( QFrame::HLine );
+ sep->setFrameShadow( QFrame::Sunken );
vLayout->addWidget( msgLabel );
vLayout->addWidget( sep );
@@ -416,7 +420,9 @@
groupLabel->setAlignment( Qt::AlignLeft );
vLayout->addWidget( groupLabel );
- KSeparator *separator = new KSeparator( this );
+ QFrame *separator = new QFrame( this );
+ separator->setFrameShape( QFrame::HLine );
+ separator->setFrameShadow( QFrame::Sunken );
vLayout->addWidget( separator );
/* default QVGroupBox */
=======================================
--- /trunk/qt4/pref/uim-pref-qt4.pro.in Sun Jan 2 23:05:09 2011
+++ /trunk/qt4/pref/uim-pref-qt4.pro.in Sat Mar 26 18:48:08 2011
@@ -9,9 +9,9 @@
QMAKE_UIC = $$QMAKE_UIC -tr UIC_
# Input
-HEADERS += @srcdir@/customwidgets.h @srcdir@/kseparator.h @srcdir@/qt4.h
+HEADERS += @srcdir@/customwidgets.h @srcdir@/qt4.h
FORMS += @srcdir@/keyeditformbase.ui @srcdir@/olisteditformbase.ui
-SOURCES += @srcdir@/customwidgets.cpp @srcdir@/kseparator.cpp
@srcdir@/qt4.cpp
+SOURCES += @srcdir@/customwidgets.cpp @srcdir@/qt4.cpp
TARGET = uim-pref-qt4