[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenox/konq-embed/src
From: Eva Brucherseifer <eva () kde ! org>
Date: 2006-11-22 17:37:20
Message-ID: 1164217040.885092.11182.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 606993 by eva:
ported road mode of konqe to Qt3
M +15 -0 roadmode.cc
M +1 -0 roadmode.h
M +7 -1 toggletoolbutton.cc
M +5 -0 urlcombo.cpp
--- trunk/kdenox/konq-embed/src/roadmode.cc #606992:606993
@@ -51,8 +51,13 @@
{
m_pinBtn = new QToolButton( this );
m_pinBtn->setToggleButton( true );
+#if (QT_VERSION < 0x030000)
m_pinBtn->setOnIconSet( m_pinDownIcons );
m_pinBtn->setOffIconSet( m_pinUpIcons );
+#else
+ m_pinBtn->setIconSet( m_pinUpIcons );
+ connect (m_pinBtn, SIGNAL( toggled( bool ) ), this, SLOT( pinToggled(bool)) );
+#endif
m_pinBtn->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Maximum \
) );
m_loadStatus = new QLabel( this );
@@ -81,6 +86,16 @@
(b) ? m_loadLabel->hide() : m_loadLabel->show();
}
+void ModeBar::pinToggled( bool on )
+{
+#if (QT_VERSION >= 0x030000)
+ if (on)
+ m_pinBtn->setIconSet( m_pinDownIcons );
+ else
+ m_pinBtn->setIconSet( m_pinUpIcons );
+#endif
+}
+
void ModeBar::setThrobble( bool b )
{
if (m_loadStatus)
--- trunk/kdenox/konq-embed/src/roadmode.h #606992:606993
@@ -50,6 +50,7 @@
void setThrobble( bool );
public slots:
void autoHide();
+ void pinToggled( bool );
signals:
void autoHidden();
private:
--- trunk/kdenox/konq-embed/src/toggletoolbutton.cc #606992:606993
@@ -23,6 +23,8 @@
#ifdef KONQ_GUI_ROAD
#include "toggletoolbutton.h"
+#include <qstyle.h>
+
ToggleToolButton::ToggleToolButton( const QIconSet &iconSet, QToolBar *parent, const \
char *name ) : QToolButton( iconSet, QString::null, QString::null, 0,
0, parent, name )
@@ -50,10 +52,14 @@
if ( text().isNull() && !textLabel().isNull() )
{
int x, y, w, h;
+#if (QT_VERSION < 0x030000)
style().toolButtonRect(0, 0, width(), height() ).rect( &x, &y, &w, &h );
+#else
+ style().subRect(QStyle::SR_ToolButtonContents , this).rect( &x, &y, &w, &h \
); +#endif
p->setFont( font() );
const int textWidth = p->fontMetrics().width( textLabel() );
- style().drawItem( p, x + w - textWidth, y, textWidth, h / 2, // HACK: this \
is hard coded for the ROAD browser tab button; if this class is ever used more \
generally, it needs a system to position the label as desired + \
style().drawItem( p, QRect(x + w - textWidth-1, y, textWidth-1, h / 2) , // HACK: \
this is hard coded for the ROAD browser tab button; if this class is ever used more \
generally, it needs a system to position the label as desired AlignCenter + \
ShowPrefix, colorGroup(), isEnabled(),
0, textLabel() );
--- trunk/kdenox/konq-embed/src/urlcombo.cpp #606992:606993
@@ -34,6 +34,7 @@
#include <qstring.h>
#include <qfile.h>
+#include <qpainter.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -151,7 +152,11 @@
//qDebug( "TextChanged: %s", text.latin1() );
QString enteredText = text;
+#if (QT_VERSION < 0x030000)
QString highlightedText = lineEdit()->markedText();
+#else
+ QString highlightedText = lineEdit()->selectedText();
+#endif
if (highlightedText!= enteredText)
{
int pos = enteredText.find(highlightedText);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic