summaryrefslogtreecommitdiffstats
path: root/kio/kfile/kurlbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kio/kfile/kurlbar.cpp')
-rw-r--r--kio/kfile/kurlbar.cpp316
1 files changed, 158 insertions, 158 deletions
diff --git a/kio/kfile/kurlbar.cpp b/kio/kfile/kurlbar.cpp
index 446087522..5c2b167c0 100644
--- a/kio/kfile/kurlbar.cpp
+++ b/kio/kfile/kurlbar.cpp
@@ -18,17 +18,17 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qdrawutil.h>
-#include <qfontmetrics.h>
-#include <qlabel.h>
-#include <qgrid.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqdrawutil.h>
+#include <tqfontmetrics.h>
+#include <tqlabel.h>
+#include <tqgrid.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kaboutdata.h>
#include <kconfig.h>
@@ -54,20 +54,20 @@
class KURLBarToolTip : public QToolTip
{
public:
- KURLBarToolTip( QListBox *view ) : QToolTip( view ), m_view( view ) {}
+ KURLBarToolTip( TQListBox *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint& point ) {
- QListBoxItem *item = m_view->itemAt( point );
+ virtual void maybeTip( const TQPoint& point ) {
+ TQListBoxItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KURLBarItem*>( item )->toolTip();
+ TQString text = static_cast<KURLBarItem*>( item )->toolTip();
if ( !text.isEmpty() )
tip( m_view->itemRect( item ), text );
}
}
private:
- QListBox *m_view;
+ TQListBox *m_view;
};
@@ -86,9 +86,9 @@ public:
};
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, bool persistent, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, bool persistent, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -98,9 +98,9 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
}
KURLBarItem::KURLBarItem( KURLBar *parent,
- const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
- : QListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
+ const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
+ : TQListBoxPixmap( KIconLoader::unknown() /*, parent->listBox()*/ ),
m_url( url ),
m_pixmap( 0L ),
m_parent( parent ),
@@ -109,8 +109,8 @@ KURLBarItem::KURLBarItem( KURLBar *parent,
init( icon, group, description, true /*persistent*/ );
}
-void KURLBarItem::init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent )
+void KURLBarItem::init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent )
{
d = new KURLBarItemPrivate;
d->isPersistent = persistent;
@@ -132,7 +132,7 @@ void KURLBarItem::setURL( const KURL& url )
setText( url.fileName() );
}
-void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
+void KURLBarItem::setIcon( const TQString& icon, KIcon::Group group )
{
m_icon = icon;
m_group = group;
@@ -144,7 +144,7 @@ void KURLBarItem::setIcon( const QString& icon, KIcon::Group group )
KIcon::DefaultState );
}
-void KURLBarItem::setDescription( const QString& desc )
+void KURLBarItem::setDescription( const TQString& desc )
{
m_description = desc;
setText( desc.isEmpty() ? m_url.fileName() : desc );
@@ -161,12 +161,12 @@ void KURLBarItem::setApplicationLocal( bool local )
m_appLocal = local;
}
-void KURLBarItem::setToolTip( const QString& tip )
+void KURLBarItem::setToolTip( const TQString& tip )
{
m_toolTip = tip;
}
-QString KURLBarItem::toolTip() const
+TQString KURLBarItem::toolTip() const
{
return m_toolTip.isEmpty() ? m_url.prettyURL() : m_toolTip;
}
@@ -176,9 +176,9 @@ int KURLBarItem::iconSize() const
return m_parent->iconSize();
}
-void KURLBarItem::paint( QPainter *p )
+void KURLBarItem::paint( TQPainter *p )
{
- QListBox *box = listBox();
+ TQListBox *box = listBox();
int w = width( box );
static const int margin = KDialog::spacingHint();
@@ -186,10 +186,10 @@ void KURLBarItem::paint( QPainter *p )
if ( isCurrent() || isSelected() ) {
int h = height( box );
- QBrush brush = box->colorGroup().brush( QColorGroup::Highlight );
+ TQBrush brush = box->colorGroup().brush( TQColorGroup::Highlight );
p->fillRect( 0, 0, w, h, brush );
- QPen pen = p->pen();
- QPen oldPen = pen;
+ TQPen pen = p->pen();
+ TQPen oldPen = pen;
pen.setColor( box->colorGroup().mid() );
p->setPen( pen );
@@ -204,14 +204,14 @@ void KURLBarItem::paint( QPainter *p )
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
// small icon -> draw icon next to text
- // ### mostly cut & paste of QListBoxPixmap::paint() until Qt 3.1
+ // ### mostly cut & paste of TQListBoxPixmap::paint() until Qt 3.1
// (where it will properly use pixmap() instead of the internal pixmap)
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
int yPos = QMAX( 0, (height(box) - pm->height())/2 );
p->drawPixmap( margin, yPos, *pm );
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
if ( pm->height() < fm.height() )
yPos = fm.ascent() + fm.leading()/2;
else
@@ -219,12 +219,12 @@ void KURLBarItem::paint( QPainter *p )
yPos += margin;
int stringWidth = box->width() - pm->width() - 2 - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int xPos = pm->width() + margin + 2;
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( xPos + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( xPos + ( TQApplication::reverseLayout() ? -1 : 1),
yPos + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -237,7 +237,7 @@ void KURLBarItem::paint( QPainter *p )
else {
// big icons -> draw text below icon
int y = margin;
- const QPixmap *pm = pixmap();
+ const TQPixmap *pm = pixmap();
if ( !pm->isNull() ) {
int x = (w - pm->width()) / 2;
@@ -246,17 +246,17 @@ void KURLBarItem::paint( QPainter *p )
}
if ( !text().isEmpty() ) {
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
y += pm->height() + fm.height() - fm.descent();
int stringWidth = box->width() - (margin * 2);
- QString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
+ TQString visibleText = KStringHandler::rPixelSqueeze( text(), fm, stringWidth );
int x = (w - fm.width( visibleText )) / 2;
x = QMAX( x, margin );
if ( isCurrent() || isSelected() ) {
p->setPen( box->colorGroup().highlight().dark(115) );
- p->drawText( x + ( QApplication::reverseLayout() ? -1 : 1),
+ p->drawText( x + ( TQApplication::reverseLayout() ? -1 : 1),
y + 1, visibleText );
p->setPen( box->colorGroup().highlightedText() );
}
@@ -266,15 +266,15 @@ void KURLBarItem::paint( QPainter *p )
}
}
-QSize KURLBarItem::sizeHint() const
+TQSize KURLBarItem::sizeHint() const
{
int wmin = 0;
int hmin = 0;
const KURLBarListBox *lb =static_cast<const KURLBarListBox*>(listBox());
if ( m_parent->iconSize() < KIcon::SizeMedium ) {
- wmin = QListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
- hmin = QListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
+ wmin = TQListBoxPixmap::width( lb ) + KDialog::spacingHint() * 2;
+ hmin = TQListBoxPixmap::height( lb ) + KDialog::spacingHint() * 2;
}
else {
wmin = QMAX(lb->fontMetrics().width(text()), pixmap()->width()) + KDialog::spacingHint() * 2;
@@ -286,10 +286,10 @@ QSize KURLBarItem::sizeHint() const
else
hmin = QMIN( hmin, lb->viewport()->sizeHint().height() );
- return QSize( wmin, hmin );
+ return TQSize( wmin, hmin );
}
-int KURLBarItem::width( const QListBox *lb ) const
+int KURLBarItem::width( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return QMAX( sizeHint().width(), lb->viewport()->width() );
@@ -297,7 +297,7 @@ int KURLBarItem::width( const QListBox *lb ) const
return sizeHint().width();
}
-int KURLBarItem::height( const QListBox *lb ) const
+int KURLBarItem::height( const TQListBox *lb ) const
{
if ( static_cast<const KURLBarListBox *>( lb )->isVertical() )
return sizeHint().height();
@@ -318,7 +318,7 @@ class KURLBar::KURLBarPrivate
public:
KURLBarPrivate()
{
- currentURL.setPath( QDir::homeDirPath() );
+ currentURL.setPath( TQDir::homeDirPath() );
defaultIconSize = 0;
}
@@ -327,8 +327,8 @@ public:
};
-KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags f )
- : QFrame( parent, name, f ),
+KURLBar::KURLBar( bool useGlobalItems, TQWidget *parent, const char *name, WFlags f )
+ : TQFrame( parent, name, f ),
m_activeItem( 0L ),
m_useGlobal( useGlobalItems ),
m_isModified( false ),
@@ -339,13 +339,13 @@ KURLBar::KURLBar( bool useGlobalItems, QWidget *parent, const char *name, WFlags
d = new KURLBarPrivate();
setListBox( 0L );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
- QWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
+ TQWhatsThis::add(this, i18n("<qt>The <b>Quick Access</b> panel provides easy access to commonly used file locations.<p>"
"Clicking on one of the shortcut entries will take you to that location.<p>"
"By right clicking on an entry you can add, edit and remove shortcuts.</qt>"));
}
@@ -355,9 +355,9 @@ KURLBar::~KURLBar()
delete d;
}
-KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
+KURLBarItem * KURLBar::insertItem(const KURL& url, const TQString& description,
bool applicationLocal,
- const QString& icon, KIcon::Group group )
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, description, icon, group);
item->setApplicationLocal( applicationLocal );
@@ -365,8 +365,8 @@ KURLBarItem * KURLBar::insertItem(const KURL& url, const QString& description,
return item;
}
-KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& description,
- const QString& icon, KIcon::Group group )
+KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const TQString& description,
+ const TQString& icon, KIcon::Group group )
{
KURLBarItem *item = new KURLBarItem(this, url, false, description, icon, group);
m_listBox->insertItem( item );
@@ -376,12 +376,12 @@ KURLBarItem * KURLBar::insertDynamicItem(const KURL& url, const QString& descrip
void KURLBar::setOrientation( Qt::Orientation orient )
{
m_listBox->setOrientation( orient );
- setSizePolicy( QSizePolicy( isVertical() ?
- QSizePolicy::Maximum :
- QSizePolicy::Preferred,
+ setSizePolicy( TQSizePolicy( isVertical() ?
+ TQSizePolicy::Maximum :
+ TQSizePolicy::Preferred,
isVertical() ?
- QSizePolicy::Preferred :
- QSizePolicy::Maximum ));
+ TQSizePolicy::Preferred :
+ TQSizePolicy::Maximum ));
}
Qt::Orientation KURLBar::orientation() const
@@ -400,7 +400,7 @@ void KURLBar::setListBox( KURLBarListBox *view )
else {
m_listBox = view;
if ( m_listBox->parentWidget() != this )
- m_listBox->reparent( this, QPoint(0,0) );
+ m_listBox->reparent( this, TQPoint(0,0) );
m_listBox->resize( width(), height() );
}
@@ -408,15 +408,15 @@ void KURLBar::setListBox( KURLBarListBox *view )
paletteChange( palette() );
m_listBox->setFocusPolicy( TabFocus );
- connect( m_listBox, SIGNAL( mouseButtonClicked( int, QListBoxItem *, const QPoint & ) ),
- SLOT( slotSelected( int, QListBoxItem * )));
- connect( m_listBox, SIGNAL( dropped( QDropEvent * )),
- this, SLOT( slotDropped( QDropEvent * )));
- connect( m_listBox, SIGNAL( contextMenuRequested( QListBoxItem *,
- const QPoint& )),
- SLOT( slotContextMenuRequested( QListBoxItem *, const QPoint& )));
- connect( m_listBox, SIGNAL( returnPressed( QListBoxItem * ) ),
- SLOT( slotSelected( QListBoxItem * ) ));
+ connect( m_listBox, TQT_SIGNAL( mouseButtonClicked( int, TQListBoxItem *, const TQPoint & ) ),
+ TQT_SLOT( slotSelected( int, TQListBoxItem * )));
+ connect( m_listBox, TQT_SIGNAL( dropped( TQDropEvent * )),
+ this, TQT_SLOT( slotDropped( TQDropEvent * )));
+ connect( m_listBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem *,
+ const TQPoint& )),
+ TQT_SLOT( slotContextMenuRequested( TQListBoxItem *, const TQPoint& )));
+ connect( m_listBox, TQT_SIGNAL( returnPressed( TQListBoxItem * ) ),
+ TQT_SLOT( slotSelected( TQListBoxItem * ) ));
}
void KURLBar::setIconSize( int size )
@@ -442,29 +442,29 @@ void KURLBar::clear()
m_listBox->clear();
}
-void KURLBar::resizeEvent( QResizeEvent *e )
+void KURLBar::resizeEvent( TQResizeEvent *e )
{
- QFrame::resizeEvent( e );
+ TQFrame::resizeEvent( e );
m_listBox->resize( width(), height() );
}
-void KURLBar::paletteChange( const QPalette & )
+void KURLBar::paletteChange( const TQPalette & )
{
- QPalette pal = palette();
- QColor gray = pal.color( QPalette::Normal, QColorGroup::Background );
- QColor selectedTextColor = pal.color( QPalette::Normal, QColorGroup::BrightText );
- QColor foreground = pal.color( QPalette::Normal, QColorGroup::Foreground );
- pal.setColor( QPalette::Normal, QColorGroup::Base, gray );
- pal.setColor( QPalette::Normal, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Normal, QColorGroup::Text, foreground );
- pal.setColor( QPalette::Inactive, QColorGroup::Base, gray );
- pal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, selectedTextColor );
- pal.setColor( QPalette::Inactive, QColorGroup::Text, foreground );
+ TQPalette pal = palette();
+ TQColor gray = pal.color( TQPalette::Normal, TQColorGroup::Background );
+ TQColor selectedTextColor = pal.color( TQPalette::Normal, TQColorGroup::BrightText );
+ TQColor foreground = pal.color( TQPalette::Normal, TQColorGroup::Foreground );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Normal, TQColorGroup::Text, foreground );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Base, gray );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, selectedTextColor );
+ pal.setColor( TQPalette::Inactive, TQColorGroup::Text, foreground );
setPalette( pal );
}
-QSize KURLBar::sizeHint() const
+TQSize KURLBar::sizeHint() const
{
return m_listBox->sizeHint();
@@ -482,7 +482,7 @@ QSize KURLBar::sizeHint() const
item;
item = static_cast<KURLBarItem*>( item->next() ) ) {
- QSize sh = item->sizeHint();
+ TQSize sh = item->sizeHint();
if ( vertical ) {
w = QMAX( w, sh.width() );
@@ -500,21 +500,21 @@ QSize KURLBar::sizeHint() const
// h += m_listBox->horizontalScrollBar()->height();
if ( w == 0 && h == 0 )
- return QSize( 100, 200 );
+ return TQSize( 100, 200 );
else
- return QSize( 6 + w, h );
+ return TQSize( 6 + w, h );
#endif
}
-QSize KURLBar::minimumSizeHint() const
+TQSize KURLBar::minimumSizeHint() const
{
- QSize s = sizeHint(); // ###
+ TQSize s = sizeHint(); // ###
int w = s.width() + m_listBox->verticalScrollBar()->width();
int h = s.height() + m_listBox->horizontalScrollBar()->height();
- return QSize( w, h );
+ return TQSize( w, h );
}
-void KURLBar::slotSelected( int button, QListBoxItem *item )
+void KURLBar::slotSelected( int button, TQListBoxItem *item )
{
if ( button != Qt::LeftButton )
return;
@@ -522,7 +522,7 @@ void KURLBar::slotSelected( int button, QListBoxItem *item )
slotSelected( item );
}
-void KURLBar::slotSelected( QListBoxItem *item )
+void KURLBar::slotSelected( TQListBoxItem *item )
{
if ( item && item != m_activeItem )
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -537,13 +537,13 @@ void KURLBar::setCurrentItem( const KURL& url )
{
d->currentURL = url;
- QString u = url.url(-1);
+ TQString u = url.url(-1);
if ( m_activeItem && m_activeItem->url().url(-1) == u )
return;
bool hasURL = false;
- QListBoxItem *item = m_listBox->firstItem();
+ TQListBoxItem *item = m_listBox->firstItem();
while ( item ) {
if ( static_cast<KURLBarItem*>( item )->url().url(-1) == u ) {
m_activeItem = static_cast<KURLBarItem*>( item );
@@ -563,7 +563,7 @@ void KURLBar::setCurrentItem( const KURL& url )
KURLBarItem * KURLBar::currentItem() const
{
- QListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
+ TQListBoxItem *item = m_listBox->item( m_listBox->currentItem() );
if ( item )
return static_cast<KURLBarItem *>( item );
return 0L;
@@ -575,7 +575,7 @@ KURL KURLBar::currentURL() const
return item ? item->url() : KURL();
}
-void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
+void KURLBar::readConfig( KConfig *appConfig, const TQString& itemGroup )
{
m_isImmutable = appConfig->groupIsImmutable( itemGroup );
KConfigGroupSaver cs( appConfig, itemGroup );
@@ -584,7 +584,7 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
if ( m_useGlobal ) { // read global items
KConfig *globalConfig = KGlobal::config();
- KConfigGroupSaver cs( globalConfig, (QString)(itemGroup +" (Global)"));
+ KConfigGroupSaver cs( globalConfig, (TQString)(itemGroup +" (Global)"));
int num = globalConfig->readNumEntry( "Number of Entries" );
for ( int i = 0; i < num; i++ ) {
readItem( i, globalConfig, false );
@@ -600,20 +600,20 @@ void KURLBar::readConfig( KConfig *appConfig, const QString& itemGroup )
void KURLBar::readItem( int i, KConfig *config, bool applicationLocal )
{
- QString number = QString::number( i );
- KURL url = KURL::fromPathOrURL( config->readPathEntry( QString("URL_") + number ));
+ TQString number = TQString::number( i );
+ KURL url = KURL::fromPathOrURL( config->readPathEntry( TQString("URL_") + number ));
if ( !url.isValid() || !KProtocolInfo::isKnownProtocol( url ))
return; // nothing we could do.
insertItem( url,
- config->readEntry( QString("Description_") + number ),
+ config->readEntry( TQString("Description_") + number ),
applicationLocal,
- config->readEntry( QString("Icon_") + number ),
+ config->readEntry( TQString("Icon_") + number ),
static_cast<KIcon::Group>(
- config->readNumEntry( QString("IconGroup_") + number )) );
+ config->readNumEntry( TQString("IconGroup_") + number )) );
}
-void KURLBar::writeConfig( KConfig *config, const QString& itemGroup )
+void KURLBar::writeConfig( KConfig *config, const TQString& itemGroup )
{
KConfigGroupSaver cs1( config, itemGroup );
if(!config->hasDefault("Speedbar IconSize") && m_iconSize == d->defaultIconSize )
@@ -678,12 +678,12 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
if ( !item->isPersistent() )
return;
- QString Description = "Description_";
- QString URL = "URL_";
- QString Icon = "Icon_";
- QString IconGroup = "IconGroup_";
+ TQString Description = "Description_";
+ TQString URL = "URL_";
+ TQString Icon = "Icon_";
+ TQString IconGroup = "IconGroup_";
- QString number = QString::number( i );
+ TQString number = TQString::number( i );
config->writePathEntry( URL + number, item->url().prettyURL(), true, global );
config->writeEntry( Description + number, item->description(),true,global);
@@ -692,13 +692,13 @@ void KURLBar::writeItem( KURLBarItem *item, int i, KConfig *config,
}
-void KURLBar::slotDropped( QDropEvent *e )
+void KURLBar::slotDropped( TQDropEvent *e )
{
KURL::List urls;
if ( KURLDrag::decode( e, urls ) ) {
KURL url;
- QString description;
- QString icon;
+ TQString description;
+ TQString icon;
bool appLocal = false;
KURL::List::Iterator it = urls.begin();
@@ -710,7 +710,7 @@ void KURLBar::slotDropped( QDropEvent *e )
}
}
-void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
+void KURLBar::slotContextMenuRequested( TQListBoxItem *_item, const TQPoint& pos )
{
if (m_isImmutable)
return;
@@ -725,7 +725,7 @@ void KURLBar::slotContextMenuRequested( QListBoxItem *_item, const QPoint& pos )
KURL lastURL = m_activeItem ? m_activeItem->url() : KURL();
bool smallIcons = m_iconSize < KIcon::SizeMedium;
- QPopupMenu *popup = new QPopupMenu();
+ TQPopupMenu *popup = new TQPopupMenu();
popup->insertItem( smallIcons ?
i18n("&Large Icons") : i18n("&Small Icons"),
IconSize );
@@ -789,8 +789,8 @@ bool KURLBar::editItem( KURLBarItem *item )
return false;
KURL url = item->url();
- QString description = item->description();
- QString icon = item->icon();
+ TQString description = item->description();
+ TQString icon = item->icon();
bool appLocal = item->applicationLocal();
if ( KURLBarItemDialog::getInformation( m_useGlobal,
@@ -815,7 +815,7 @@ bool KURLBar::editItem( KURLBarItem *item )
///////////////////////////////////////////////////////////////////
-KURLBarListBox::KURLBarListBox( QWidget *parent, const char *name )
+KURLBarListBox::KURLBarListBox( TQWidget *parent, const char *name )
: KListBox( parent, name )
{
m_toolTip = new KURLBarToolTip( this );
@@ -828,14 +828,14 @@ KURLBarListBox::~KURLBarListBox()
delete m_toolTip;
}
-void KURLBarListBox::paintEvent( QPaintEvent* )
+void KURLBarListBox::paintEvent( TQPaintEvent* )
{
- QPainter p(this);
+ TQPainter p(this);
p.setPen( colorGroup().mid() );
p.drawRect( 0, 0, width(), height() );
}
-QDragObject * KURLBarListBox::dragObject()
+TQDragObject * KURLBarListBox::dragObject()
{
KURL::List urls;
KURLBarItem *item = static_cast<KURLBarItem*>( firstItem() );
@@ -852,17 +852,17 @@ QDragObject * KURLBarListBox::dragObject()
return 0L;
}
-void KURLBarListBox::contentsDragEnterEvent( QDragEnterEvent *e )
+void KURLBarListBox::contentsDragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KURLDrag::canDecode( e ));
}
-void KURLBarListBox::contentsDropEvent( QDropEvent *e )
+void KURLBarListBox::contentsDropEvent( TQDropEvent *e )
{
emit dropped( e );
}
-void KURLBarListBox::contextMenuEvent( QContextMenuEvent *e )
+void KURLBarListBox::contextMenuEvent( TQContextMenuEvent *e )
{
if (e)
{
@@ -890,15 +890,15 @@ void KURLBarListBox::setOrientation( Qt::Orientation orient )
bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent )
+ TQWidget *parent )
{
KURLBarItemDialog *dialog = new KURLBarItemDialog( allowGlobal, url,
description, icon,
appLocal,
iconSize, parent );
- if ( dialog->exec() == QDialog::Accepted ) {
+ if ( dialog->exec() == TQDialog::Accepted ) {
// set the return parameters
url = dialog->url();
description = dialog->description();
@@ -914,63 +914,63 @@ bool KURLBarItemDialog::getInformation( bool allowGlobal, KURL& url,
}
KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description,
- QString icon, bool appLocal,
+ const TQString& description,
+ TQString icon, bool appLocal,
int iconSize,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: KDialogBase( parent, name, true,
i18n("Edit Quick Access Entry"), Ok | Cancel, Ok, true )
{
- QVBox *box = new QVBox( this );
- QString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
- QLabel *label = new QLabel( text, box );
+ TQVBox *box = new TQVBox( this );
+ TQString text = i18n("<qt><b>Please provide a description, URL and icon for this Quick Access entry.</b></br></qt>");
+ TQLabel *label = new TQLabel( text, box );
box->setSpacing( spacingHint() );
- QGrid *grid = new QGrid( 2, box );
+ TQGrid *grid = new TQGrid( 2, box );
grid->setSpacing( spacingHint() );
- QString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
+ TQString whatsThisText = i18n("<qt>This is the text that will appear in the Quick Access panel.<p>"
"The description should consist of one or two words "
"that will help you remember what this entry refers to.</qt>");
- label = new QLabel( i18n("&Description:"), grid );
+ label = new TQLabel( i18n("&Description:"), grid );
m_edit = new KLineEdit( grid, "description edit" );
m_edit->setText( description.isEmpty() ? url.fileName() : description );
label->setBuddy( m_edit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_edit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_edit, whatsThisText );
whatsThisText = i18n("<qt>This is the location associated with the entry. Any valid URL may be used. For example:<p>"
"%1<br>http://www.kde.org<br>ftp://ftp.kde.org/pub/kde/stable<p>"
"By clicking on the button next to the text edit box you can browse to an "
- "appropriate URL.</qt>").arg(QDir::homeDirPath());
- label = new QLabel( i18n("&URL:"), grid );
+ "appropriate URL.</qt>").arg(TQDir::homeDirPath());
+ label = new TQLabel( i18n("&URL:"), grid );
m_urlEdit = new KURLRequester( url.prettyURL(), grid );
m_urlEdit->setMode( KFile::Directory );
label->setBuddy( m_urlEdit );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_urlEdit, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_urlEdit, whatsThisText );
whatsThisText = i18n("<qt>This is the icon that will appear in the Quick Access panel.<p>"
"Click on the button to select a different icon.</qt>");
- label = new QLabel( i18n("Choose an &icon:"), grid );
+ label = new TQLabel( i18n("Choose an &icon:"), grid );
m_iconButton = new KIconButton( grid, "icon button" );
m_iconButton->setIconSize( iconSize );
if ( icon.isEmpty() )
icon = KMimeType::iconForURL( url );
m_iconButton->setIcon( icon );
label->setBuddy( m_iconButton );
- QWhatsThis::add( label, whatsThisText );
- QWhatsThis::add( m_iconButton, whatsThisText );
+ TQWhatsThis::add( label, whatsThisText );
+ TQWhatsThis::add( m_iconButton, whatsThisText );
if ( allowGlobal ) {
- QString appName;
+ TQString appName;
if ( KGlobal::instance()->aboutData() )
appName = KGlobal::instance()->aboutData()->programName();
if ( appName.isEmpty() )
- appName = QString::fromLatin1( KGlobal::instance()->instanceName() );
- m_appLocal = new QCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
+ appName = TQString::fromLatin1( KGlobal::instance()->instanceName() );
+ m_appLocal = new TQCheckBox( i18n("&Only show when using this application (%1)").arg( appName ), box );
m_appLocal->setChecked( appLocal );
- QWhatsThis::add( m_appLocal,
+ TQWhatsThis::add( m_appLocal,
i18n("<qt>Select this setting if you want this "
"entry to show only when using the current application (%1).<p>"
"If this setting is not selected, the entry will be available in all "
@@ -979,7 +979,7 @@ KURLBarItemDialog::KURLBarItemDialog( bool allowGlobal, const KURL& url,
}
else
m_appLocal = 0L;
- connect(m_urlEdit->lineEdit(),SIGNAL(textChanged ( const QString & )),this,SLOT(urlChanged(const QString & )));
+ connect(m_urlEdit->lineEdit(),TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(urlChanged(const TQString & )));
m_edit->setFocus();
setMainWidget( box );
}
@@ -988,14 +988,14 @@ KURLBarItemDialog::~KURLBarItemDialog()
{
}
-void KURLBarItemDialog::urlChanged(const QString & text )
+void KURLBarItemDialog::urlChanged(const TQString & text )
{
enableButtonOK( !text.isEmpty() );
}
KURL KURLBarItemDialog::url() const
{
- QString text = m_urlEdit->url();
+ TQString text = m_urlEdit->url();
KURL u;
if ( text.at(0) == '/' )
u.setPath( text );
@@ -1005,12 +1005,12 @@ KURL KURLBarItemDialog::url() const
return u;
}
-QString KURLBarItemDialog::description() const
+TQString KURLBarItemDialog::description() const
{
return m_edit->text();
}
-QString KURLBarItemDialog::icon() const
+TQString KURLBarItemDialog::icon() const
{
return m_iconButton->icon();
}