mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-24 10:25:36 +00:00
use kclasses
svn path=/trunk/KDE/kdegraphics/okular/; revision=760478
This commit is contained in:
parent
a35532befd
commit
2f61e6545b
|
@ -13,11 +13,11 @@
|
||||||
#include <qframe.h>
|
#include <qframe.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
#include <qlineedit.h>
|
|
||||||
#include <qheaderview.h>
|
#include <qheaderview.h>
|
||||||
#include <qtextedit.h>
|
#include <qtextedit.h>
|
||||||
#include <kcolorbutton.h>
|
#include <kcolorbutton.h>
|
||||||
#include <kicon.h>
|
#include <kicon.h>
|
||||||
|
#include <klineedit.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <knuminput.h>
|
#include <knuminput.h>
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
|
@ -95,7 +95,7 @@ AnnotsPropertiesDialog::AnnotsPropertiesDialog( QWidget *parent, Okular::Documen
|
||||||
gridlayout = new QGridLayout( page );
|
gridlayout = new QGridLayout( page );
|
||||||
tmplabel = new QLabel( i18n( "&Author:" ), page );
|
tmplabel = new QLabel( i18n( "&Author:" ), page );
|
||||||
tmplabel->setAlignment( ( tmplabel->alignment() & ~Qt::AlignHorizontal_Mask ) | Qt::AlignRight );
|
tmplabel->setAlignment( ( tmplabel->alignment() & ~Qt::AlignHorizontal_Mask ) | Qt::AlignRight );
|
||||||
AuthorEdit = new QLineEdit( ann->author(), page );
|
AuthorEdit = new KLineEdit( ann->author(), page );
|
||||||
AuthorEdit->setEnabled( canEditAnnotations );
|
AuthorEdit->setEnabled( canEditAnnotations );
|
||||||
tmplabel->setBuddy( AuthorEdit );
|
tmplabel->setBuddy( AuthorEdit );
|
||||||
gridlayout->addWidget( tmplabel, 0, 0 );
|
gridlayout->addWidget( tmplabel, 0, 0 );
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
|
|
||||||
// qt/kde includes
|
// qt/kde includes
|
||||||
#include <qcheckbox.h>
|
#include <qcheckbox.h>
|
||||||
#include <qcombobox.h>
|
|
||||||
#include <qgroupbox.h>
|
#include <qgroupbox.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <qspinbox.h>
|
#include <qspinbox.h>
|
||||||
#include <qvariant.h>
|
#include <qvariant.h>
|
||||||
#include <kcolorbutton.h>
|
#include <kcolorbutton.h>
|
||||||
|
#include <kcombobox.h>
|
||||||
#include <kfontrequester.h>
|
#include <kfontrequester.h>
|
||||||
#include <kiconloader.h>
|
#include <kiconloader.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
|
@ -30,7 +30,7 @@ PixmapPreviewSelector::PixmapPreviewSelector( QWidget * parent )
|
||||||
{
|
{
|
||||||
QHBoxLayout * mainlay = new QHBoxLayout( this );
|
QHBoxLayout * mainlay = new QHBoxLayout( this );
|
||||||
mainlay->setMargin( 0 );
|
mainlay->setMargin( 0 );
|
||||||
m_comboItems = new QComboBox( this );
|
m_comboItems = new KComboBox( this );
|
||||||
mainlay->addWidget( m_comboItems );
|
mainlay->addWidget( m_comboItems );
|
||||||
m_iconLabel = new QLabel( this );
|
m_iconLabel = new QLabel( this );
|
||||||
mainlay->addWidget( m_iconLabel );
|
mainlay->addWidget( m_iconLabel );
|
||||||
|
@ -372,7 +372,7 @@ QWidget * HighlightAnnotationWidget::widget()
|
||||||
lay->addLayout( typelay );
|
lay->addLayout( typelay );
|
||||||
QLabel * tmplabel = new QLabel( i18n( "Type:" ), m_widget );
|
QLabel * tmplabel = new QLabel( i18n( "Type:" ), m_widget );
|
||||||
typelay->addWidget( tmplabel );
|
typelay->addWidget( tmplabel );
|
||||||
m_typeCombo = new QComboBox( m_widget );
|
m_typeCombo = new KComboBox( m_widget );
|
||||||
tmplabel->setBuddy( m_typeCombo );
|
tmplabel->setBuddy( m_typeCombo );
|
||||||
typelay->addWidget( m_typeCombo );
|
typelay->addWidget( m_typeCombo );
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ QWidget * GeomAnnotationWidget::widget()
|
||||||
lay->setMargin( 0 );
|
lay->setMargin( 0 );
|
||||||
QLabel * tmplabel = new QLabel( i18n( "Type:" ), m_widget );
|
QLabel * tmplabel = new QLabel( i18n( "Type:" ), m_widget );
|
||||||
lay->addWidget( tmplabel, 0, 0 );
|
lay->addWidget( tmplabel, 0, 0 );
|
||||||
m_typeCombo = new QComboBox( m_widget );
|
m_typeCombo = new KComboBox( m_widget );
|
||||||
tmplabel->setBuddy( m_typeCombo );
|
tmplabel->setBuddy( m_typeCombo );
|
||||||
lay->addWidget( m_typeCombo, 0, 1 );
|
lay->addWidget( m_typeCombo, 0, 1 );
|
||||||
m_useColor = new QCheckBox( i18n( "Inner color:" ), m_widget );
|
m_useColor = new QCheckBox( i18n( "Inner color:" ), m_widget );
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
#include <qsizegrip.h>
|
#include <qsizegrip.h>
|
||||||
#include <qstyle.h>
|
#include <qstyle.h>
|
||||||
#include <qtextedit.h>
|
|
||||||
#include <qtoolbutton.h>
|
#include <qtoolbutton.h>
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
|
#include <ktextedit.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
|
|
||||||
// local includes
|
// local includes
|
||||||
|
@ -163,7 +163,7 @@ AnnotWindow::AnnotWindow( QWidget * parent, Okular::Annotation * annot)
|
||||||
setAutoFillBackground( true );
|
setAutoFillBackground( true );
|
||||||
setFrameStyle( Panel | Raised );
|
setFrameStyle( Panel | Raised );
|
||||||
|
|
||||||
textEdit=new QTextEdit(m_annot->window().text(), this);
|
textEdit=new KTextEdit(m_annot->window().text(), this);
|
||||||
connect(textEdit,SIGNAL(textChanged()),
|
connect(textEdit,SIGNAL(textChanged()),
|
||||||
this,SLOT(slotsaveWindowText()));
|
this,SLOT(slotsaveWindowText()));
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <qframe.h>
|
#include <qframe.h>
|
||||||
#include <qpushbutton.h>
|
#include <qpushbutton.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
#include <qlineedit.h>
|
|
||||||
#include <qlayout.h>
|
#include <qlayout.h>
|
||||||
#include <QStyleOptionButton>
|
#include <QStyleOptionButton>
|
||||||
#include <QStylePainter>
|
#include <QStylePainter>
|
||||||
|
@ -24,6 +23,7 @@
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <kicon.h>
|
#include <kicon.h>
|
||||||
#include <kicontheme.h>
|
#include <kicontheme.h>
|
||||||
|
#include <klineedit.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kacceleratormanager.h>
|
#include <kacceleratormanager.h>
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
#include "core/document.h"
|
#include "core/document.h"
|
||||||
|
|
||||||
// [private widget] lineEdit for entering/validating page numbers
|
// [private widget] lineEdit for entering/validating page numbers
|
||||||
class PagesEdit : public QLineEdit
|
class PagesEdit : public KLineEdit
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PagesEdit( MiniBar * parent );
|
PagesEdit( MiniBar * parent );
|
||||||
|
@ -326,7 +326,7 @@ void ProgressWidget::paintEvent( QPaintEvent * e )
|
||||||
/** PagesEdit **/
|
/** PagesEdit **/
|
||||||
|
|
||||||
PagesEdit::PagesEdit( MiniBar * parent )
|
PagesEdit::PagesEdit( MiniBar * parent )
|
||||||
: QLineEdit( parent ), m_miniBar( parent ), m_eatClick( false )
|
: KLineEdit( parent ), m_miniBar( parent ), m_eatClick( false )
|
||||||
{
|
{
|
||||||
// use an integer validator
|
// use an integer validator
|
||||||
m_validator = new QIntValidator( 1, 1, this );
|
m_validator = new QIntValidator( 1, 1, this );
|
||||||
|
@ -352,7 +352,7 @@ void PagesEdit::setText( const QString & text )
|
||||||
backString = text;
|
backString = text;
|
||||||
// call default handler if hasn't focus
|
// call default handler if hasn't focus
|
||||||
if ( !hasFocus() )
|
if ( !hasFocus() )
|
||||||
QLineEdit::setText( text );
|
KLineEdit::setText( text );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagesEdit::focusInEvent( QFocusEvent * e )
|
void PagesEdit::focusInEvent( QFocusEvent * e )
|
||||||
|
@ -366,7 +366,7 @@ void PagesEdit::focusInEvent( QFocusEvent * e )
|
||||||
pal.setColor( QPalette::Active, QPalette::Base, QApplication::palette().color( QPalette::Active, QPalette::Base ) );
|
pal.setColor( QPalette::Active, QPalette::Base, QApplication::palette().color( QPalette::Active, QPalette::Base ) );
|
||||||
setPalette( pal );
|
setPalette( pal );
|
||||||
// call default handler
|
// call default handler
|
||||||
QLineEdit::focusInEvent( e );
|
KLineEdit::focusInEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagesEdit::focusOutEvent( QFocusEvent * e )
|
void PagesEdit::focusOutEvent( QFocusEvent * e )
|
||||||
|
@ -376,16 +376,16 @@ void PagesEdit::focusOutEvent( QFocusEvent * e )
|
||||||
pal.setColor( QPalette::Base, QApplication::palette().color( QPalette::Base ).dark( 102 ) );
|
pal.setColor( QPalette::Base, QApplication::palette().color( QPalette::Base ).dark( 102 ) );
|
||||||
setPalette( pal );
|
setPalette( pal );
|
||||||
// restore text
|
// restore text
|
||||||
QLineEdit::setText( backString );
|
KLineEdit::setText( backString );
|
||||||
// call default handler
|
// call default handler
|
||||||
QLineEdit::focusOutEvent( e );
|
KLineEdit::focusOutEvent( e );
|
||||||
}
|
}
|
||||||
|
|
||||||
void PagesEdit::mousePressEvent( QMouseEvent * e )
|
void PagesEdit::mousePressEvent( QMouseEvent * e )
|
||||||
{
|
{
|
||||||
// if this click got the focus in, don't process the event
|
// if this click got the focus in, don't process the event
|
||||||
if ( !m_eatClick )
|
if ( !m_eatClick )
|
||||||
QLineEdit::mousePressEvent( e );
|
KLineEdit::mousePressEvent( e );
|
||||||
m_eatClick = false;
|
m_eatClick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include <qtimer.h>
|
#include <qtimer.h>
|
||||||
#include <qimage.h>
|
#include <qimage.h>
|
||||||
#include <qlabel.h>
|
#include <qlabel.h>
|
||||||
#include <qlineedit.h>
|
|
||||||
#include <qpainter.h>
|
#include <qpainter.h>
|
||||||
#include <qtooltip.h>
|
#include <qtooltip.h>
|
||||||
#include <qvalidator.h>
|
#include <qvalidator.h>
|
||||||
|
@ -28,6 +27,7 @@
|
||||||
#include <kaction.h>
|
#include <kaction.h>
|
||||||
#include <kactioncollection.h>
|
#include <kactioncollection.h>
|
||||||
#include <kglobalsettings.h>
|
#include <kglobalsettings.h>
|
||||||
|
#include <klineedit.h>
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kiconloader.h>
|
#include <kiconloader.h>
|
||||||
#include <kmessagebox.h>
|
#include <kmessagebox.h>
|
||||||
|
@ -430,7 +430,7 @@ void PresentationWidget::paintEvent( QPaintEvent * pe )
|
||||||
m_topBar->setIconSize( QSize( 32, 32 ) );
|
m_topBar->setIconSize( QSize( 32, 32 ) );
|
||||||
m_topBar->setMovable( false );
|
m_topBar->setMovable( false );
|
||||||
m_topBar->addAction( KIcon( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n("Previous Page"), this, SLOT( slotPrevPage() ) );
|
m_topBar->addAction( KIcon( layoutDirection() == Qt::RightToLeft ? "go-next" : "go-previous" ), i18n("Previous Page"), this, SLOT( slotPrevPage() ) );
|
||||||
m_pagesEdit = new QLineEdit( m_topBar );
|
m_pagesEdit = new KLineEdit( m_topBar );
|
||||||
QSizePolicy sp = m_pagesEdit->sizePolicy();
|
QSizePolicy sp = m_pagesEdit->sizePolicy();
|
||||||
sp.setHorizontalPolicy( QSizePolicy::Minimum );
|
sp.setHorizontalPolicy( QSizePolicy::Minimum );
|
||||||
m_pagesEdit->setSizePolicy( sp );
|
m_pagesEdit->setSizePolicy( sp );
|
||||||
|
|
Loading…
Reference in a new issue