[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs
From: Urs Wolfer <uwolfer () fwo ! ch>
Date: 2006-07-13 14:38:50
Message-ID: 1152801530.296623.5254.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 561880 by uwolfer:
Port some more KActiveLabel's to QLabel's.
I think we can remove KActiveLabel (or at least move to kde3support). QLabel provides \
all functionalities of KActiveLabel. Any comments?
M +1 -2 kdecore/kstringhandler.h
M +8 -7 kdeprint/kpfilterpage.cpp
M +2 -2 kdeprint/kpfilterpage.h
M +4 -3 kdeprint/management/kmwinfopage.cpp
M +1 -1 kdeprint/management/kxmlcommandselector.cpp
M +1 -3 kdeui/kmessagebox.cpp
M +0 -1 kdeui/knotification.cpp
M +0 -1 kio/misc/kwalletd/kwalletd.cpp
M +5 -5 knotify/daemon/notifybypopup.cpp
--- trunk/KDE/kdelibs/kdecore/kstringhandler.h #561879:561880
@@ -351,8 +351,7 @@
/**
* This method auto-detects URLs in strings, and adds HTML markup to them
- * so that richtext or HTML-enabled widgets (such as KActiveLabel)
- * will display the URL correctly.
+ * so that richtext or HTML-enabled widgets will display the URL correctly.
* @param text the string which may contain URLs
* @return the resulting text
*/
--- trunk/KDE/kdelibs/kdeprint/kpfilterpage.cpp #561879:561880
@@ -21,13 +21,14 @@
#include "kmfactory.h"
#include "kxmlcommand.h"
-#include <qtoolbutton.h>
-#include <qlayout.h>
+#include <QToolButton>
+#include <QLayout>
#include <QTreeWidget>
+#include <QLabel>
+
#include <klocale.h>
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <kactivelabel.h>
#include <kdebug.h>
#include <kapplication.h>
#include <kdialog.h>
@@ -160,10 +161,10 @@
connect(m_configure,SIGNAL(clicked()),SLOT(slotConfigureClicked()));
connect(m_view,SIGNAL(itemActivated(QTreeWidgetItem*, \
int)),SLOT(slotConfigureClicked()));
- m_info = new KActiveLabel(this);
+ m_info = new QLabel(this);
m_info->setWhatsThis(whatsThisFilterInfoPane);
- m_info->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
- m_info->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
+// m_info->setVerticalScrollBarPolicy( Qt::ScrollBarAsNeeded );
+// m_info->setHorizontalScrollBarPolicy( Qt::ScrollBarAsNeeded );
m_info->setFrameStyle( QFrame::Panel|QFrame::Sunken );
m_info->setMinimumSize( QSize( 240, 100 ) );
@@ -419,7 +420,7 @@
if ( !f->comment().isEmpty() )
txt.append( "<br>" ).append( f->comment() );
}
- m_info->setHtml(txt);
+ m_info->setText(txt);
}
#include "kpfilterpage.moc"
--- trunk/KDE/kdelibs/kdeprint/kpfilterpage.h #561879:561880
@@ -28,7 +28,7 @@
class QTreeWidget;
class KXmlCommand;
class QToolButton;
-class KTextBrowser;
+class QLabel;
class KPFilterPage : public KPrintDialogPage
{
@@ -61,7 +61,7 @@
QHash<QString, KXmlCommand*> m_activefilters;
QToolButton *m_add, *m_remove, *m_up, *m_down, *m_configure;
bool m_valid;
- KTextBrowser *m_info;
+ QLabel *m_info;
};
#endif
--- trunk/KDE/kdelibs/kdeprint/management/kmwinfopage.cpp #561879:561880
@@ -23,7 +23,6 @@
#include <qlabel.h>
#include <qlayout.h>
#include <klocale.h>
-#include <kactivelabel.h>
KMWInfoPage::KMWInfoPage(QWidget *parent)
: KMWizardPage(parent)
@@ -32,8 +31,8 @@
m_title = i18n("Introduction");
m_nextpage = KMWizard::Backend;
- KActiveLabel *label = new KActiveLabel(this);
- label->setHtml(i18n("<p>Welcome,</p><br>"
+ QLabel *label = new QLabel(this);
+ label->setText(i18n("<p>Welcome,</p><br>"
"<p>This wizard will help to install a new printer on your computer. "
"It will guide you through the various steps of the process of installing "
"and configuring a printer for your printing system. At each step, you "
@@ -41,6 +40,8 @@
"<p>We hope you'll enjoy this tool!</p><br>"
"<p align=right><a href=\"http://printing.kde.org\"><i>"
"The KDE printing team</i></a>.</p>"));
+ label->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
+ label->setOpenExternalLinks(true);
QVBoxLayout *main_ = new QVBoxLayout(this);
main_->setMargin(0);
--- trunk/KDE/kdelibs/kdeprint/management/kxmlcommandselector.cpp #561879:561880
@@ -284,7 +284,7 @@
void KXmlCommandSelector::slotHelpCommand()
{
KPopupFrame *pop = new KPopupFrame( m_helpbtn );
- KActiveLabel *lab = new KActiveLabel( m_help, pop );
+ QLabel *lab = new QLabel( m_help, pop );
lab->resize( lab->sizeHint() );
pop->setMainWidget( lab );
pop->exec( m_helpbtn->mapToGlobal( QPoint( m_helpbtn->width(), 0 ) ) );
--- trunk/KDE/kdelibs/kdeui/kmessagebox.cpp #561879:561880
@@ -41,7 +41,6 @@
#include <klocale.h>
#include <knotification.h>
#include <kstdguiitem.h>
-#include <kactivelabel.h>
#include <kiconloader.h>
#include <kvbox.h>
#include <kpushbutton.h>
@@ -227,8 +226,7 @@
if (!(options & KMessageBox::AllowLink))
{
- QObject::disconnect(label2, SIGNAL(anchorClicked (const QUrl &)),
- label2, SLOT(setSource(const QUrl &)));
+ label2->setOpenExternalLinks(false);
}
label2->setFixedSize(QSize(pref_width, pref_height));
--- trunk/KDE/kdelibs/kdeui/knotification.cpp #561879:561880
@@ -33,7 +33,6 @@
#include <kiconloader.h>
#include <kconfig.h>
#include <kpassivepopup.h>
-#include <kactivelabel.h>
#include <kprocess.h>
#include <kdialog.h>
#include <kmacroexpander.h>
--- trunk/KDE/kdelibs/kio/misc/kwalletd/kwalletd.cpp #561879:561880
@@ -26,7 +26,6 @@
#include "kwalletd.h"
#include "ktimeout.h"
-#include <kactivelabel.h>
#include <kapplication.h>
#include <ktoolinvocation.h>
#include <kconfig.h>
--- trunk/KDE/kdelibs/knotify/daemon/notifybypopup.cpp #561879:561880
@@ -23,7 +23,6 @@
#include <kdebug.h>
#include <kpassivepopup.h>
-#include <kactivelabel.h>
#include <kiconloader.h>
#include <kdialog.h>
#include <khbox.h>
@@ -92,11 +91,12 @@
linkCode+=QString::fromLatin1(" <a href=\"%1/%2\">%3</a> ").arg( id ).arg( i \
).arg( Qt::escape(it) ); }
linkCode+=QString::fromLatin1("</p>");
- KActiveLabel *link = new KActiveLabel(linkCode , vb );
+ QLabel *link = new QLabel(linkCode , vb );
+ link->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
+ link->setOpenExternalLinks(true);
//link->setAlignment( AlignRight );
- link->setNotifyClick(true);
- QObject::connect(link, SIGNAL(urlClick(const QString &)), this, \
SLOT(slotLinkClicked(const QString& ) ) );
- QObject::connect(link, SIGNAL(urlClick(const QString &)), pop, SLOT(hide()));
+ QObject::connect(link, SIGNAL(linkActivated(const QString &)), this, \
SLOT(slotLinkClicked(const QString& ) ) ); + QObject::connect(link, \
SIGNAL(linkActivated(const QString &)), pop, SLOT(hide())); }
pop->setAutoDelete( true );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic