summaryrefslogtreecommitdiffstats
path: root/kio/kfile
diff options
context:
space:
mode:
Diffstat (limited to 'kio/kfile')
-rw-r--r--kio/kfile/config-kfile.h30
-rw-r--r--kio/kfile/images.h16
-rw-r--r--kio/kfile/kacleditwidget.cpp202
-rw-r--r--kio/kfile/kacleditwidget.h8
-rw-r--r--kio/kfile/kacleditwidget_p.h62
-rw-r--r--kio/kfile/kcombiview.cpp38
-rw-r--r--kio/kfile/kcombiview.h18
-rw-r--r--kio/kfile/kcustommenueditor.cpp80
-rw-r--r--kio/kfile/kcustommenueditor.h2
-rw-r--r--kio/kfile/kdiroperator.cpp414
-rw-r--r--kio/kfile/kdiroperator.h92
-rw-r--r--kio/kfile/kdirselectdialog.cpp122
-rw-r--r--kio/kfile/kdirselectdialog.h32
-rw-r--r--kio/kfile/kdirsize.cpp16
-rw-r--r--kio/kfile/kdiskfreesp.cpp38
-rw-r--r--kio/kfile/kdiskfreesp.h18
-rw-r--r--kio/kfile/kencodingfiledialog.cpp72
-rw-r--r--kio/kfile/kencodingfiledialog.h94
-rw-r--r--kio/kfile/kfile.h26
-rw-r--r--kio/kfile/kfilebookmarkhandler.cpp10
-rw-r--r--kio/kfile/kfilebookmarkhandler.h12
-rw-r--r--kio/kfile/kfiledetailview.cpp176
-rw-r--r--kio/kfile/kfiledetailview.h68
-rw-r--r--kio/kfile/kfiledialog.cpp508
-rw-r--r--kio/kfile/kfiledialog.h184
-rw-r--r--kio/kfile/kfilefiltercombo.cpp46
-rw-r--r--kio/kfile/kfilefiltercombo.h22
-rw-r--r--kio/kfile/kfileiconview.cpp238
-rw-r--r--kio/kfile/kfileiconview.h64
-rw-r--r--kio/kfile/kfilemetainfowidget.cpp214
-rw-r--r--kio/kfile/kfilemetainfowidget.h54
-rw-r--r--kio/kfile/kfilemetapreview.cpp30
-rw-r--r--kio/kfile/kfilemetapreview.h16
-rw-r--r--kio/kfile/kfilepreview.cpp50
-rw-r--r--kio/kfile/kfilepreview.h26
-rw-r--r--kio/kfile/kfilesharedlg.cpp66
-rw-r--r--kio/kfile/kfilesharedlg.h12
-rw-r--r--kio/kfile/kfilespeedbar.cpp44
-rw-r--r--kio/kfile/kfilespeedbar.h4
-rw-r--r--kio/kfile/kfiletreebranch.cpp58
-rw-r--r--kio/kfile/kfiletreebranch.h30
-rw-r--r--kio/kfile/kfiletreeview.cpp150
-rw-r--r--kio/kfile/kfiletreeview.h94
-rw-r--r--kio/kfile/kfiletreeviewitem.cpp6
-rw-r--r--kio/kfile/kfiletreeviewitem.h8
-rw-r--r--kio/kfile/kfileview.cpp76
-rw-r--r--kio/kfile/kfileview.h68
-rw-r--r--kio/kfile/kicondialog.cpp198
-rw-r--r--kio/kfile/kicondialog.h72
-rw-r--r--kio/kfile/kimagefilepreview.cpp58
-rw-r--r--kio/kfile/kimagefilepreview.h20
-rw-r--r--kio/kfile/kmetaprops.cpp92
-rw-r--r--kio/kfile/kmetaprops.h14
-rw-r--r--kio/kfile/knotifydialog.cpp326
-rw-r--r--kio/kfile/knotifydialog.h76
-rw-r--r--kio/kfile/kopenwith.cpp254
-rw-r--r--kio/kfile/kopenwith.h38
-rw-r--r--kio/kfile/kopenwith_p.h32
-rw-r--r--kio/kfile/kpreviewprops.cpp14
-rw-r--r--kio/kfile/kpreviewprops.h2
-rw-r--r--kio/kfile/kpreviewwidgetbase.cpp16
-rw-r--r--kio/kfile/kpreviewwidgetbase.h12
-rw-r--r--kio/kfile/kpropertiesdialog.cpp1132
-rw-r--r--kio/kfile/kpropertiesdialog.h154
-rw-r--r--kio/kfile/krecentdirs.cpp22
-rw-r--r--kio/kfile/krecentdirs.h8
-rw-r--r--kio/kfile/krecentdocument.cpp90
-rw-r--r--kio/kfile/krecentdocument.h10
-rw-r--r--kio/kfile/kurlbar.cpp316
-rw-r--r--kio/kfile/kurlbar.h112
-rw-r--r--kio/kfile/kurlcombobox.cpp62
-rw-r--r--kio/kfile/kurlcombobox.h44
-rw-r--r--kio/kfile/kurlrequester.cpp100
-rw-r--r--kio/kfile/kurlrequester.h32
-rw-r--r--kio/kfile/kurlrequesterdlg.cpp36
-rw-r--r--kio/kfile/kurlrequesterdlg.h18
-rw-r--r--kio/kfile/tests/kdirselectdialogtest.cpp4
-rw-r--r--kio/kfile/tests/kfdtest.cpp16
-rw-r--r--kio/kfile/tests/kfdtest.h6
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.cpp44
-rw-r--r--kio/kfile/tests/kfiletreeviewtest.h2
-rw-r--r--kio/kfile/tests/kfstest.cpp74
-rw-r--r--kio/kfile/tests/kopenwithtest.cpp8
-rw-r--r--kio/kfile/tests/kurlrequestertest.cpp2
84 files changed, 3615 insertions, 3615 deletions
diff --git a/kio/kfile/config-kfile.h b/kio/kfile/config-kfile.h
index 3666c571b..8715ed273 100644
--- a/kio/kfile/config-kfile.h
+++ b/kio/kfile/config-kfile.h
@@ -3,7 +3,7 @@
const int kfile_area = 250;
-#define DefaultViewStyle QString::fromLatin1("SimpleView")
+#define DefaultViewStyle TQString::fromLatin1("SimpleView")
#define DefaultPannerPosition 40
#define DefaultMixDirsAndFiles false
#define DefaultShowStatusLine false
@@ -14,19 +14,19 @@ const int kfile_area = 250;
#define DefaultRecentURLsNumber 15
#define DefaultDirectoryFollowing true
#define DefaultAutoSelectExtChecked true
-#define ConfigGroup QString::fromLatin1("KFileDialog Settings")
-#define RecentURLs QString::fromLatin1("Recent URLs")
-#define RecentFiles QString::fromLatin1("Recent Files")
-#define RecentURLsNumber QString::fromLatin1("Maximum of recent URLs")
-#define RecentFilesNumber QString::fromLatin1("Maximum of recent files")
-#define DialogWidth QString::fromLatin1("Width (%1)")
-#define DialogHeight QString::fromLatin1("Height (%1)")
-#define ConfigShowStatusLine QString::fromLatin1("ShowStatusLine")
-#define AutoDirectoryFollowing QString::fromLatin1("Automatic directory following")
-#define PathComboCompletionMode QString::fromLatin1("PathCombo Completionmode")
-#define LocationComboCompletionMode QString::fromLatin1("LocationCombo Completionmode")
-#define ShowSpeedbar QString::fromLatin1("Show Speedbar")
-#define ShowBookmarks QString::fromLatin1("Show Bookmarks")
-#define AutoSelectExtChecked QString::fromLatin1("Automatically select filename extension")
+#define ConfigGroup TQString::fromLatin1("KFileDialog Settings")
+#define RecentURLs TQString::fromLatin1("Recent URLs")
+#define RecentFiles TQString::fromLatin1("Recent Files")
+#define RecentURLsNumber TQString::fromLatin1("Maximum of recent URLs")
+#define RecentFilesNumber TQString::fromLatin1("Maximum of recent files")
+#define DialogWidth TQString::fromLatin1("Width (%1)")
+#define DialogHeight TQString::fromLatin1("Height (%1)")
+#define ConfigShowStatusLine TQString::fromLatin1("ShowStatusLine")
+#define AutoDirectoryFollowing TQString::fromLatin1("Automatic directory following")
+#define PathComboCompletionMode TQString::fromLatin1("PathCombo Completionmode")
+#define LocationComboCompletionMode TQString::fromLatin1("LocationCombo Completionmode")
+#define ShowSpeedbar TQString::fromLatin1("Show Speedbar")
+#define ShowBookmarks TQString::fromLatin1("Show Bookmarks")
+#define AutoSelectExtChecked TQString::fromLatin1("Automatically select filename extension")
#endif
diff --git a/kio/kfile/images.h b/kio/kfile/images.h
index 0c7bd1c37..f544e2f0a 100644
--- a/kio/kfile/images.h
+++ b/kio/kfile/images.h
@@ -1,8 +1,8 @@
#ifdef USE_POSIX_ACL
#ifndef _QEMBED_1804289383
#define _QEMBED_1804289383
-#include <qimage.h>
-#include <qdict.h>
+#include <tqimage.h>
+#include <tqdict.h>
static const QRgb group_grey_data[] = {
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x42484848,0xc39b9b9b,0xeab1b1b1,0xce9d9d9d,0x5a4d4d4d,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x563b3b3b,0xfdaeaeae,0xffcfcfcf,0xffcccccc,0xffcecece,
@@ -245,20 +245,20 @@ static struct EmbedImage {
{ 0, 0, 0, 0, 0, 0, 0, 0 }
};
-static const QImage& qembed_findImage( const QString& name )
+static const TQImage& qembed_findImage( const TQString& name )
{
- static QDict<QImage> dict;
- QImage* img = dict.find( name );
+ static TQDict<TQImage> dict;
+ TQImage* img = dict.find( name );
if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {
- img = new QImage((uchar*)embed_image_vec[i].data,
+ img = new TQImage((uchar*)embed_image_vec[i].data,
embed_image_vec[i].width,
embed_image_vec[i].height,
embed_image_vec[i].depth,
(QRgb*)embed_image_vec[i].colorTable,
embed_image_vec[i].numColors,
- QImage::BigEndian );
+ TQImage::BigEndian );
if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE );
dict.insert( name, img );
@@ -266,7 +266,7 @@ static const QImage& qembed_findImage( const QString& name )
}
}
if ( !img ) {
- static QImage dummy;
+ static TQImage dummy;
return dummy;
}
}
diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp
index 41a5af7bd..7f253f8c5 100644
--- a/kio/kfile/kacleditwidget.cpp
+++ b/kio/kfile/kacleditwidget.cpp
@@ -24,19 +24,19 @@
#ifdef USE_POSIX_ACL
-#include <qpainter.h>
-#include <qptrlist.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qpushbutton.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qwidgetstack.h>
-#include <qheader.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqpushbutton.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqwidgetstack.h>
+#include <tqheader.h>
#include <klocale.h>
#include <kfileitem.h>
@@ -58,7 +58,7 @@ extern "C" {
static struct {
const char* label;
const char* pixmapName;
- QPixmap* pixmap;
+ TQPixmap* pixmap;
} s_itemAttributes[] = {
{ I18N_NOOP( "Owner" ), "user-grey", 0 },
{ I18N_NOOP( "Owning Group" ), "group-grey", 0 },
@@ -68,24 +68,24 @@ static struct {
{ I18N_NOOP( "Named Group" ), "group", 0 },
};
-KACLEditWidget::KACLEditWidget( QWidget *parent, const char *name )
- :QWidget( parent, name )
+KACLEditWidget::KACLEditWidget( TQWidget *parent, const char *name )
+ :TQWidget( parent, name )
{
- QHBox *hbox = new QHBox( parent );
+ TQHBox *hbox = new TQHBox( parent );
hbox->setSpacing( KDialog::spacingHint() );
m_listView = new KACLListView( hbox, "acl_listview" );
- connect( m_listView, SIGNAL( selectionChanged() ),
- this, SLOT( slotUpdateButtons() ) );
- QVBox *vbox = new QVBox( hbox );
+ connect( m_listView, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotUpdateButtons() ) );
+ TQVBox *vbox = new TQVBox( hbox );
vbox->setSpacing( KDialog::spacingHint() );
- m_AddBtn = new QPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
- connect( m_AddBtn, SIGNAL( clicked() ), m_listView, SLOT( slotAddEntry() ) );
- m_EditBtn = new QPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
- connect( m_EditBtn, SIGNAL( clicked() ), m_listView, SLOT( slotEditEntry() ) );
- m_DelBtn = new QPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
- connect( m_DelBtn, SIGNAL( clicked() ), m_listView, SLOT( slotRemoveEntry() ) );
- QWidget *spacer = new QWidget( vbox );
- spacer->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
+ m_AddBtn = new TQPushButton( i18n( "Add Entry..." ), vbox, "add_entry_button" );
+ connect( m_AddBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotAddEntry() ) );
+ m_EditBtn = new TQPushButton( i18n( "Edit Entry..." ), vbox, "edit_entry_button" );
+ connect( m_EditBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotEditEntry() ) );
+ m_DelBtn = new TQPushButton( i18n( "Delete Entry" ), vbox, "delete_entry_button" );
+ connect( m_DelBtn, TQT_SIGNAL( clicked() ), m_listView, TQT_SLOT( slotRemoveEntry() ) );
+ TQWidget *spacer = new TQWidget( vbox );
+ spacer->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding );
slotUpdateButtons();
}
@@ -94,7 +94,7 @@ void KACLEditWidget::slotUpdateButtons()
bool atLeastOneIsNotDeletable = false;
bool atLeastOneIsNotAllowedToChangeType = false;
int selectedCount = 0;
- QListViewItemIterator it( m_listView, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( m_listView, TQListViewItemIterator::Selected );
while ( KACLListViewItem *item = dynamic_cast<KACLListViewItem*>( it.current() ) ) {
++it; ++selectedCount;
if ( !item->isDeletable() )
@@ -139,10 +139,10 @@ void KACLEditWidget::setReadOnly( bool on )
slotUpdateButtons();
}
-KACLListViewItem::KACLListViewItem( QListView* parent,
+KACLListViewItem::KACLListViewItem( TQListView* parent,
KACLListView::EntryType _type,
unsigned short _value, bool defaults,
- const QString& _qualifier )
+ const TQString& _qualifier )
: KListViewItem( parent, parent->lastItem() ), // we want to append
type( _type ), value( _value ), isDefault( defaults ),
qualifier( _qualifier ), isPartial( false )
@@ -157,9 +157,9 @@ KACLListViewItem::~ KACLListViewItem()
}
-QString KACLListViewItem::key( int, bool ) const
+TQString KACLListViewItem::key( int, bool ) const
{
- QString key;
+ TQString key;
if ( !isDefault )
key = "A";
else
@@ -191,17 +191,17 @@ QString KACLListViewItem::key( int, bool ) const
return key;
}
-void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
+void KACLListViewItem::paintCell( TQPainter* p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup mycg = cg;
+ TQColorGroup mycg = cg;
if ( isDefault ) {
- mycg.setColor( QColorGroup::Text, QColor( 0, 0, 255 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 0, 0, 255 ) );
}
if ( isPartial ) {
- QFont font = p->font();
+ TQFont font = p->font();
font.setItalic( true );
- mycg.setColor( QColorGroup::Text, QColor( 100, 100, 100 ) );
+ mycg.setColor( TQColorGroup::Text, TQColor( 100, 100, 100 ) );
p->setFont( font );
}
KListViewItem::paintCell( p, mycg, column, width, alignment );
@@ -213,7 +213,7 @@ void KACLListViewItem::paintCell( QPainter* p, const QColorGroup &cg,
const bool lastNonDefault = !isDefault && below && below->isDefault;
if ( type == KACLListView::Mask || lastUser || lastNonDefault )
{
- p->setPen( QPen( Qt::gray, 0, QPen::DotLine ) );
+ p->setPen( TQPen( Qt::gray, 0, TQPen::DotLine ) );
if ( type == KACLListView::Mask )
p->drawLine( 0, 0, width - 1, 0 );
p->drawLine( 0, height() - 1, width - 1, height() - 1 );
@@ -230,21 +230,21 @@ void KACLListViewItem::updatePermPixmaps()
else if ( partialPerms & ACL_READ )
setPixmap( 2, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 2, QPixmap() );
+ setPixmap( 2, TQPixmap() );
if ( value & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_WRITE )
setPixmap( 3, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 3, QPixmap() );
+ setPixmap( 3, TQPixmap() );
if ( value & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPixmap() );
else if ( partialPerms & ACL_EXECUTE )
setPixmap( 4, m_pACLListView->getYesPartialPixmap() );
else
- setPixmap( 4, QPixmap() );
+ setPixmap( 4, TQPixmap() );
}
void KACLListViewItem::repaint()
@@ -285,7 +285,7 @@ void KACLListViewItem::repaint()
void KACLListViewItem::calcEffectiveRights()
{
- QString strEffective = QString( "---" );
+ TQString strEffective = TQString( "---" );
// Do we need to worry about the mask entry? It applies to named users,
// owning group, and named groups
@@ -387,10 +387,10 @@ void KACLListViewItem::togglePerm( acl_perm_t perm )
EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes, int allowedDefaultTypes,
bool allowDefaults )
: KDialogBase( listView, "edit_entry_dialog", true,
@@ -401,54 +401,54 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
m_allowedTypes( allowedTypes ), m_allowedDefaultTypes( allowedDefaultTypes ),
m_defaultCB( 0 )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *mainLayout = new QVBoxLayout( page, 0, spacingHint(), "mainLayout" );
- m_buttonGroup = new QVButtonGroup( i18n("Entry Type"), page, "bg" );
+ TQVBoxLayout *mainLayout = new TQVBoxLayout( page, 0, spacingHint(), "mainLayout" );
+ m_buttonGroup = new TQVButtonGroup( i18n("Entry Type"), page, "bg" );
if ( allowDefaults ) {
- m_defaultCB = new QCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
+ m_defaultCB = new TQCheckBox( i18n("Default for new files in this folder"), page, "defaultCB" );
mainLayout->addWidget( m_defaultCB );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedUsersAndGroups() ) );
- connect( m_defaultCB, SIGNAL( toggled( bool ) ),
- this, SLOT( slotUpdateAllowedTypes() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedUsersAndGroups() ) );
+ connect( m_defaultCB, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SLOT( slotUpdateAllowedTypes() ) );
}
mainLayout->addWidget( m_buttonGroup );
- QRadioButton *ownerType = new QRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
+ TQRadioButton *ownerType = new TQRadioButton( i18n("Owner"), m_buttonGroup, "ownerType" );
m_buttonGroup->insert( ownerType, KACLListView::User );
- QRadioButton *owningGroupType = new QRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
+ TQRadioButton *owningGroupType = new TQRadioButton( i18n("Owning Group"), m_buttonGroup, "owningGroupType" );
m_buttonGroup->insert( owningGroupType, KACLListView::Group );
- QRadioButton *othersType = new QRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
+ TQRadioButton *othersType = new TQRadioButton( i18n("Others"), m_buttonGroup, "othersType" );
m_buttonGroup->insert( othersType, KACLListView::Others );
- QRadioButton *maskType = new QRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
+ TQRadioButton *maskType = new TQRadioButton( i18n("Mask"), m_buttonGroup, "maskType" );
m_buttonGroup->insert( maskType, KACLListView::Mask );
- QRadioButton *namedUserType = new QRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
+ TQRadioButton *namedUserType = new TQRadioButton( i18n("Named User"), m_buttonGroup, "namesUserType" );
m_buttonGroup->insert( namedUserType, KACLListView::NamedUser );
- QRadioButton *namedGroupType = new QRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
+ TQRadioButton *namedGroupType = new TQRadioButton( i18n("Named Group"), m_buttonGroup, "namedGroupType" );
m_buttonGroup->insert( namedGroupType, KACLListView::NamedGroup );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ),
- this, SLOT( slotSelectionChanged( int ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotSelectionChanged( int ) ) );
- m_widgetStack = new QWidgetStack( page );
+ m_widgetStack = new TQWidgetStack( page );
mainLayout->addWidget( m_widgetStack );
- QHBox *usersBox = new QHBox( m_widgetStack );
+ TQHBox *usersBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( usersBox, KACLListView::NamedUser );
- QHBox *groupsBox = new QHBox( m_widgetStack );
+ TQHBox *groupsBox = new TQHBox( m_widgetStack );
m_widgetStack->addWidget( groupsBox, KACLListView::NamedGroup );
- QLabel *usersLabel = new QLabel( i18n( "User: " ), usersBox );
- m_usersCombo = new QComboBox( false, usersBox, "users" );
+ TQLabel *usersLabel = new TQLabel( i18n( "User: " ), usersBox );
+ m_usersCombo = new TQComboBox( false, usersBox, "users" );
usersLabel->setBuddy( m_usersCombo );
- QLabel *groupsLabel = new QLabel( i18n( "Group: " ), groupsBox );
- m_groupsCombo = new QComboBox( false, groupsBox, "groups" );
+ TQLabel *groupsLabel = new TQLabel( i18n( "Group: " ), groupsBox );
+ m_groupsCombo = new TQComboBox( false, groupsBox, "groups" );
groupsLabel->setBuddy( m_groupsCombo );
if ( m_item ) {
@@ -470,7 +470,7 @@ EditACLEntryDialog::EditACLEntryDialog( KACLListView *listView, KACLListViewItem
slotSelectionChanged( KACLListView::NamedUser );
slotUpdateAllowedUsersAndGroups();
}
- incInitialSize( QSize( 100, 0 ) );
+ incInitialSize( TQSize( 100, 0 ) );
}
void EditACLEntryDialog::slotUpdateAllowedTypes()
@@ -489,8 +489,8 @@ void EditACLEntryDialog::slotUpdateAllowedTypes()
void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups()
{
- const QString oldUser = m_usersCombo->currentText();
- const QString oldGroup = m_groupsCombo->currentText();
+ const TQString oldUser = m_usersCombo->currentText();
+ const TQString oldGroup = m_groupsCombo->currentText();
m_usersCombo->clear();
m_groupsCombo->clear();
if ( m_defaultCB && m_defaultCB->isChecked() ) {
@@ -513,7 +513,7 @@ void EditACLEntryDialog::slotOk()
{
KACLListView::EntryType type = static_cast<KACLListView::EntryType>( m_buttonGroup->selectedId() );
- QString qualifier;
+ TQString qualifier;
if ( type == KACLListView::NamedUser )
qualifier = m_usersCombo->currentText();
if ( type == KACLListView::NamedGroup )
@@ -555,7 +555,7 @@ void EditACLEntryDialog::slotSelectionChanged( int id )
}
-KACLListView::KACLListView( QWidget* parent, const char* name )
+KACLListView::KACLListView( TQWidget* parent, const char* name )
: KListView( parent, name ),
m_hasMask( false ), m_allowDefaults( false )
{
@@ -571,25 +571,25 @@ KACLListView::KACLListView( QWidget* parent, const char* name )
// Load the avatars
for ( int i=0; i < LAST_IDX; ++i ) {
- s_itemAttributes[i].pixmap = new QPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
+ s_itemAttributes[i].pixmap = new TQPixmap( qembed_findImage( s_itemAttributes[i].pixmapName ) );
}
- m_yesPixmap = new QPixmap( qembed_findImage( "yes" ) );
- m_yesPartialPixmap = new QPixmap( qembed_findImage( "yespartial" ) );
+ m_yesPixmap = new TQPixmap( qembed_findImage( "yes" ) );
+ m_yesPartialPixmap = new TQPixmap( qembed_findImage( "yespartial" ) );
- setSelectionMode( QListView::Extended );
+ setSelectionMode( TQListView::Extended );
// fill the lists of all legal users and groups
struct passwd *user = 0;
setpwent();
while ( ( user = getpwent() ) != 0 ) {
- m_allUsers << QString::fromLatin1( user->pw_name );
+ m_allUsers << TQString::fromLatin1( user->pw_name );
}
endpwent();
struct group *gr = 0;
setgrent();
while ( ( gr = getgrent() ) != 0 ) {
- m_allGroups << QString::fromLatin1( gr->gr_name );
+ m_allGroups << TQString::fromLatin1( gr->gr_name );
}
endgrent();
m_allUsers.sort();
@@ -606,10 +606,10 @@ KACLListView::~KACLListView()
delete m_yesPartialPixmap;
}
-QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedUsers = m_allUsers;
- QListViewItemIterator it( this );
+ TQStringList allowedUsers = m_allUsers;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -620,10 +620,10 @@ QStringList KACLListView::allowedUsers( bool defaults, KACLListViewItem *allowed
return allowedUsers;
}
-QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
+TQStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowedItem )
{
- QStringList allowedGroups = m_allGroups;
- QListViewItemIterator it( this );
+ TQStringList allowedGroups = m_allGroups;
+ TQListViewItemIterator it( this );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( *it );
++it;
@@ -637,7 +637,7 @@ QStringList KACLListView::allowedGroups( bool defaults, KACLListViewItem *allowe
void KACLListView::fillItemsFromACL( const KACL &pACL, bool defaults )
{
// clear out old entries of that ilk
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( item->isDefault == defaults )
@@ -698,8 +698,8 @@ KACL KACLListView::itemsToACL( bool defaults ) const
bool atLeastOneEntry = false;
ACLUserPermissionsList users;
ACLGroupPermissionsList groups;
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
- while ( QListViewItem* qlvi = it.current() ) {
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ while ( TQListViewItem* qlvi = it.current() ) {
++it;
const KACLListViewItem* item = static_cast<KACLListViewItem*>( qlvi );
if ( item->isDefault != defaults ) continue;
@@ -747,9 +747,9 @@ KACL KACLListView::getDefaultACL()
return itemsToACL( true );
}
-void KACLListView::contentsMousePressEvent( QMouseEvent * e )
+void KACLListView::contentsMousePressEvent( TQMouseEvent * e )
{
- QListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
+ TQListViewItem *clickedItem = itemAt( contentsToViewport( e->pos() ) );
if ( !clickedItem ) return;
// if the click is on an as yet unselected item, select it first
if ( !clickedItem->isSelected() )
@@ -774,7 +774,7 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
KACLListViewItem* referenceItem = static_cast<KACLListViewItem*>( clickedItem );
unsigned short referenceHadItSet = referenceItem->value & perm;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -784,11 +784,11 @@ void KACLListView::contentsMousePressEvent( QMouseEvent * e )
}
}
-void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int col )
+void KACLListView::entryClicked( TQListViewItem* pItem, const TQPoint& /*pt*/, int col )
{
if ( !pItem ) return;
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( KACLListViewItem* item = static_cast<KACLListViewItem*>( it.current() ) ) {
++it;
if ( !item->isSelected() ) continue;
@@ -835,7 +835,7 @@ void KACLListView::entryClicked( QListViewItem* pItem, const QPoint& /*pt*/, int
void KACLListView::calculateEffectiveRights()
{
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
KACLListViewItem* pItem;
while ( ( pItem = dynamic_cast<KACLListViewItem*>( it.current() ) ) != 0 )
{
@@ -873,7 +873,7 @@ void KACLListView::setMaskPartialPermissions( acl_perm_t /*maskPartialPerms*/ )
bool KACLListView::hasDefaultEntries() const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -889,7 +889,7 @@ const KACLListViewItem* KACLListView::findDefaultItemByType( EntryType type ) co
const KACLListViewItem* KACLListView::findItemByType( EntryType type, bool defaults ) const
{
- QListViewItemIterator it( const_cast<KACLListView*>( this ) );
+ TQListViewItemIterator it( const_cast<KACLListView*>( this ) );
while ( it.current() ) {
const KACLListViewItem *item = static_cast<const KACLListViewItem*>( it.current() );
++it;
@@ -962,7 +962,7 @@ void KACLListView::slotAddEntry()
calculateEffectiveRights();
sort();
setCurrentItem( item );
- // QListView doesn't seem to emit, in this case, and we need to update
+ // TQListView doesn't seem to emit, in this case, and we need to update
// the buttons...
if ( childCount() == 1 )
emit currentChanged( item );
@@ -970,7 +970,7 @@ void KACLListView::slotAddEntry()
void KACLListView::slotEditEntry()
{
- QListViewItem * current = currentItem();
+ TQListViewItem * current = currentItem();
if ( !current ) return;
KACLListViewItem *item = static_cast<KACLListViewItem*>( current );
int allowedTypes = item->type | NamedUser | NamedGroup;
@@ -1002,7 +1002,7 @@ void KACLListView::slotEditEntry()
void KACLListView::slotRemoveEntry()
{
- QListViewItemIterator it( this, QListViewItemIterator::Selected );
+ TQListViewItemIterator it( this, TQListViewItemIterator::Selected );
while ( it.current() ) {
KACLListViewItem *item = static_cast<KACLListViewItem*>( it.current() );
++it;
diff --git a/kio/kfile/kacleditwidget.h b/kio/kfile/kacleditwidget.h
index 4fec2d7c3..39cdf89a1 100644
--- a/kio/kfile/kacleditwidget.h
+++ b/kio/kfile/kacleditwidget.h
@@ -38,7 +38,7 @@ class KACLEditWidget : QWidget
{
Q_OBJECT
public:
- KACLEditWidget( QWidget *parent = 0, const char *name = 0 );
+ KACLEditWidget( TQWidget *parent = 0, const char *name = 0 );
KACL getACL() const;
KACL getDefaultACL() const;
void setACL( const KACL & );
@@ -50,9 +50,9 @@ private slots:
private:
KACLListView* m_listView;
- QPushButton *m_AddBtn;
- QPushButton *m_EditBtn;
- QPushButton *m_DelBtn;
+ TQPushButton *m_AddBtn;
+ TQPushButton *m_EditBtn;
+ TQPushButton *m_DelBtn;
};
diff --git a/kio/kfile/kacleditwidget_p.h b/kio/kfile/kacleditwidget_p.h
index 6a5a7d074..3ad77930c 100644
--- a/kio/kfile/kacleditwidget_p.h
+++ b/kio/kfile/kacleditwidget_p.h
@@ -30,8 +30,8 @@
#include <kacl.h>
#include <kfileitem.h>
#include <kdialogbase.h>
-#include <qpixmap.h>
-#include <qcombobox.h>
+#include <tqpixmap.h>
+#include <tqcombobox.h>
class KACLListViewItem;
class QPushButton;
@@ -66,7 +66,7 @@ public:
NamedGroup = 32,
AllTypes = 63 };
- KACLListView( QWidget* parent = 0, const char* name = 0 );
+ KACLListView( TQWidget* parent = 0, const char* name = 0 );
~KACLListView();
bool hasMaskEntry() const { return m_hasMask; }
@@ -87,8 +87,8 @@ public:
unsigned short calculateMaskValue( bool defaults ) const;
void calculateEffectiveRights();
- QStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
- QStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedUsers( bool defaults, KACLListViewItem *allowedItem = 0 );
+ TQStringList allowedGroups( bool defaults, KACLListViewItem *allowedItem = 0 );
const KACL getACL() const { return getACL(); }
KACL getACL();
@@ -96,8 +96,8 @@ public:
const KACL getDefaultACL() const { return getDefaultACL(); }
KACL getDefaultACL();
- QPixmap getYesPixmap() const { return *m_yesPixmap; }
- QPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
+ TQPixmap getYesPixmap() const { return *m_yesPixmap; }
+ TQPixmap getYesPartialPixmap() const { return *m_yesPartialPixmap; }
public slots:
void slotAddEntry();
@@ -107,9 +107,9 @@ public slots:
void setDefaultACL( const KACL &anACL );
protected slots:
- void entryClicked( QListViewItem* pItem, const QPoint& pt, int col );
+ void entryClicked( TQListViewItem* pItem, const TQPoint& pt, int col );
protected:
- void contentsMousePressEvent( QMouseEvent * e );
+ void contentsMousePressEvent( TQMouseEvent * e );
private:
void fillItemsFromACL( const KACL &pACL, bool defaults = false );
@@ -120,10 +120,10 @@ private:
unsigned short m_mask;
bool m_hasMask;
bool m_allowDefaults;
- QStringList m_allUsers;
- QStringList m_allGroups;
- QPixmap* m_yesPixmap;
- QPixmap* m_yesPartialPixmap;
+ TQStringList m_allUsers;
+ TQStringList m_allGroups;
+ TQPixmap* m_yesPixmap;
+ TQPixmap* m_yesPartialPixmap;
};
class EditACLEntryDialog : public KDialogBase
@@ -131,10 +131,10 @@ class EditACLEntryDialog : public KDialogBase
Q_OBJECT
public:
EditACLEntryDialog( KACLListView *listView, KACLListViewItem *item,
- const QStringList &users,
- const QStringList &groups,
- const QStringList &defaultUsers,
- const QStringList &defaultGroups,
+ const TQStringList &users,
+ const TQStringList &groups,
+ const TQStringList &defaultUsers,
+ const TQStringList &defaultGroups,
int allowedTypes = KACLListView::AllTypes,
int allowedDefaultTypes = KACLListView::AllTypes,
bool allowDefault = false );
@@ -148,29 +148,29 @@ private slots:
private:
KACLListView *m_listView;
KACLListViewItem *m_item;
- QStringList m_users;
- QStringList m_groups;
- QStringList m_defaultUsers;
- QStringList m_defaultGroups;
+ TQStringList m_users;
+ TQStringList m_groups;
+ TQStringList m_defaultUsers;
+ TQStringList m_defaultGroups;
int m_allowedTypes;
int m_allowedDefaultTypes;
- QVButtonGroup *m_buttonGroup;
- QComboBox *m_usersCombo;
- QComboBox *m_groupsCombo;
- QWidgetStack *m_widgetStack;
- QCheckBox *m_defaultCB;
+ TQVButtonGroup *m_buttonGroup;
+ TQComboBox *m_usersCombo;
+ TQComboBox *m_groupsCombo;
+ TQWidgetStack *m_widgetStack;
+ TQCheckBox *m_defaultCB;
};
class KACLListViewItem : public KListViewItem
{
public:
- KACLListViewItem( QListView* parent, KACLListView::EntryType type,
+ KACLListViewItem( TQListView* parent, KACLListView::EntryType type,
unsigned short value,
bool defaultEntry,
- const QString& qualifier = QString::null );
+ const TQString& qualifier = TQString::null );
virtual ~KACLListViewItem();
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
void calcEffectiveRights();
@@ -179,7 +179,7 @@ public:
void togglePerm( acl_perm_t perm );
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
void updatePermPixmaps();
@@ -188,7 +188,7 @@ public:
KACLListView::EntryType type;
unsigned short value;
bool isDefault;
- QString qualifier;
+ TQString qualifier;
bool isPartial;
private:
diff --git a/kio/kfile/kcombiview.cpp b/kio/kfile/kcombiview.cpp
index fc16054f1..6baf6d36f 100644
--- a/kio/kfile/kcombiview.cpp
+++ b/kio/kfile/kcombiview.cpp
@@ -28,19 +28,19 @@
#include "kfiledetailview.h"
#include "config-kfile.h"
-#include <qevent.h>
+#include <tqevent.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kglobal.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
-KCombiView::KCombiView( QWidget *parent, const char *name)
- : QSplitter( parent, name),
+KCombiView::KCombiView( TQWidget *parent, const char *name)
+ : TQSplitter( parent, name),
KFileView(),
right(0),
m_lastViewForNextItem(0),
@@ -51,13 +51,13 @@ KCombiView::KCombiView( QWidget *parent, const char *name)
left->viewport()->setAcceptDrops(false);
left->setGridX( 160 );
left->KFileView::setViewMode( Directories );
- left->setArrangement( QIconView::LeftToRight );
+ left->setArrangement( TQIconView::LeftToRight );
left->setParentView( this );
left->setAcceptDrops(false);
left->installEventFilter( this );
- connect( sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- SLOT( slotSortingChanged( QDir::SortSpec ) ));
+ connect( sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ TQT_SLOT( slotSortingChanged( TQDir::SortSpec ) ));
}
KCombiView::~KCombiView()
@@ -72,10 +72,10 @@ void KCombiView::setRight(KFileView *view)
right->KFileView::setViewMode( Files );
setViewName( right->viewName() );
- QValueList<int> lst;
+ TQValueList<int> lst;
lst << left->gridX() + 2 * left->spacing();
setSizes( lst );
- setResizeMode( left, QSplitter::KeepSize );
+ setResizeMode( left, TQSplitter::KeepSize );
right->setParentView( this );
right->widget()->setAcceptDrops(acceptDrops());
@@ -98,7 +98,7 @@ void KCombiView::insertItem( KFileItem *item )
}
}
-void KCombiView::setSorting( QDir::SortSpec sort )
+void KCombiView::setSorting( TQDir::SortSpec sort )
{
if ( !right )
kdFatal() << "You need to call setRight( someview ) before!" << endl;
@@ -293,26 +293,26 @@ KFileItem * KCombiView::prevItem( const KFileItem *fileItem ) const
return item;
}
-void KCombiView::slotSortingChanged( QDir::SortSpec sorting )
+void KCombiView::slotSortingChanged( TQDir::SortSpec sorting )
{
KFileView::setSorting( sorting );
}
KFileView *KCombiView::focusView( KFileView *preferred ) const
{
- QWidget *w = focusWidget();
+ TQWidget *w = focusWidget();
KFileView *other = (right == preferred) ? left : right;
return (preferred && w == preferred->widget()) ? preferred : other;
}
-void KCombiView::readConfig( KConfig *config, const QString& group )
+void KCombiView::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
if ( right )
right->readConfig( config, group );
}
-void KCombiView::writeConfig( KConfig *config, const QString& group )
+void KCombiView::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
if ( right )
@@ -329,7 +329,7 @@ void KCombiView::setAcceptDrops(bool b)
left->setAcceptDrops(b);
if (right)
right->widget()->setAcceptDrops(b);
- QSplitter::setAcceptDrops(b);
+ TQSplitter::setAcceptDrops(b);
}
void KCombiView::setDropOptions_impl(int options)
@@ -351,12 +351,12 @@ void KCombiView::virtual_hook( int id, void* data )
}
}
-bool KCombiView::eventFilter( QObject *o, QEvent *e )
+bool KCombiView::eventFilter( TQObject *o, TQEvent *e )
{
int type = e->type();
// only the focused view may have a selection
- if ( type == QEvent::FocusIn )
+ if ( type == TQEvent::FocusIn )
{
if ( o == left )
right->clearSelection();
@@ -364,7 +364,7 @@ bool KCombiView::eventFilter( QObject *o, QEvent *e )
left->clearSelection();
}
- return QSplitter::eventFilter( o, e );
+ return TQSplitter::eventFilter( o, e );
}
#include "kcombiview.moc"
diff --git a/kio/kfile/kcombiview.h b/kio/kfile/kcombiview.h
index b38876d71..3597669ea 100644
--- a/kio/kfile/kcombiview.h
+++ b/kio/kfile/kcombiview.h
@@ -22,7 +22,7 @@
#ifndef _KCOMBIVIEW_H
#define _KCOMBIVIEW_H
-#include <qsplitter.h>
+#include <tqsplitter.h>
#include <klocale.h>
#include <kfile.h>
@@ -51,16 +51,16 @@ class QIconViewItem;
* @see KFileDetailView
* @see KDirOperator
*/
-class KIO_EXPORT KCombiView : public QSplitter,
+class KIO_EXPORT KCombiView : public TQSplitter,
public KFileView
{
Q_OBJECT
public:
- KCombiView( QWidget *parent, const char *name);
+ KCombiView( TQWidget *parent, const char *name);
virtual ~KCombiView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void updateView( bool );
@@ -91,10 +91,10 @@ public:
virtual void insertItem( KFileItem *i );
virtual void clear();
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
void ensureItemVisible( const KFileItem * );
@@ -107,7 +107,7 @@ protected:
KFileView *right;
protected slots:
- void slotSortingChanged( QDir::SortSpec );
+ void slotSortingChanged( TQDir::SortSpec );
private:
KFileView *focusView( KFileView *preferred ) const;
@@ -120,7 +120,7 @@ private:
mutable KFileView *m_lastViewForPrevItem;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void setDropOptions_impl(int options);
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kcustommenueditor.cpp b/kio/kfile/kcustommenueditor.cpp
index edbca55e3..aec3c10f1 100644
--- a/kio/kfile/kcustommenueditor.cpp
+++ b/kio/kfile/kcustommenueditor.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qhbox.h>
-#include <qregexp.h>
-#include <qimage.h>
-#include <qpushbutton.h>
-#include <qdir.h>
+#include <tqhbox.h>
+#include <tqregexp.h>
+#include <tqimage.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
#include <kbuttonbox.h>
#include <klocale.h>
@@ -38,15 +38,15 @@
class KCustomMenuEditor::Item : public QListViewItem
{
public:
- Item(QListView *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListView *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
}
- Item(QListViewItem *parent, KService::Ptr service)
- : QListViewItem(parent),
+ Item(TQListViewItem *parent, KService::Ptr service)
+ : TQListViewItem(parent),
s(service)
{
init();
@@ -54,18 +54,18 @@ public:
void init()
{
- QString serviceName = s->name();
+ TQString serviceName = s->name();
// item names may contain ampersands. To avoid them being converted
// to accelators, replace them with two ampersands.
serviceName.replace("&", "&&");
- QPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
+ TQPixmap normal = KGlobal::instance()->iconLoader()->loadIcon(s->icon(), KIcon::Small,
0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 16x16
if (normal.width() > 16 || normal.height() > 16) {
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(16, 16);
normal.convertFromImage(tmp);
}
@@ -79,28 +79,28 @@ public:
class KCustomMenuEditor::KCustomMenuEditorPrivate
{
public:
- QPushButton * pbRemove;
- QPushButton * pbMoveUp;
- QPushButton * pbMoveDown;
+ TQPushButton * pbRemove;
+ TQPushButton * pbMoveUp;
+ TQPushButton * pbMoveDown;
};
-KCustomMenuEditor::KCustomMenuEditor(QWidget *parent)
+KCustomMenuEditor::KCustomMenuEditor(TQWidget *parent)
: KDialogBase(parent, "custommenueditor", true, i18n("Menu Editor"), Ok|Cancel, Ok, true),
m_listView(0)
{
d = new KCustomMenuEditorPrivate;
- QHBox *page = makeHBoxMainWidget();
+ TQHBox *page = makeHBoxMainWidget();
m_listView = new KListView(page);
m_listView->addColumn(i18n("Menu"));
m_listView->setFullWidth(true);
m_listView->setSorting(-1);
KButtonBox *buttonBox = new KButtonBox(page, Vertical);
- buttonBox->addButton(i18n("New..."), this, SLOT(slotNewItem()));
- d->pbRemove=buttonBox->addButton(i18n("Remove"), this, SLOT(slotRemoveItem()));
- d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, SLOT(slotMoveUp()));
- d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, SLOT(slotMoveDown()));
+ buttonBox->addButton(i18n("New..."), this, TQT_SLOT(slotNewItem()));
+ d->pbRemove=buttonBox->addButton(i18n("Remove"), this, TQT_SLOT(slotRemoveItem()));
+ d->pbMoveUp=buttonBox->addButton(i18n("Move Up"), this, TQT_SLOT(slotMoveUp()));
+ d->pbMoveDown=buttonBox->addButton(i18n("Move Down"), this, TQT_SLOT(slotMoveDown()));
buttonBox->layout();
- connect( m_listView, SIGNAL( selectionChanged () ), this, SLOT( refreshButton() ) );
+ connect( m_listView, TQT_SIGNAL( selectionChanged () ), this, TQT_SLOT( refreshButton() ) );
refreshButton();
}
@@ -112,7 +112,7 @@ KCustomMenuEditor::~KCustomMenuEditor()
void KCustomMenuEditor::refreshButton()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
d->pbRemove->setEnabled( item );
d->pbMoveUp->setEnabled( item && item->itemAbove() );
d->pbMoveDown->setEnabled( item && item->itemBelow() );
@@ -121,12 +121,12 @@ void KCustomMenuEditor::refreshButton()
void
KCustomMenuEditor::load(KConfigBase *cfg)
{
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
int count = cfg->readNumEntry("NrOfItems");
- QListViewItem *last = 0;
+ TQListViewItem *last = 0;
for(int i = 0; i < count; i++)
{
- QString entry = cfg->readPathEntry(QString("Item%1").arg(i+1));
+ TQString entry = cfg->readPathEntry(TQString("Item%1").arg(i+1));
if (entry.isEmpty())
continue;
@@ -140,7 +140,7 @@ KCustomMenuEditor::load(KConfigBase *cfg)
if (!menuItem->isValid())
continue;
- QListViewItem *item = new Item(m_listView, menuItem);
+ TQListViewItem *item = new Item(m_listView, menuItem);
item->moveItem(last);
last = item;
}
@@ -150,23 +150,23 @@ void
KCustomMenuEditor::save(KConfigBase *cfg)
{
// First clear the whole config file.
- QStringList groups = cfg->groupList();
- for(QStringList::ConstIterator it = groups.begin();
+ TQStringList groups = cfg->groupList();
+ for(TQStringList::ConstIterator it = groups.begin();
it != groups.end(); ++it)
{
cfg->deleteGroup(*it);
}
- cfg->setGroup(QString::null);
+ cfg->setGroup(TQString::null);
Item * item = (Item *) m_listView->firstChild();
int i = 0;
while(item)
{
i++;
- QString path = item->s->desktopEntryPath();
- if (QDir::isRelativePath(path) || QDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
+ TQString path = item->s->desktopEntryPath();
+ if (TQDir::isRelativePath(path) || TQDir::isRelativePath(KGlobal::dirs()->relativeLocation("xdgdata-apps", path)))
path = item->s->desktopEntryName();
- cfg->writePathEntry(QString("Item%1").arg(i), path);
+ cfg->writePathEntry(TQString("Item%1").arg(i), path);
item = (Item *) item->nextSibling();
}
cfg->writeEntry("NrOfItems", i);
@@ -175,7 +175,7 @@ KCustomMenuEditor::save(KConfigBase *cfg)
void
KCustomMenuEditor::slotNewItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
KOpenWithDlg dlg(this);
dlg.setSaveNewApplications(true);
@@ -195,7 +195,7 @@ KCustomMenuEditor::slotNewItem()
void
KCustomMenuEditor::slotRemoveItem()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
@@ -206,14 +206,14 @@ KCustomMenuEditor::slotRemoveItem()
void
KCustomMenuEditor::slotMoveUp()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *searchItem = m_listView->firstChild();
+ TQListViewItem *searchItem = m_listView->firstChild();
while(searchItem)
{
- QListViewItem *next = searchItem->nextSibling();
+ TQListViewItem *next = searchItem->nextSibling();
if (next == item)
{
searchItem->moveItem(item);
@@ -227,11 +227,11 @@ KCustomMenuEditor::slotMoveUp()
void
KCustomMenuEditor::slotMoveDown()
{
- QListViewItem *item = m_listView->currentItem();
+ TQListViewItem *item = m_listView->currentItem();
if (!item)
return;
- QListViewItem *after = item->nextSibling();
+ TQListViewItem *after = item->nextSibling();
if (!after)
return;
diff --git a/kio/kfile/kcustommenueditor.h b/kio/kfile/kcustommenueditor.h
index 88151f5d4..cc20c6204 100644
--- a/kio/kfile/kcustommenueditor.h
+++ b/kio/kfile/kcustommenueditor.h
@@ -37,7 +37,7 @@ public:
/**
* Create a dialog for editing a custom menu
*/
- KCustomMenuEditor(QWidget *parent);
+ KCustomMenuEditor(TQWidget *parent);
~KCustomMenuEditor();
/**
* load the custom menu
diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp
index b12e45153..6013b7c57 100644
--- a/kio/kfile/kdiroperator.cpp
+++ b/kio/kfile/kdiroperator.cpp
@@ -20,16 +20,16 @@
#include <unistd.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
#include <kaction.h>
#include <kapplication.h>
@@ -64,8 +64,8 @@
#include "kfilemetapreview.h"
-template class QPtrStack<KURL>;
-template class QDict<KFileItem>;
+template class TQPtrStack<KURL>;
+template class TQDict<KFileItem>;
class KDirOperator::KDirOperatorPrivate
@@ -84,19 +84,19 @@ public:
}
bool dirHighlighting;
- QString lastURL; // used for highlighting a directory on cdUp
+ TQString lastURL; // used for highlighting a directory on cdUp
bool onlyDoubleClickSelectsFiles;
- QTimer *progressDelayTimer;
+ TQTimer *progressDelayTimer;
KActionSeparator *viewActionSeparator;
int dropOptions;
KConfig *config;
- QString configGroup;
+ TQString configGroup;
};
KDirOperator::KDirOperator(const KURL& _url,
- QWidget *parent, const char* _name)
- : QWidget(parent, _name),
+ TQWidget *parent, const char* _name)
+ : TQWidget(parent, _name),
dir(0),
m_fileView(0),
progress(0)
@@ -104,36 +104,36 @@ KDirOperator::KDirOperator(const KURL& _url,
myPreview = 0L;
myMode = KFile::File;
m_viewKind = KFile::Simple;
- mySorting = static_cast<QDir::SortSpec>(QDir::Name | QDir::DirsFirst);
+ mySorting = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::DirsFirst);
d = new KDirOperatorPrivate;
if (_url.isEmpty()) { // no dir specified -> current dir
- QString strPath = QDir::currentDirPath();
+ TQString strPath = TQDir::currentDirPath();
strPath.append('/');
currUrl = KURL();
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.setPath(strPath);
}
else {
currUrl = _url;
if ( currUrl.protocol().isEmpty() )
- currUrl.setProtocol(QString::fromLatin1("file"));
+ currUrl.setProtocol(TQString::fromLatin1("file"));
currUrl.addPath("/"); // make sure we have a trailing slash!
}
setDirLister( new KDirLister( true ) );
- connect(&myCompletion, SIGNAL(match(const QString&)),
- SLOT(slotCompletionMatch(const QString&)));
+ connect(&myCompletion, TQT_SIGNAL(match(const TQString&)),
+ TQT_SLOT(slotCompletionMatch(const TQString&)));
progress = new KProgress(this, "progress");
progress->adjustSize();
progress->move(2, height() - progress->height() -2);
- d->progressDelayTimer = new QTimer( this, "progress delay timer" );
- connect( d->progressDelayTimer, SIGNAL( timeout() ),
- SLOT( slotShowProgress() ));
+ d->progressDelayTimer = new TQTimer( this, "progress delay timer" );
+ connect( d->progressDelayTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotShowProgress() ));
myCompleteListDirty = false;
@@ -144,7 +144,7 @@ KDirOperator::KDirOperator(const KURL& _url,
setupActions();
setupMenu();
- setFocusPolicy(QWidget::WheelFocus);
+ setFocusPolicy(TQWidget::WheelFocus);
}
KDirOperator::~KDirOperator()
@@ -165,7 +165,7 @@ KDirOperator::~KDirOperator()
}
-void KDirOperator::setSorting( QDir::SortSpec spec )
+void KDirOperator::setSorting( TQDir::SortSpec spec )
{
if ( m_fileView )
m_fileView->setSorting( spec );
@@ -175,7 +175,7 @@ void KDirOperator::setSorting( QDir::SortSpec spec )
void KDirOperator::resetCursor()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
progress->hide();
}
@@ -192,10 +192,10 @@ void KDirOperator::insertViewDependentActions()
{
if (viewActionCollection)
{
- disconnect( viewActionCollection, SIGNAL( inserted( KAction * )),
- this, SLOT( slotViewActionAdded( KAction * )));
- disconnect( viewActionCollection, SIGNAL( removed( KAction * )),
- this, SLOT( slotViewActionRemoved( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ this, TQT_SLOT( slotViewActionAdded( KAction * )));
+ disconnect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ this, TQT_SLOT( slotViewActionRemoved( KAction * )));
}
viewActionMenu->popupMenu()->clear();
@@ -220,9 +220,9 @@ void KDirOperator::insertViewDependentActions()
viewActionMenu->insert( d->viewActionSeparator );
// first insert the normal actions, then the grouped ones
- QStringList groups = viewActionCollection->groups();
- groups.prepend( QString::null ); // actions without group
- QStringList::ConstIterator git = groups.begin();
+ TQStringList groups = viewActionCollection->groups();
+ groups.prepend( TQString::null ); // actions without group
+ TQStringList::ConstIterator git = groups.begin();
KActionPtrList list;
KAction *sep = actionCollection()->action("separator");
for ( ; git != groups.end(); ++git )
@@ -237,14 +237,14 @@ void KDirOperator::insertViewDependentActions()
}
}
- connect( viewActionCollection, SIGNAL( inserted( KAction * )),
- SLOT( slotViewActionAdded( KAction * )));
- connect( viewActionCollection, SIGNAL( removed( KAction * )),
- SLOT( slotViewActionRemoved( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( inserted( KAction * )),
+ TQT_SLOT( slotViewActionAdded( KAction * )));
+ connect( viewActionCollection, TQT_SIGNAL( removed( KAction * )),
+ TQT_SLOT( slotViewActionRemoved( KAction * )));
}
}
-void KDirOperator::activatedMenu( const KFileItem *, const QPoint& pos )
+void KDirOperator::activatedMenu( const KFileItem *, const TQPoint& pos )
{
setupMenu();
updateSelectionDependentActions();
@@ -261,7 +261,7 @@ void KDirOperator::updateSelectionDependentActions()
myActionCollection->action( "properties" )->setEnabled( hasSelection );
}
-void KDirOperator::setPreviewWidget(const QWidget *w)
+void KDirOperator::setPreviewWidget(const TQWidget *w)
{
if(w != 0L)
m_viewKind = (m_viewKind | KFile::PreviewContents);
@@ -334,24 +334,24 @@ void KDirOperator::slotDefaultPreview()
void KDirOperator::slotSortByName()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Name ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Name ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( true );
}
void KDirOperator::slotSortBySize()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Size ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Size ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
void KDirOperator::slotSortByDate()
{
- int sorting = (m_fileView->sorting()) & ~QDir::SortByMask;
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::Time ));
+ int sorting = (m_fileView->sorting()) & ~TQDir::SortByMask;
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::Time ));
mySorting = m_fileView->sorting();
caseInsensitiveAction->setEnabled( false );
}
@@ -364,40 +364,40 @@ void KDirOperator::slotSortReversed()
void KDirOperator::slotToggleDirsFirst()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortDirsFirst( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::DirsFirst ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::DirsFirst ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::DirsFirst));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::DirsFirst));
mySorting = m_fileView->sorting();
}
void KDirOperator::slotToggleIgnoreCase()
{
- QDir::SortSpec sorting = m_fileView->sorting();
+ TQDir::SortSpec sorting = m_fileView->sorting();
if ( !KFile::isSortCaseInsensitive( sorting ) )
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting | QDir::IgnoreCase ));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting | TQDir::IgnoreCase ));
else
- m_fileView->setSorting( static_cast<QDir::SortSpec>( sorting & ~QDir::IgnoreCase));
+ m_fileView->setSorting( static_cast<TQDir::SortSpec>( sorting & ~TQDir::IgnoreCase));
mySorting = m_fileView->sorting();
}
void KDirOperator::mkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString dir = KInputDialog::getText( i18n( "New Folder" ),
+ TQString dir = KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this);
if (ok)
mkdir( KIO::encodeFileName( dir ), true );
}
-bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
+bool KDirOperator::mkdir( const TQString& directory, bool enterDirectory )
{
// Creates "directory", relative to the current directory (currUrl).
// The given path may contain any number directories, existant or not.
@@ -407,8 +407,8 @@ bool KDirOperator::mkdir( const QString& directory, bool enterDirectory )
bool exists = false;
KURL url( currUrl );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -440,7 +440,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -451,7 +451,7 @@ KIO::DeleteJob * KDirOperator::del( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -503,7 +503,7 @@ void KDirOperator::deleteSelected()
}
KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
- QWidget *parent,
+ TQWidget *parent,
bool ask, bool showProgress )
{
if ( items.isEmpty() ) {
@@ -514,7 +514,7 @@ KIO::CopyJob * KDirOperator::trash( const KFileItemList& items,
}
KURL::List urls;
- QStringList files;
+ TQStringList files;
KFileItemListIterator it( items );
for ( ; it.current(); ++it ) {
@@ -580,11 +580,11 @@ void KDirOperator::close()
dir->stop();
}
-void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
+void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT
{
#if 0
// copy the argument in a temporary string
- QString text = _txt;
+ TQString text = _txt;
// it's unlikely to happen, that at the beginning are spaces, but
// for the end, it happens quite often, I guess.
text = text.stripWhiteSpace();
@@ -598,9 +598,9 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
if (!selection.isNull()) {
int position = text.findRev('/');
ASSERT(position >= 0); // we already inserted the current dir in case
- QString filename = text.mid(position + 1, text.length());
+ TQString filename = text.mid(position + 1, text.length());
if (filename != selection)
- selection = QString::null;
+ selection = TQString::null;
}
KURL u(text); // I have to take care of entered URLs
@@ -625,7 +625,7 @@ void KDirOperator::checkPath(const QString &, bool /*takeFiles*/) // SLOT
filename_ = u.url();
emit fileSelected(filename_);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
accept();
}
@@ -638,11 +638,11 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
KURL newurl;
if ( !_newurl.isValid() )
- newurl.setPath( QDir::homeDirPath() );
+ newurl.setPath( TQDir::homeDirPath() );
else
newurl = _newurl;
- QString pathstr = newurl.path(+1);
+ TQString pathstr = newurl.path(+1);
newurl.setPath(pathstr);
// already set
@@ -651,7 +651,7 @@ void KDirOperator::setURL(const KURL& _newurl, bool clearforward)
if ( !isReadable( newurl ) ) {
// maybe newurl is a file? check its parent directory
- newurl.cd(QString::fromLatin1(".."));
+ newurl.cd(TQString::fromLatin1(".."));
if ( !isReadable( newurl ) ) {
resetCursor();
KMessageBox::error(viewWidget(),
@@ -716,10 +716,10 @@ void KDirOperator::pathChanged()
myDirCompletion.clear();
// it may be, that we weren't ready at this time
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
// when KIO::Job emits finished, the slot will restore the cursor
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
if ( !isReadable( currUrl )) {
KMessageBox::error(viewWidget(),
@@ -777,31 +777,31 @@ KURL KDirOperator::url() const
void KDirOperator::cdUp()
{
KURL tmp(currUrl);
- tmp.cd(QString::fromLatin1(".."));
+ tmp.cd(TQString::fromLatin1(".."));
setURL(tmp, true);
}
void KDirOperator::home()
{
KURL u;
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
setURL(u, true);
}
void KDirOperator::clearFilter()
{
- dir->setNameFilter( QString::null );
+ dir->setNameFilter( TQString::null );
dir->clearMimeFilter();
checkPreviewSupport();
}
-void KDirOperator::setNameFilter(const QString& filter)
+void KDirOperator::setNameFilter(const TQString& filter)
{
dir->setNameFilter(filter);
checkPreviewSupport();
}
-void KDirOperator::setMimeFilter( const QStringList& mimetypes )
+void KDirOperator::setMimeFilter( const TQStringList& mimetypes )
{
dir->setMimeFilter( mimetypes );
checkPreviewSupport();
@@ -823,27 +823,27 @@ bool KDirOperator::checkPreviewSupport()
bool KDirOperator::checkPreviewInternal() const
{
- QStringList supported = KIO::PreviewJob::supportedMimeTypes();
+ TQStringList supported = KIO::PreviewJob::supportedMimeTypes();
// no preview support for directories?
if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 )
return false;
- QStringList mimeTypes = dir->mimeFilters();
- QStringList nameFilter = QStringList::split( " ", dir->nameFilter() );
+ TQStringList mimeTypes = dir->mimeFilters();
+ TQStringList nameFilter = TQStringList::split( " ", dir->nameFilter() );
if ( mimeTypes.isEmpty() && nameFilter.isEmpty() && !supported.isEmpty() )
return true;
else {
- QRegExp r;
+ TQRegExp r;
r.setWildcard( true ); // the "mimetype" can be "image/*"
if ( !mimeTypes.isEmpty() ) {
- QStringList::Iterator it = supported.begin();
+ TQStringList::Iterator it = supported.begin();
for ( ; it != supported.end(); ++it ) {
r.setPattern( *it );
- QStringList result = mimeTypes.grep( r );
+ TQStringList result = mimeTypes.grep( r );
if ( !result.isEmpty() ) { // matches! -> we want previews
return true;
}
@@ -853,7 +853,7 @@ bool KDirOperator::checkPreviewInternal() const
if ( !nameFilter.isEmpty() ) {
// find the mimetypes of all the filter-patterns and
KServiceTypeFactory *fac = KServiceTypeFactory::self();
- QStringList::Iterator it1 = nameFilter.begin();
+ TQStringList::Iterator it1 = nameFilter.begin();
for ( ; it1 != nameFilter.end(); ++it1 ) {
if ( (*it1) == "*" ) {
return true;
@@ -862,12 +862,12 @@ bool KDirOperator::checkPreviewInternal() const
KMimeType *mt = fac->findFromPattern( *it1 );
if ( !mt )
continue;
- QString mime = mt->name();
+ TQString mime = mt->name();
delete mt;
// the "mimetypes" we get from the PreviewJob can be "image/*"
// so we need to check in wildcard mode
- QStringList::Iterator it2 = supported.begin();
+ TQStringList::Iterator it2 = supported.begin();
for ( ; it2 != supported.end(); ++it2 ) {
r.setPattern( *it2 );
if ( r.search( mime ) != -1 ) {
@@ -881,7 +881,7 @@ bool KDirOperator::checkPreviewInternal() const
return false;
}
-KFileView* KDirOperator::createView( QWidget* parent, KFile::FileView view )
+KFileView* KDirOperator::createView( TQWidget* parent, KFile::FileView view )
{
KFileView* new_view = 0L;
bool separateDirs = KFile::isSeparateDirs( view );
@@ -933,7 +933,7 @@ void KDirOperator::setAcceptDrops(bool b)
{
if (m_fileView)
m_fileView->widget()->setAcceptDrops(b);
- QWidget::setAcceptDrops(b);
+ TQWidget::setAcceptDrops(b);
}
void KDirOperator::setDropOptions(int options)
@@ -1050,18 +1050,18 @@ void KDirOperator::connectView(KFileView *view)
viewActionCollection = 0L;
KFileViewSignaler *sig = view->signaler();
- connect(sig, SIGNAL( activatedMenu(const KFileItem *, const QPoint& ) ),
- this, SLOT( activatedMenu(const KFileItem *, const QPoint& )));
- connect(sig, SIGNAL( dirActivated(const KFileItem *) ),
- this, SLOT( selectDir(const KFileItem*) ) );
- connect(sig, SIGNAL( fileSelected(const KFileItem *) ),
- this, SLOT( selectFile(const KFileItem*) ) );
- connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- this, SLOT( highlightFile(const KFileItem*) ));
- connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- this, SLOT( slotViewSortingChanged( QDir::SortSpec )));
- connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- this, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&)) );
+ connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *, const TQPoint& ) ),
+ this, TQT_SLOT( activatedMenu(const KFileItem *, const TQPoint& )));
+ connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *) ),
+ this, TQT_SLOT( selectDir(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *) ),
+ this, TQT_SLOT( selectFile(const KFileItem*) ) );
+ connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ this, TQT_SLOT( highlightFile(const KFileItem*) ));
+ connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ this, TQT_SLOT( slotViewSortingChanged( TQDir::SortSpec )));
+ connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ this, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&)) );
if ( reverseAction->isChecked() != m_fileView->isReversed() )
slotSortReversed();
@@ -1071,7 +1071,7 @@ void KDirOperator::connectView(KFileView *view)
m_fileView->widget()->show();
if ( listDir ) {
- QApplication::setOverrideCursor( waitCursor );
+ TQApplication::setOverrideCursor( waitCursor );
openURL( currUrl );
}
else
@@ -1120,24 +1120,24 @@ void KDirOperator::setDirLister( KDirLister *lister )
dir->setAutoUpdate( true );
- QWidget* mainWidget = topLevelWidget();
+ TQWidget* mainWidget = topLevelWidget();
dir->setMainWindow (mainWidget);
kdDebug (kfile_area) << "mainWidget=" << mainWidget << endl;
- connect( dir, SIGNAL( percent( int )),
- SLOT( slotProgress( int ) ));
- connect( dir, SIGNAL(started( const KURL& )), SLOT(slotStarted()));
- connect( dir, SIGNAL(newItems(const KFileItemList &)),
- SLOT(insertNewFiles(const KFileItemList &)));
- connect( dir, SIGNAL(completed()), SLOT(slotIOFinished()));
- connect( dir, SIGNAL(canceled()), SLOT(slotCanceled()));
- connect( dir, SIGNAL(deleteItem(KFileItem *)),
- SLOT(itemDeleted(KFileItem *)));
- connect( dir, SIGNAL(redirection( const KURL& )),
- SLOT( slotRedirected( const KURL& )));
- connect( dir, SIGNAL( clear() ), SLOT( slotClearView() ));
- connect( dir, SIGNAL( refreshItems( const KFileItemList& ) ),
- SLOT( slotRefreshItems( const KFileItemList& ) ) );
+ connect( dir, TQT_SIGNAL( percent( int )),
+ TQT_SLOT( slotProgress( int ) ));
+ connect( dir, TQT_SIGNAL(started( const KURL& )), TQT_SLOT(slotStarted()));
+ connect( dir, TQT_SIGNAL(newItems(const KFileItemList &)),
+ TQT_SLOT(insertNewFiles(const KFileItemList &)));
+ connect( dir, TQT_SIGNAL(completed()), TQT_SLOT(slotIOFinished()));
+ connect( dir, TQT_SIGNAL(canceled()), TQT_SLOT(slotCanceled()));
+ connect( dir, TQT_SIGNAL(deleteItem(KFileItem *)),
+ TQT_SLOT(itemDeleted(KFileItem *)));
+ connect( dir, TQT_SIGNAL(redirection( const KURL& )),
+ TQT_SLOT( slotRedirected( const KURL& )));
+ connect( dir, TQT_SIGNAL( clear() ), TQT_SLOT( slotClearView() ));
+ connect( dir, TQT_SIGNAL( refreshItems( const KFileItemList& ) ),
+ TQT_SLOT( slotRefreshItems( const KFileItemList& ) ) );
}
void KDirOperator::insertNewFiles(const KFileItemList &newone)
@@ -1163,7 +1163,7 @@ void KDirOperator::insertNewFiles(const KFileItemList &newone)
++it;
}
- QTimer::singleShot(200, this, SLOT(resetCursor()));
+ TQTimer::singleShot(200, this, TQT_SLOT(resetCursor()));
}
void KDirOperator::selectDir(const KFileItem *item)
@@ -1183,12 +1183,12 @@ void KDirOperator::itemDeleted(KFileItem *item)
void KDirOperator::selectFile(const KFileItem *item)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
emit fileSelected( item );
}
-void KDirOperator::setCurrentItem( const QString& filename )
+void KDirOperator::setCurrentItem( const TQString& filename )
{
if ( m_fileView ) {
const KFileItem *item = 0L;
@@ -1205,22 +1205,22 @@ void KDirOperator::setCurrentItem( const QString& filename )
}
}
-QString KDirOperator::makeCompletion(const QString& string)
+TQString KDirOperator::makeCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
return myCompletion.makeCompletion( string );
}
-QString KDirOperator::makeDirCompletion(const QString& string)
+TQString KDirOperator::makeDirCompletion(const TQString& string)
{
if ( string.isEmpty() ) {
m_fileView->clearSelection();
- return QString::null;
+ return TQString::null;
}
prepareCompletionObjects();
@@ -1245,7 +1245,7 @@ void KDirOperator::prepareCompletionObjects()
}
}
-void KDirOperator::slotCompletionMatch(const QString& match)
+void KDirOperator::slotCompletionMatch(const TQString& match)
{
setCurrentItem( match );
emit completion( match );
@@ -1256,24 +1256,24 @@ void KDirOperator::setupActions()
myActionCollection = new KActionCollection( topLevelWidget(), this, "KDirOperator::myActionCollection" );
actionMenu = new KActionMenu( i18n("Menu"), myActionCollection, "popupMenu" );
- upAction = KStdAction::up( this, SLOT( cdUp() ), myActionCollection, "up" );
+ upAction = KStdAction::up( this, TQT_SLOT( cdUp() ), myActionCollection, "up" );
upAction->setText( i18n("Parent Folder") );
- backAction = KStdAction::back( this, SLOT( back() ), myActionCollection, "back" );
- forwardAction = KStdAction::forward( this, SLOT(forward()), myActionCollection, "forward" );
- homeAction = KStdAction::home( this, SLOT( home() ), myActionCollection, "home" );
+ backAction = KStdAction::back( this, TQT_SLOT( back() ), myActionCollection, "back" );
+ forwardAction = KStdAction::forward( this, TQT_SLOT(forward()), myActionCollection, "forward" );
+ homeAction = KStdAction::home( this, TQT_SLOT( home() ), myActionCollection, "home" );
homeAction->setText(i18n("Home Folder"));
- reloadAction = KStdAction::redisplay( this, SLOT(rereadDir()), myActionCollection, "reload" );
+ reloadAction = KStdAction::redisplay( this, TQT_SLOT(rereadDir()), myActionCollection, "reload" );
actionSeparator = new KActionSeparator( myActionCollection, "separator" );
d->viewActionSeparator = new KActionSeparator( myActionCollection,
"viewActionSeparator" );
mkdirAction = new KAction( i18n("New Folder..."), 0,
- this, SLOT( mkdir() ), myActionCollection, "mkdir" );
+ this, TQT_SLOT( mkdir() ), myActionCollection, "mkdir" );
KAction* trash = new KAction( i18n( "Move to Trash" ), "edittrash", Key_Delete, myActionCollection, "trash" );
- connect( trash, SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
- this, SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
+ connect( trash, TQT_SIGNAL( activated( KAction::ActivationReason, Qt::ButtonState ) ),
+ this, TQT_SLOT( trashSelected( KAction::ActivationReason, Qt::ButtonState ) ) );
new KAction( i18n( "Delete" ), "editdelete", SHIFT+Key_Delete, this,
- SLOT( deleteSelected() ), myActionCollection, "delete" );
- mkdirAction->setIcon( QString::fromLatin1("folder_new") );
+ TQT_SLOT( deleteSelected() ), myActionCollection, "delete" );
+ mkdirAction->setIcon( TQString::fromLatin1("folder_new") );
reloadAction->setText( i18n("Reload") );
reloadAction->setShortcut( KStdAccel::shortcut( KStdAccel::Reload ));
@@ -1281,19 +1281,19 @@ void KDirOperator::setupActions()
// the sort menu actions
sortActionMenu = new KActionMenu( i18n("Sorting"), myActionCollection, "sorting menu");
byNameAction = new KRadioAction( i18n("By Name"), 0,
- this, SLOT( slotSortByName() ),
+ this, TQT_SLOT( slotSortByName() ),
myActionCollection, "by name" );
byDateAction = new KRadioAction( i18n("By Date"), 0,
- this, SLOT( slotSortByDate() ),
+ this, TQT_SLOT( slotSortByDate() ),
myActionCollection, "by date" );
bySizeAction = new KRadioAction( i18n("By Size"), 0,
- this, SLOT( slotSortBySize() ),
+ this, TQT_SLOT( slotSortBySize() ),
myActionCollection, "by size" );
reverseAction = new KToggleAction( i18n("Reverse"), 0,
- this, SLOT( slotSortReversed() ),
+ this, TQT_SLOT( slotSortReversed() ),
myActionCollection, "reversed" );
- QString sortGroup = QString::fromLatin1("sort");
+ TQString sortGroup = TQString::fromLatin1("sort");
byNameAction->setExclusiveGroup( sortGroup );
byDateAction->setExclusiveGroup( sortGroup );
bySizeAction->setExclusiveGroup( sortGroup );
@@ -1304,17 +1304,17 @@ void KDirOperator::setupActions()
caseInsensitiveAction = new KToggleAction(i18n("Case Insensitive"), 0,
myActionCollection, "case insensitive" );
- connect( dirsFirstAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleDirsFirst() ));
- connect( caseInsensitiveAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleIgnoreCase() ));
+ connect( dirsFirstAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleDirsFirst() ));
+ connect( caseInsensitiveAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleIgnoreCase() ));
// the view menu actions
viewActionMenu = new KActionMenu( i18n("&View"), myActionCollection, "view menu" );
- connect( viewActionMenu->popupMenu(), SIGNAL( aboutToShow() ),
- SLOT( insertViewDependentActions() ));
+ connect( viewActionMenu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ TQT_SLOT( insertViewDependentActions() ));
shortAction = new KRadioAction( i18n("Short View"), "view_multicolumn",
KShortcut(), myActionCollection, "short view" );
@@ -1326,30 +1326,30 @@ void KDirOperator::setupActions()
// showHiddenAction->setCheckedState( i18n("Hide Hidden Files") );
separateDirsAction = new KToggleAction( i18n("Separate Folders"), KShortcut(),
this,
- SLOT(slotSeparateDirs()),
+ TQT_SLOT(slotSeparateDirs()),
myActionCollection, "separate dirs" );
KToggleAction *previewAction = new KToggleAction(i18n("Show Preview"),
"thumbnail", KShortcut(),
myActionCollection,
"preview" );
previewAction->setCheckedState(i18n("Hide Preview"));
- connect( previewAction, SIGNAL( toggled( bool )),
- SLOT( togglePreview( bool )));
+ connect( previewAction, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( togglePreview( bool )));
- QString viewGroup = QString::fromLatin1("view");
+ TQString viewGroup = TQString::fromLatin1("view");
shortAction->setExclusiveGroup( viewGroup );
detailedAction->setExclusiveGroup( viewGroup );
- connect( shortAction, SIGNAL( activated() ),
- SLOT( slotSimpleView() ));
- connect( detailedAction, SIGNAL( activated() ),
- SLOT( slotDetailedView() ));
- connect( showHiddenAction, SIGNAL( toggled( bool ) ),
- SLOT( slotToggleHidden( bool ) ));
+ connect( shortAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotSimpleView() ));
+ connect( detailedAction, TQT_SIGNAL( activated() ),
+ TQT_SLOT( slotDetailedView() ));
+ connect( showHiddenAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( slotToggleHidden( bool ) ));
new KAction( i18n("Properties"), KShortcut(ALT+Key_Return), this,
- SLOT(slotProperties()), myActionCollection, "properties" );
+ TQT_SLOT(slotProperties()), myActionCollection, "properties" );
}
void KDirOperator::setupMenu()
@@ -1386,7 +1386,7 @@ void KDirOperator::setupMenu(int whichActions)
if (currUrl.isLocalFile() && !(KApplication::keyboardMouseState() & Qt::ShiftButton))
actionMenu->insert( myActionCollection->action( "trash" ) );
KConfig *globalconfig = KGlobal::config();
- KConfigGroupSaver cs( globalconfig, QString::fromLatin1("KDE") );
+ KConfigGroupSaver cs( globalconfig, TQString::fromLatin1("KDE") );
if (!currUrl.isLocalFile() || (KApplication::keyboardMouseState() & Qt::ShiftButton) ||
globalconfig->readBoolEntry("ShowDeleteCommand", false))
actionMenu->insert( myActionCollection->action( "delete" ) );
@@ -1439,123 +1439,123 @@ void KDirOperator::updateViewActions()
detailedAction->setChecked( KFile::isDetailView( fv ));
}
-void KDirOperator::readConfig( KConfig *kc, const QString& group )
+void KDirOperator::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
defaultView = 0;
int sorting = 0;
- QString viewStyle = kc->readEntry( QString::fromLatin1("View Style"),
- QString::fromLatin1("Simple") );
- if ( viewStyle == QString::fromLatin1("Detail") )
+ TQString viewStyle = kc->readEntry( TQString::fromLatin1("View Style"),
+ TQString::fromLatin1("Simple") );
+ if ( viewStyle == TQString::fromLatin1("Detail") )
defaultView |= KFile::Detail;
else
defaultView |= KFile::Simple;
- if ( kc->readBoolEntry( QString::fromLatin1("Separate Directories"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Separate Directories"),
DefaultMixDirsAndFiles ) )
defaultView |= KFile::SeparateDirs;
- if ( kc->readBoolEntry(QString::fromLatin1("Show Preview"), false))
+ if ( kc->readBoolEntry(TQString::fromLatin1("Show Preview"), false))
defaultView |= KFile::PreviewContents;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort case insensitively"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort case insensitively"),
DefaultCaseInsensitive ) )
- sorting |= QDir::IgnoreCase;
- if ( kc->readBoolEntry( QString::fromLatin1("Sort directories first"),
+ sorting |= TQDir::IgnoreCase;
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort directories first"),
DefaultDirsFirst ) )
- sorting |= QDir::DirsFirst;
+ sorting |= TQDir::DirsFirst;
- QString name = QString::fromLatin1("Name");
- QString sortBy = kc->readEntry( QString::fromLatin1("Sort by"), name );
+ TQString name = TQString::fromLatin1("Name");
+ TQString sortBy = kc->readEntry( TQString::fromLatin1("Sort by"), name );
if ( sortBy == name )
- sorting |= QDir::Name;
- else if ( sortBy == QString::fromLatin1("Size") )
- sorting |= QDir::Size;
- else if ( sortBy == QString::fromLatin1("Date") )
- sorting |= QDir::Time;
+ sorting |= TQDir::Name;
+ else if ( sortBy == TQString::fromLatin1("Size") )
+ sorting |= TQDir::Size;
+ else if ( sortBy == TQString::fromLatin1("Date") )
+ sorting |= TQDir::Time;
- mySorting = static_cast<QDir::SortSpec>( sorting );
+ mySorting = static_cast<TQDir::SortSpec>( sorting );
setSorting( mySorting );
- if ( kc->readBoolEntry( QString::fromLatin1("Show hidden files"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Show hidden files"),
DefaultShowHidden ) ) {
showHiddenAction->setChecked( true );
dir->setShowingDotFiles( true );
}
- if ( kc->readBoolEntry( QString::fromLatin1("Sort reversed"),
+ if ( kc->readBoolEntry( TQString::fromLatin1("Sort reversed"),
DefaultSortReversed ) )
reverseAction->setChecked( true );
kc->setGroup( oldGroup );
}
-void KDirOperator::writeConfig( KConfig *kc, const QString& group )
+void KDirOperator::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- const QString oldGroup = kc->group();
+ const TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
- QString sortBy = QString::fromLatin1("Name");
+ TQString sortBy = TQString::fromLatin1("Name");
if ( KFile::isSortBySize( mySorting ) )
- sortBy = QString::fromLatin1("Size");
+ sortBy = TQString::fromLatin1("Size");
else if ( KFile::isSortByDate( mySorting ) )
- sortBy = QString::fromLatin1("Date");
- kc->writeEntry( QString::fromLatin1("Sort by"), sortBy );
+ sortBy = TQString::fromLatin1("Date");
+ kc->writeEntry( TQString::fromLatin1("Sort by"), sortBy );
- kc->writeEntry( QString::fromLatin1("Sort reversed"),
+ kc->writeEntry( TQString::fromLatin1("Sort reversed"),
reverseAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort case insensitively"),
+ kc->writeEntry( TQString::fromLatin1("Sort case insensitively"),
caseInsensitiveAction->isChecked() );
- kc->writeEntry( QString::fromLatin1("Sort directories first"),
+ kc->writeEntry( TQString::fromLatin1("Sort directories first"),
dirsFirstAction->isChecked() );
// don't save the separate dirs or preview when an application specific
// preview is in use.
bool appSpecificPreview = false;
if ( myPreview ) {
- QWidget *preview = const_cast<QWidget*>( myPreview ); // grmbl
+ TQWidget *preview = const_cast<TQWidget*>( myPreview ); // grmbl
KFileMetaPreview *tmp = dynamic_cast<KFileMetaPreview*>( preview );
appSpecificPreview = (tmp == 0L);
}
if ( !appSpecificPreview ) {
if ( separateDirsAction->isEnabled() )
- kc->writeEntry( QString::fromLatin1("Separate Directories"),
+ kc->writeEntry( TQString::fromLatin1("Separate Directories"),
separateDirsAction->isChecked() );
KToggleAction *previewAction = static_cast<KToggleAction*>(myActionCollection->action("preview"));
if ( previewAction->isEnabled() ) {
bool hasPreview = previewAction->isChecked();
- kc->writeEntry( QString::fromLatin1("Show Preview"), hasPreview );
+ kc->writeEntry( TQString::fromLatin1("Show Preview"), hasPreview );
}
}
- kc->writeEntry( QString::fromLatin1("Show hidden files"),
+ kc->writeEntry( TQString::fromLatin1("Show hidden files"),
showHiddenAction->isChecked() );
KFile::FileView fv = static_cast<KFile::FileView>( m_viewKind );
- QString style;
+ TQString style;
if ( KFile::isDetailView( fv ) )
- style = QString::fromLatin1("Detail");
+ style = TQString::fromLatin1("Detail");
else if ( KFile::isSimpleView( fv ) )
- style = QString::fromLatin1("Simple");
- kc->writeEntry( QString::fromLatin1("View Style"), style );
+ style = TQString::fromLatin1("Simple");
+ kc->writeEntry( TQString::fromLatin1("View Style"), style );
kc->setGroup( oldGroup );
}
-void KDirOperator::resizeEvent( QResizeEvent * )
+void KDirOperator::resizeEvent( TQResizeEvent * )
{
if (m_fileView)
m_fileView->widget()->resize( size() );
@@ -1587,7 +1587,7 @@ void KDirOperator::slotShowProgress()
{
progress->raise();
progress->show();
- QApplication::flushX();
+ TQApplication::flushX();
}
void KDirOperator::slotProgress( int percent )
@@ -1595,7 +1595,7 @@ void KDirOperator::slotProgress( int percent )
progress->setProgress( percent );
// we have to redraw this as fast as possible
if ( progress->isVisible() )
- QApplication::flushX();
+ TQApplication::flushX();
}
@@ -1649,7 +1649,7 @@ void KDirOperator::slotViewActionRemoved( KAction *action )
viewActionMenu->remove( d->viewActionSeparator );
}
-void KDirOperator::slotViewSortingChanged( QDir::SortSpec sort )
+void KDirOperator::slotViewSortingChanged( TQDir::SortSpec sort )
{
mySorting = sort;
updateSortActions();
@@ -1688,11 +1688,11 @@ bool KDirOperator::isReadable( const KURL& url )
return true; // what else can we say?
KDE_struct_stat buf;
- QString ts = url.path(+1);
- bool readable = ( KDE_stat( QFile::encodeName( ts ), &buf) == 0 );
+ TQString ts = url.path(+1);
+ bool readable = ( KDE_stat( TQFile::encodeName( ts ), &buf) == 0 );
if (readable) { // further checks
DIR *test;
- test = opendir( QFile::encodeName( ts )); // we do it just to test here
+ test = opendir( TQFile::encodeName( ts )); // we do it just to test here
readable = (test != 0);
if (test)
closedir(test);
@@ -1718,7 +1718,7 @@ void KDirOperator::slotRefreshItems( const KFileItemList& items )
m_fileView->updateView( it.current() );
}
-void KDirOperator::setViewConfig( KConfig *config, const QString& group )
+void KDirOperator::setViewConfig( KConfig *config, const TQString& group )
{
d->config = config;
d->configGroup = group;
@@ -1729,7 +1729,7 @@ KConfig * KDirOperator::viewConfig()
return d->config;
}
-QString KDirOperator::viewConfigGroup() const
+TQString KDirOperator::viewConfigGroup() const
{
return d->configGroup;
}
diff --git a/kio/kfile/kdiroperator.h b/kio/kfile/kdiroperator.h
index a91c7ff1a..bcce49f67 100644
--- a/kio/kfile/kdiroperator.h
+++ b/kio/kfile/kdiroperator.h
@@ -21,8 +21,8 @@
#ifndef KDIROPERATOR_H_
#define KDIROPERATOR_H_
-#include <qwidget.h>
-#include <qptrstack.h>
+#include <tqwidget.h>
+#include <tqptrstack.h>
#include <kaction.h>
#include <kcompletion.h>
@@ -73,14 +73,14 @@ namespace KIO {
* \code
* KDirOperator *op = new KDirOperator( KURL( "file:/home/gis" ), this );
* // some signals you might be interested in
- * connect(op, SIGNAL(urlEntered(const KURL&)),
- * SLOT(urlEntered(const KURL&)));
- * connect(op, SIGNAL(fileHighlighted(const KFileItem *)),
- * SLOT(fileHighlighted(const KFileItem *)));
- * connect(op, SIGNAL(fileSelected(const KFileItem *)),
- * SLOT(fileSelected(const KFileItem *)));
- * connect(op, SIGNAL(finishedLoading()),
- * SLOT(slotLoadingFinished()));
+ * connect(op, TQT_SIGNAL(urlEntered(const KURL&)),
+ * TQT_SLOT(urlEntered(const KURL&)));
+ * connect(op, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ * TQT_SLOT(fileHighlighted(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ * TQT_SLOT(fileSelected(const KFileItem *)));
+ * connect(op, TQT_SIGNAL(finishedLoading()),
+ * TQT_SLOT(slotLoadingFinished()));
*
* op->readConfig( KGlobal::config(), "Your KDiroperator ConfigGroup" );
* op->setView(KFile::Default);
@@ -116,7 +116,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* This constructor doesn't start loading the url, setView will do it.
*/
KDirOperator(const KURL& urlName = KURL(),
- QWidget *parent = 0, const char* name = 0);
+ TQWidget *parent = 0, const char* name = 0);
/**
* Destroys the KDirOperator.
*/
@@ -138,7 +138,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*/
void close();
/// Reimplemented to avoid "hidden virtual" warnings
- virtual bool close( bool alsoDelete ) { return QWidget::close( alsoDelete ); }
+ virtual bool close( bool alsoDelete ) { return TQWidget::close( alsoDelete ); }
/**
* Sets a filter like "*.cpp *.h *.o". Only files matching that filter
@@ -147,13 +147,13 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setNameFilter
* @see nameFilter
*/
- void setNameFilter(const QString& filter);
+ void setNameFilter(const TQString& filter);
/**
* @returns the current namefilter.
* @see setNameFilter
*/
- const QString& nameFilter() const { return dir->nameFilter(); }
+ const TQString& nameFilter() const { return dir->nameFilter(); }
/**
* Sets a list of mimetypes as filter. Only files of those mimetypes
@@ -161,7 +161,7 @@ class KIO_EXPORT KDirOperator : public QWidget
*
* Example:
* \code
- * QStringList filter;
+ * TQStringList filter;
* filter << "text/html" << "image/png" << "inode/directory";
* dirOperator->setMimefilter( filter );
* \endcode
@@ -172,12 +172,12 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see KDirLister::setMimeFilter
* @see mimeFilter
*/
- void setMimeFilter( const QStringList& mimetypes );
+ void setMimeFilter( const TQStringList& mimetypes );
/**
* @returns the current mime filter.
*/
- QStringList mimeFilter() const { return dir->mimeFilters(); }
+ TQStringList mimeFilter() const { return dir->mimeFilters(); }
/**
* Clears both the namefilter and mimetype filter, so that all files and
@@ -205,7 +205,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Clears the current selection and attempts to set @p filename
* the current file. filename is just the name, no path or url.
*/
- void setCurrentItem( const QString& filename );
+ void setCurrentItem( const TQString& filename );
/**
* Sets a new KFileView to be used for showing and browsing files.
@@ -230,7 +230,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* Returns the widget of the current view. 0L if there is no view/widget.
* (KFileView itself is not a widget.)
*/
- QWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
+ TQWidget * viewWidget() const { return m_fileView ? m_fileView->widget() : 0L; }
/**
* Sets one of the predefined fileviews
@@ -242,17 +242,17 @@ class KIO_EXPORT KDirOperator : public QWidget
/**
* Sets the way to sort files and directories.
*/
- void setSorting( QDir::SortSpec );
+ void setSorting( TQDir::SortSpec );
/**
* @returns the current way of sorting files and directories
*/
- QDir::SortSpec sorting() const { return mySorting; }
+ TQDir::SortSpec sorting() const { return mySorting; }
/**
* @returns true if we are displaying the root directory of the current url
*/
- bool isRoot() const { return url().path() == QChar('/'); }
+ bool isRoot() const { return url().path() == TQChar('/'); }
/**
* @returns the object listing the directory
@@ -289,7 +289,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* delete it yourself!
*/
// ### KDE4: make virtual
- void setPreviewWidget(const QWidget *w);
+ void setPreviewWidget(const TQWidget *w);
/**
* @returns a list of all currently selected items. If there is no view,
@@ -407,7 +407,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- void setViewConfig( KConfig *config, const QString& group );
+ void setViewConfig( KConfig *config, const TQString& group );
/**
* Returns the KConfig object used for saving and restoring view's
@@ -425,7 +425,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* configuration.
* @since 3.1
*/
- QString viewConfigGroup() const;
+ TQString viewConfigGroup() const;
/**
* Reads the default settings for a view, i.e. the default KFile::FileView.
@@ -440,7 +440,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see setViewConfig
* @see writeConfig
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current settings like sorting, simple or detailed view.
@@ -448,7 +448,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @see readConfig
* @see setViewConfig
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
@@ -478,8 +478,8 @@ class KIO_EXPORT KDirOperator : public QWidget
* to the user.
* @returns true if the directory could be created.
*/
- // ### KDE4: make virtual and turn QString into KURL
- bool mkdir( const QString& directory, bool enterDirectory = true );
+ // ### KDE4: make virtual and turn TQString into KURL
+ bool mkdir( const TQString& directory, bool enterDirectory = true );
/**
* Starts and returns a KIO::DeleteJob to delete the given @p items.
@@ -502,7 +502,7 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.1
*/
// ### KDE4: make virtual
- KIO::DeleteJob * del( const KFileItemList& items, QWidget *parent,
+ KIO::DeleteJob * del( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
/**
@@ -572,14 +572,14 @@ class KIO_EXPORT KDirOperator : public QWidget
* @since 3.4
*/
// ### KDE4: make virtual
- KIO::CopyJob * trash( const KFileItemList& items, QWidget *parent,
+ KIO::CopyJob * trash( const KFileItemList& items, TQWidget *parent,
bool ask = true, bool showProgress = true );
protected:
/**
* A view factory for creating predefined fileviews. Called internally by setView
* , but you can also call it directly. Reimplement this if you depend on self defined fileviews.
- * @param parent is the QWidget to be set as parent
+ * @param parent is the TQWidget to be set as parent
* @param view is the predefined view to be set, note: this can be several ones OR:ed together.
* @returns the created KFileView
* @see KFileView
@@ -590,14 +590,14 @@ protected:
* @see KFile::FileView
* @see setView
*/
- virtual KFileView* createView( QWidget* parent, KFile::FileView view );
+ virtual KFileView* createView( TQWidget* parent, KFile::FileView view );
/**
* Sets a custom KDirLister to list directories.
*/
// ### KDE4: make virtual
void setDirLister( KDirLister *lister );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
/**
* Sets up all the actions. Called from the constructor, you usually
@@ -698,12 +698,12 @@ public slots:
/**
* Tries to complete the given string (only completes files).
*/
- QString makeCompletion(const QString&);
+ TQString makeCompletion(const TQString&);
/**
* Tries to complete the given string (only completes directores).
*/
- QString makeDirCompletion(const QString&);
+ TQString makeDirCompletion(const TQString&);
/**
* Trashes the currently selected files/directories.
@@ -756,7 +756,7 @@ protected slots:
/**
* Called upon right-click to activate the popupmenu.
*/
- virtual void activatedMenu( const KFileItem *, const QPoint& pos );
+ virtual void activatedMenu( const KFileItem *, const TQPoint& pos );
/**
* Changes sorting to sort by name
@@ -792,12 +792,12 @@ protected slots:
* Tries to make the given @p match as current item in the view and emits
* completion( match )
*/
- void slotCompletionMatch(const QString& match);
+ void slotCompletionMatch(const TQString& match);
signals:
void urlEntered(const KURL& );
void updateInformation(int files, int dirs);
- void completion(const QString&);
+ void completion(const TQString&);
void finishedLoading();
/**
@@ -823,17 +823,17 @@ signals:
* @param urls the urls that where dropped.
* @since 3.2
*/
- void dropped(const KFileItem *item, QDropEvent*event, const KURL::List&urls);
+ void dropped(const KFileItem *item, TQDropEvent*event, const KURL::List&urls);
private:
/**
* Contains all URLs you can reach with the back button.
*/
- QPtrStack<KURL> backStack;
+ TQPtrStack<KURL> backStack;
/**
* Contains all URLs you can reach with the forward button.
*/
- QPtrStack<KURL> forwardStack;
+ TQPtrStack<KURL> forwardStack;
KDirLister *dir;
KURL currUrl;
@@ -841,7 +841,7 @@ private:
KCompletion myCompletion;
KCompletion myDirCompletion;
bool myCompleteListDirty;
- QDir::SortSpec mySorting;
+ TQDir::SortSpec mySorting;
/**
* Checks whether we preview support is available for the current
@@ -853,7 +853,7 @@ private:
* takes action on the new location. If it's a directory, change
* into it, if it's a file, correct the name, etc.
*/
- void checkPath(const QString& txt, bool takeFiles = false);
+ void checkPath(const TQString& txt, bool takeFiles = false);
void connectView(KFileView *);
@@ -869,7 +869,7 @@ private:
KFile::Mode myMode;
KProgress *progress;
- const QWidget *myPreview; // temporary pointer for the preview widget
+ const TQWidget *myPreview; // temporary pointer for the preview widget
// actions for the popupmenus
// ### clean up all those -- we have them all in the actionMenu!
@@ -928,7 +928,7 @@ private slots:
void slotViewActionAdded( KAction * );
void slotViewActionRemoved( KAction * );
- void slotViewSortingChanged( QDir::SortSpec );
+ void slotViewSortingChanged( TQDir::SortSpec );
void slotClearView();
void slotRefreshItems( const KFileItemList& items );
diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp
index b8ea409e9..a361a8bde 100644
--- a/kio/kfile/kdirselectdialog.cpp
+++ b/kio/kfile/kdirselectdialog.cpp
@@ -17,11 +17,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qstringlist.h>
-#include <qvaluestack.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqvaluestack.h>
#include <kactionclasses.h>
#include <kapplication.h>
@@ -61,9 +61,9 @@ public:
KFileSpeedBar *speedBar;
KHistoryCombo *urlCombo;
KFileTreeBranch *branch;
- QString recentDirClass;
+ TQString recentDirClass;
KURL startURL;
- QValueStack<KURL> dirsToList;
+ TQValueStack<KURL> dirsToList;
bool comboLocked : 1;
};
@@ -75,7 +75,7 @@ static KURL rootUrl(const KURL &url)
if (!kapp->authorizeURLAction("list", KURL(), root))
{
- root = KURL::fromPathOrURL( QDir::homeDirPath() );
+ root = KURL::fromPathOrURL( TQDir::homeDirPath() );
if (!kapp->authorizeURLAction("list", KURL(), root))
{
root = url;
@@ -84,8 +84,8 @@ static KURL rootUrl(const KURL &url)
return root;
}
-KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
- QWidget *parent, const char *name,
+KDirSelectDialog::KDirSelectDialog(const TQString &startDir, bool localOnly,
+ TQWidget *parent, const char *name,
bool modal)
: KDialogBase( parent, name, modal, i18n("Select Folder"),
Ok|Cancel|User1, Ok, false,
@@ -95,20 +95,20 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d = new KDirSelectDialogPrivate;
d->branch = 0L;
- QFrame *page = makeMainWidget();
- QHBoxLayout *hlay = new QHBoxLayout( page, 0, spacingHint() );
- m_mainLayout = new QVBoxLayout();
+ TQFrame *page = makeMainWidget();
+ TQHBoxLayout *hlay = new TQHBoxLayout( page, 0, spacingHint() );
+ m_mainLayout = new TQVBoxLayout();
d->speedBar = new KFileSpeedBar( page, "speedbar" );
- connect( d->speedBar, SIGNAL( activated( const KURL& )),
- SLOT( setCurrentURL( const KURL& )) );
+ connect( d->speedBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( setCurrentURL( const KURL& )) );
hlay->addWidget( d->speedBar, 0 );
hlay->addLayout( m_mainLayout, 1 );
// Create dir list
m_treeView = new KFileTreeView( page );
m_treeView->addColumn( i18n("Folders") );
- m_treeView->setColumnWidthMode( 0, QListView::Maximum );
- m_treeView->setResizeMode( QListView::AllColumns );
+ m_treeView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_treeView->setResizeMode( TQListView::AllColumns );
d->urlCombo = new KHistoryCombo( page, "url combo" );
d->urlCombo->setTrapReturnKey( true );
@@ -118,26 +118,26 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
d->urlCombo->setCompletionObject( comp, true );
d->urlCombo->setAutoDeleteCompletionObject( true );
d->urlCombo->setDuplicatesEnabled( false );
- connect( d->urlCombo, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotComboTextChanged( const QString& ) ));
+ connect( d->urlCombo, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotComboTextChanged( const TQString& ) ));
- m_contextMenu = new QPopupMenu( this );
- KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, SLOT( slotMkdir() ), this);
+ m_contextMenu = new TQPopupMenu( this );
+ KAction* newFolder = new KAction( i18n("New Folder..."), "folder_new", 0, this, TQT_SLOT( slotMkdir() ), this);
newFolder->plug(m_contextMenu);
m_contextMenu->insertSeparator();
m_showHiddenFolders = new KToggleAction ( i18n( "Show Hidden Folders" ), 0, this,
- SLOT( slotShowHiddenFoldersToggled() ), this);
+ TQT_SLOT( slotShowHiddenFoldersToggled() ), this);
m_showHiddenFolders->plug(m_contextMenu);
d->startURL = KFileDialog::getStartURL( startDir, d->recentDirClass );
if ( localOnly && !d->startURL.isLocalFile() )
{
d->startURL = KURL();
- QString docPath = KGlobalSettings::documentPath();
- if (QDir(docPath).exists())
+ TQString docPath = KGlobalSettings::documentPath();
+ if (TQDir(docPath).exists())
d->startURL.setPath( docPath );
else
- d->startURL.setPath( QDir::homeDirPath() );
+ d->startURL.setPath( TQDir::homeDirPath() );
}
KURL root = rootUrl(d->startURL);
@@ -151,15 +151,15 @@ KDirSelectDialog::KDirSelectDialog(const QString &startDir, bool localOnly,
m_mainLayout->addWidget( m_treeView, 1 );
m_mainLayout->addWidget( d->urlCombo, 0 );
- connect( m_treeView, SIGNAL( currentChanged( QListViewItem * )),
- SLOT( slotCurrentChanged() ));
- connect( m_treeView, SIGNAL( contextMenu( KListView *, QListViewItem *, const QPoint & )),
- SLOT( slotContextMenu( KListView *, QListViewItem *, const QPoint & )));
+ connect( m_treeView, TQT_SIGNAL( currentChanged( TQListViewItem * )),
+ TQT_SLOT( slotCurrentChanged() ));
+ connect( m_treeView, TQT_SIGNAL( contextMenu( KListView *, TQListViewItem *, const TQPoint & )),
+ TQT_SLOT( slotContextMenu( KListView *, TQListViewItem *, const TQPoint & )));
- connect( d->urlCombo, SIGNAL( activated( const QString& )),
- SLOT( slotURLActivated( const QString& )));
- connect( d->urlCombo, SIGNAL( returnPressed( const QString& )),
- SLOT( slotURLActivated( const QString& )));
+ connect( d->urlCombo, TQT_SIGNAL( activated( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
+ connect( d->urlCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ TQT_SLOT( slotURLActivated( const TQString& )));
setCurrentURL( d->startURL );
}
@@ -194,14 +194,14 @@ void KDirSelectDialog::setCurrentURL( const KURL& url )
d->branch = createBranch( root );
}
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
- connect( d->branch, SIGNAL( populateFinished( KFileTreeViewItem * )),
- SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ connect( d->branch, TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ TQT_SLOT( slotNextDirToList( KFileTreeViewItem * ) ));
KURL dirToList = root;
d->dirsToList.clear();
- QString path = url.path(+1);
+ TQString path = url.path(+1);
int pos = path.length();
if ( path.isEmpty() ) // e.g. ftp://host.com/ -> just list the root dir
@@ -248,7 +248,7 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
{
// scroll to make item the topmost item
view()->ensureItemVisible( item );
- QRect r = view()->itemRect( item );
+ TQRect r = view()->itemRect( item );
if ( r.isValid() )
{
int x, y;
@@ -260,25 +260,25 @@ void KDirSelectDialog::slotNextDirToList( KFileTreeViewItem *item )
openNextDir( item );
else
{
- d->branch->disconnect( SIGNAL( populateFinished( KFileTreeViewItem * )),
- this, SLOT( slotNextDirToList( KFileTreeViewItem *)));
+ d->branch->disconnect( TQT_SIGNAL( populateFinished( KFileTreeViewItem * )),
+ this, TQT_SLOT( slotNextDirToList( KFileTreeViewItem *)));
view()->setCurrentItem( item );
item->setSelected( true );
}
}
-void KDirSelectDialog::readConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::readConfig( KConfig *config, const TQString& group )
{
d->urlCombo->clear();
KConfigGroup conf( config, group );
d->urlCombo->setHistoryItems( conf.readPathListEntry( "History Items" ));
- QSize defaultSize( 400, 450 );
+ TQSize defaultSize( 400, 450 );
resize( conf.readSizeEntry( "DirSelectDialog Size", &defaultSize ));
}
-void KDirSelectDialog::saveConfig( KConfig *config, const QString& group )
+void KDirSelectDialog::saveConfig( KConfig *config, const TQString& group )
{
KConfigGroup conf( config, group );
conf.writePathEntry( "History Items", d->urlCombo->historyItems(), ',',
@@ -340,10 +340,10 @@ void KDirSelectDialog::slotCurrentChanged()
d->urlCombo->setEditText( u.prettyURL() );
}
else
- d->urlCombo->setEditText( QString::null );
+ d->urlCombo->setEditText( TQString::null );
}
-void KDirSelectDialog::slotURLActivated( const QString& text )
+void KDirSelectDialog::slotURLActivated( const TQString& text )
{
if ( text.isEmpty() )
return;
@@ -363,7 +363,7 @@ void KDirSelectDialog::slotURLActivated( const QString& text )
KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
{
- QString title = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString title = url.isLocalFile() ? url.path() : url.prettyURL();
KFileTreeBranch *branch = view()->addBranch( url, title, m_showHiddenFolders->isChecked() );
branch->setChildRecurse( false );
view()->setDirOnlyMode( branch, true );
@@ -371,7 +371,7 @@ KFileTreeBranch * KDirSelectDialog::createBranch( const KURL& url )
return branch;
}
-void KDirSelectDialog::slotComboTextChanged( const QString& text )
+void KDirSelectDialog::slotComboTextChanged( const TQString& text )
{
if ( d->branch )
{
@@ -386,7 +386,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
- QListViewItem *item = view()->currentItem();
+ TQListViewItem *item = view()->currentItem();
if ( item )
{
item->setSelected( false );
@@ -395,7 +395,7 @@ void KDirSelectDialog::slotComboTextChanged( const QString& text )
}
}
-void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoint& pos )
+void KDirSelectDialog::slotContextMenu( KListView *, TQListViewItem *, const TQPoint& pos )
{
m_contextMenu->popup( pos );
}
@@ -403,12 +403,12 @@ void KDirSelectDialog::slotContextMenu( KListView *, QListViewItem *, const QPoi
void KDirSelectDialog::slotMkdir()
{
bool ok;
- QString where = url().pathOrURL();
- QString name = i18n( "New Folder" );
- if ( url().isLocalFile() && QFileInfo( url().path(+1) + name ).exists() )
+ TQString where = url().pathOrURL();
+ TQString name = i18n( "New Folder" );
+ if ( url().isLocalFile() && TQFileInfo( url().path(+1) + name ).exists() )
name = KIO::RenameDlg::suggestName( url(), name );
- QString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
+ TQString directory = KIO::encodeFileName( KInputDialog::getText( i18n( "New Folder" ),
i18n( "Create new folder in:\n%1" ).arg( where ),
name, &ok, this));
if (!ok)
@@ -419,8 +419,8 @@ void KDirSelectDialog::slotMkdir()
bool exists = false;
KURL folderurl( url() );
- QStringList dirs = QStringList::split( QDir::separator(), directory );
- QStringList::ConstIterator it = dirs.begin();
+ TQStringList dirs = TQStringList::split( TQDir::separator(), directory );
+ TQStringList::ConstIterator it = dirs.begin();
for ( ; it != dirs.end(); ++it )
{
@@ -431,7 +431,7 @@ void KDirSelectDialog::slotMkdir()
if ( exists ) // url was already existant
{
- QString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
+ TQString which = folderurl.isLocalFile() ? folderurl.path() : folderurl.prettyURL();
KMessageBox::sorry(this, i18n("A file or folder named %1 already exists.").arg(which));
selectDirectory = false;
}
@@ -458,10 +458,10 @@ void KDirSelectDialog::slotShowHiddenFoldersToggled()
}
// static
-KURL KDirSelectDialog::selectDirectory( const QString& startDir,
+KURL KDirSelectDialog::selectDirectory( const TQString& startDir,
bool localOnly,
- QWidget *parent,
- const QString& caption)
+ TQWidget *parent,
+ const TQString& caption)
{
KDirSelectDialog myDialog( startDir, localOnly, parent,
"kdirselect dialog", true );
@@ -469,7 +469,7 @@ KURL KDirSelectDialog::selectDirectory( const QString& startDir,
if ( !caption.isNull() )
myDialog.setCaption( caption );
- if ( myDialog.exec() == QDialog::Accepted )
+ if ( myDialog.exec() == TQDialog::Accepted )
return KIO::NetAccess::mostLocalURL(myDialog.url(),parent);
else
return KURL();
diff --git a/kio/kfile/kdirselectdialog.h b/kio/kfile/kdirselectdialog.h
index 7f2bb13c5..4687d1b75 100644
--- a/kio/kfile/kdirselectdialog.h
+++ b/kio/kfile/kdirselectdialog.h
@@ -47,12 +47,12 @@ public:
* @param startDir the directory, initially shown
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent for the dialog, usually 0L
- * @param name the QObject::name
+ * @param name the TQObject::name
* @param modal if the dialog is modal or not
*/
- KDirSelectDialog(const QString& startDir = QString::null,
+ KDirSelectDialog(const TQString& startDir = TQString::null,
bool localOnly = false,
- QWidget *parent = 0L,
+ TQWidget *parent = 0L,
const char *name = 0, bool modal = false);
/**
@@ -75,18 +75,18 @@ public:
* The tree will display this directory and subdirectories of it.
* @param localOnly unused. You can only select paths below the startDir
* @param parent the parent widget to use for the dialog, or NULL to create a parent-less dialog
- * @param caption the caption to use for the dialog, or QString::null for the default caption
+ * @param caption the caption to use for the dialog, or TQString::null for the default caption
* @return The URL selected, or an empty URL if the user canceled
* or no URL was selected.
*/
- static KURL selectDirectory( const QString& startDir = QString::null,
- bool localOnly = false, QWidget *parent = 0L,
- const QString& caption = QString::null);
+ static KURL selectDirectory( const TQString& startDir = TQString::null,
+ bool localOnly = false, TQWidget *parent = 0L,
+ const TQString& caption = TQString::null);
/**
* @return The path for the root node
*/
- QString startDir() const { return m_startDir; }
+ TQString startDir() const { return m_startDir; }
public slots:
void setCurrentURL( const KURL& url );
@@ -98,26 +98,26 @@ protected:
virtual void accept();
// Layouts protected so that subclassing is easy
- QVBoxLayout *m_mainLayout;
- QString m_startDir;
+ TQVBoxLayout *m_mainLayout;
+ TQString m_startDir;
private slots:
void slotCurrentChanged();
- void slotURLActivated( const QString& );
+ void slotURLActivated( const TQString& );
void slotNextDirToList( KFileTreeViewItem *dirItem );
- void slotComboTextChanged( const QString& text );
- void slotContextMenu( KListView *, QListViewItem *, const QPoint & );
+ void slotComboTextChanged( const TQString& text );
+ void slotContextMenu( KListView *, TQListViewItem *, const TQPoint & );
void slotShowHiddenFoldersToggled();
void slotMkdir();
private:
- void readConfig( KConfig *config, const QString& group );
- void saveConfig( KConfig *config, const QString& group );
+ void readConfig( KConfig *config, const TQString& group );
+ void saveConfig( KConfig *config, const TQString& group );
void openNextDir( KFileTreeViewItem *parent );
KFileTreeBranch * createBranch( const KURL& url );
KFileTreeView *m_treeView;
- QPopupMenu *m_contextMenu;
+ TQPopupMenu *m_contextMenu;
KToggleAction *m_showHiddenFolders;
bool m_localOnly;
diff --git a/kio/kfile/kdirsize.cpp b/kio/kfile/kdirsize.cpp
index cebe42cbc..3c9bfbb8c 100644
--- a/kio/kfile/kdirsize.cpp
+++ b/kio/kfile/kdirsize.cpp
@@ -20,8 +20,8 @@
#include "kdirsize.h"
#include <kdebug.h>
#include <kglobal.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <config-kfile.h>
using namespace KIO;
@@ -35,7 +35,7 @@ KDirSize::KDirSize( const KURL & directory )
KDirSize::KDirSize( const KFileItemList & lstItems )
: KIO::Job(false /*No GUI*/), m_bAsync(true), m_totalSize(0L), m_totalFiles(0L), m_totalSubdirs(0L), m_lstItems(lstItems)
{
- QTimer::singleShot( 0, this, SLOT(processList()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(processList()) );
}
void KDirSize::processList()
@@ -70,17 +70,17 @@ void KDirSize::processList()
void KDirSize::startNextJob( const KURL & url )
{
KIO::ListJob * listJob = KIO::listRecursive( url, false /* no GUI */ );
- connect( listJob, SIGNAL(entries( KIO::Job *,
+ connect( listJob, TQT_SIGNAL(entries( KIO::Job *,
const KIO::UDSEntryList& )),
- SLOT( slotEntries( KIO::Job*,
+ TQT_SLOT( slotEntries( KIO::Job*,
const KIO::UDSEntryList& )));
addSubjob( listJob );
}
void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
{
- static const QString& dot = KGlobal::staticQString( "." );
- static const QString& dotdot = KGlobal::staticQString( ".." );
+ static const TQString& dot = KGlobal::staticQString( "." );
+ static const TQString& dotdot = KGlobal::staticQString( ".." );
KIO::UDSEntryListConstIterator it = list.begin();
KIO::UDSEntryListConstIterator end = list.end();
for (; it != end; ++it) {
@@ -88,7 +88,7 @@ void KDirSize::slotEntries( KIO::Job*, const KIO::UDSEntryList & list )
KIO::filesize_t size = 0;
bool isLink = false;
bool isDir = false;
- QString name;
+ TQString name;
for( ; it2 != (*it).end(); it2++ ) {
switch( (*it2).m_uds ) {
case KIO::UDS_NAME:
diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp
index f748b2a66..179b69f72 100644
--- a/kio/kfile/kdiskfreesp.cpp
+++ b/kio/kfile/kdiskfreesp.cpp
@@ -23,8 +23,8 @@
*/
#include "kdiskfreesp.h"
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <kprocess.h>
@@ -43,15 +43,15 @@
/***************************************************************************
* constructor
**/
-KDiskFreeSp::KDiskFreeSp(QObject *parent, const char *name)
- : QObject(parent,name)
+KDiskFreeSp::KDiskFreeSp(TQObject *parent, const char *name)
+ : TQObject(parent,name)
{
dfProc = new KProcess(); Q_CHECK_PTR(dfProc);
dfProc->setEnvironment("LANGUAGE", "C");
- connect( dfProc, SIGNAL(receivedStdout(KProcess *, char *, int) ),
- this, SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
- connect(dfProc,SIGNAL(processExited(KProcess *) ),
- this, SLOT(dfDone() ) );
+ connect( dfProc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int) ),
+ this, TQT_SLOT (receivedDFStdErrOut(KProcess *, char *, int)) );
+ connect(dfProc,TQT_SIGNAL(processExited(KProcess *) ),
+ this, TQT_SLOT(dfDone() ) );
readingDFStdErrOut=false;
}
@@ -70,21 +70,21 @@ KDiskFreeSp::~KDiskFreeSp()
**/
void KDiskFreeSp::receivedDFStdErrOut(KProcess *, char *data, int len)
{
- QCString tmp(data,len+1); // adds a zero-byte
+ TQCString tmp(data,len+1); // adds a zero-byte
dfStringErrOut.append(tmp);
}
/***************************************************************************
* reads the df-commands results
**/
-int KDiskFreeSp::readDF( const QString & mountPoint )
+int KDiskFreeSp::readDF( const TQString & mountPoint )
{
if (readingDFStdErrOut || dfProc->isRunning())
return -1;
m_mountPoint = mountPoint;
dfStringErrOut=""; // yet no data received
dfProc->clearArguments();
- (*dfProc) << QString::fromLocal8Bit(DF_COMMAND) << QString::fromLocal8Bit(DF_ARGS);
+ (*dfProc) << TQString::fromLocal8Bit(DF_COMMAND) << TQString::fromLocal8Bit(DF_ARGS);
if (!dfProc->start( KProcess::NotifyOnExit, KProcess::AllOutput ))
kdError() << "could not execute ["<< DF_COMMAND << "]" << endl;
return 1;
@@ -98,12 +98,12 @@ void KDiskFreeSp::dfDone()
{
readingDFStdErrOut=true;
- QTextStream t (dfStringErrOut, IO_ReadOnly);
- QString s=t.readLine();
- if ( (s.isEmpty()) || ( s.left(10) != QString::fromLatin1("Filesystem") ) )
+ TQTextStream t (dfStringErrOut, IO_ReadOnly);
+ TQString s=t.readLine();
+ if ( (s.isEmpty()) || ( s.left(10) != TQString::fromLatin1("Filesystem") ) )
kdError() << "Error running df command... got [" << s << "]" << endl;
while ( !t.eof() ) {
- QString u,v;
+ TQString u,v;
s=t.readLine();
s=s.simplifyWhiteSpace();
if ( !s.isEmpty() ) {
@@ -119,7 +119,7 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
- //QString deviceName = s.left(s.find(BLANK));
+ //TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
@@ -143,7 +143,7 @@ void KDiskFreeSp::dfDone()
s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
- QString mountPoint = s.stripWhiteSpace();
+ TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;
if ( mountPoint == m_mountPoint )
@@ -160,10 +160,10 @@ void KDiskFreeSp::dfDone()
delete this;
}
-KDiskFreeSp * KDiskFreeSp::findUsageInfo( const QString & path )
+KDiskFreeSp * KDiskFreeSp::findUsageInfo( const TQString & path )
{
KDiskFreeSp * job = new KDiskFreeSp;
- QString mountPoint = KIO::findPathMountPoint( path );
+ TQString mountPoint = KIO::findPathMountPoint( path );
job->readDF( mountPoint );
return job;
}
diff --git a/kio/kfile/kdiskfreesp.h b/kio/kfile/kdiskfreesp.h
index 53b83ba40..6a0591d6f 100644
--- a/kio/kfile/kdiskfreesp.h
+++ b/kio/kfile/kdiskfreesp.h
@@ -26,8 +26,8 @@
#ifndef __KDISKFREESP_H__
#define __KDISKFREESP_H__
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdelibs_export.h>
@@ -40,7 +40,7 @@ class KProcess;
class KIO_EXPORT KDiskFreeSp : public QObject
{ Q_OBJECT
public:
- KDiskFreeSp( QObject *parent=0, const char *name=0 );
+ KDiskFreeSp( TQObject *parent=0, const char *name=0 );
/**
* Destructor - this object autodeletes itself when it's done
*/
@@ -51,7 +51,7 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- int readDF( const QString & mountPoint );
+ int readDF( const TQString & mountPoint );
/**
* Call this to fire a search on the disk usage information
@@ -60,15 +60,15 @@ public:
* if this mount point is found, with the info requested.
* done is emitted in any case.
*/
- static KDiskFreeSp * findUsageInfo( const QString & path );
+ static KDiskFreeSp * findUsageInfo( const TQString & path );
signals:
- void foundMountPoint( const QString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
+ void foundMountPoint( const TQString & mountPoint, unsigned long kBSize, unsigned long kBUsed, unsigned long kBAvail );
// This one is a hack around a weird (compiler?) bug. In the former signal,
// the slot in KPropsDlg would get 0L, 0L as the last two parameters.
// When using const ulong& instead, all is ok.
- void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const QString& );
+ void foundMountPoint( const unsigned long&, const unsigned long&, const unsigned long&, const TQString& );
void done();
private slots:
@@ -77,8 +77,8 @@ private slots:
private:
KProcess *dfProc;
- QCString dfStringErrOut;
- QString m_mountPoint;
+ TQCString dfStringErrOut;
+ TQString m_mountPoint;
bool readingDFStdErrOut;
class KDiskFreeSpPrivate;
KDiskFreeSpPrivate * d;
diff --git a/kio/kfile/kencodingfiledialog.cpp b/kio/kfile/kencodingfiledialog.cpp
index 63ce8a5dc..396006504 100644
--- a/kio/kfile/kencodingfiledialog.cpp
+++ b/kio/kfile/kencodingfiledialog.cpp
@@ -27,7 +27,7 @@
#include <kglobal.h>
#include <klocale.h>
#include <kcharsets.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdiroperator.h>
#include <krecentdocument.h>
@@ -36,8 +36,8 @@ struct KEncodingFileDialogPrivate
KComboBox *encoding;
};
-KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString& encoding , const QString& filter,
- const QString& caption, KFileDialog::OperationMode type, QWidget *parent, const char* name, bool modal)
+KEncodingFileDialog::KEncodingFileDialog(const TQString& startDir, const TQString& encoding , const TQString& filter,
+ const TQString& caption, KFileDialog::OperationMode type, TQWidget *parent, const char* name, bool modal)
: KFileDialog(startDir,filter,parent,name,modal), d(new KEncodingFileDialogPrivate)
{
setCaption(caption);
@@ -46,22 +46,22 @@ KEncodingFileDialog::KEncodingFileDialog(const QString& startDir, const QString&
KToolBar *tb = toolBar();
tb->insertSeparator();
- int index = tb->insertCombo(QStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
+ int index = tb->insertCombo(TQStringList(), -1 /*id*/, false /*writable*/, 0 /*signal*/, 0 /*receiver*/, 0 /*slot*/ );
d->encoding = tb->getCombo( tb->idAt( index ) );
if ( !d->encoding )
return;
d->encoding->clear ();
- QString sEncoding = encoding;
+ TQString sEncoding = encoding;
if (sEncoding.isEmpty())
- sEncoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ sEncoding = TQString::fromLatin1(KGlobal::locale()->encoding());
- QStringList encodings (KGlobal::charsets()->availableEncodingNames());
+ TQStringList encodings (KGlobal::charsets()->availableEncodingNames());
int insert = 0;
for (uint i=0; i < encodings.count(); i++)
{
bool found = false;
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(encodings[i], found);
if (found)
{
@@ -84,19 +84,19 @@ KEncodingFileDialog::~KEncodingFileDialog()
}
-QString KEncodingFileDialog::selectedEncoding() const
+TQString KEncodingFileDialog::selectedEncoding() const
{
if (d->encoding)
return d->encoding->currentText();
else
- return QString::null;
+ return TQString::null;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -111,11 +111,11 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNameAndEncoding(cons
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const QString& encoding,
- const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(const TQString& encoding,
+ const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -129,8 +129,8 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenFileNamesAndEncoding(con
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter, QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter, TQWidget *parent, const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -145,10 +145,10 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLAndEncoding(const QSt
return res;
}
-KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QString& encoding, const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const TQString& encoding, const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KEncodingFileDialog dlg(startDir, encoding,filter,caption.isNull() ? i18n("Open") : caption,Opening,parent,
"filedialog", true);
@@ -164,21 +164,21 @@ KEncodingFileDialog::Result KEncodingFileDialog::getOpenURLsAndEncoding(const QS
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const QString& encoding,
- const QString& dir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(const TQString& encoding,
+ const TQString& dir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") : caption,
Saving,parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
@@ -189,12 +189,12 @@ KEncodingFileDialog::Result KEncodingFileDialog::getSaveFileNameAndEncoding(cons
}
-KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const QString& encoding,
- const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KEncodingFileDialog::Result KEncodingFileDialog::getSaveURLAndEncoding(const TQString& encoding,
+ const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KEncodingFileDialog dlg(specialDir?dir:QString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
+ KEncodingFileDialog dlg(specialDir?dir:TQString::null, encoding,filter,caption.isNull() ? i18n("Save As") :
caption, Saving,parent, "filedialog", true);
if ( !specialDir )
diff --git a/kio/kfile/kencodingfiledialog.h b/kio/kfile/kencodingfiledialog.h
index fbf3b34e6..15b44f9c3 100644
--- a/kio/kfile/kencodingfiledialog.h
+++ b/kio/kfile/kencodingfiledialog.h
@@ -43,9 +43,9 @@ class KIO_EXPORT KEncodingFileDialog : public KFileDialog
public:
class Result {
public:
- QStringList fileNames;
+ TQStringList fileNames;
KURL::List URLs;
- QString encoding;
+ TQString encoding;
};
/**
@@ -53,7 +53,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -64,7 +64,7 @@ public:
* same keyword.
*
* @param encoding The encoding shown in the encoding combo. If it's
- * QString::null, the global default encoding will be shown.
+ * TQString::null, the global default encoding will be shown.
*
* @param filter This is a space separated list of shell globs.
* You can set the text to be displayed for the glob, and
@@ -82,11 +82,11 @@ public:
*
* @since 3.2
*/
- KEncodingFileDialog (const QString& startDir = QString::null,
- const QString& encoding = QString::null,
- const QString& filter = QString::null,
- const QString& caption = QString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
- QWidget *parent= 0, const char *name="", bool modal = true);
+ KEncodingFileDialog (const TQString& startDir = TQString::null,
+ const TQString& encoding = TQString::null,
+ const TQString& filter = TQString::null,
+ const TQString& caption = TQString::null, KFileDialog::OperationMode type = KFileDialog::Opening,
+ TQWidget *parent= 0, const char *name="", bool modal = true);
/**
* Destructs the file dialog.
*/
@@ -94,9 +94,9 @@ public:
/**
- * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise QString::null.
+ * @returns The selected encoding if the constructor with the encoding parameter was used, otherwise TQString::null.
*/
- QString selectedEncoding() const;
+ TQString selectedEncoding() const;
/**
@@ -109,7 +109,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -126,11 +126,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and the selected
@@ -141,7 +141,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -158,11 +158,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenFileNamesAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenFileNamesAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected encoding and
@@ -173,7 +173,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -190,11 +190,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getOpenURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -208,7 +208,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -225,11 +225,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getOpenURLsAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static Result getOpenURLsAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -244,7 +244,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -261,11 +261,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveFileNameAndEncoding(const QString& encoding=QString::null,
- const QString& startDir=QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveFileNameAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir=TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -279,7 +279,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -296,11 +296,11 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static Result getSaveURLAndEncoding(const QString& encoding=QString::null,
- const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static Result getSaveURLAndEncoding(const TQString& encoding=TQString::null,
+ const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
diff --git a/kio/kfile/kfile.h b/kio/kfile/kfile.h
index 70253f9d8..91f4f4599 100644
--- a/kio/kfile/kfile.h
+++ b/kio/kfile/kfile.h
@@ -18,7 +18,7 @@
#ifndef KFILE_H
#define KFILE_H
-#include <qdir.h>
+#include <tqdir.h>
#include "kdelibs_export.h"
@@ -73,26 +73,26 @@ public:
// sorting specific
- // grr, who had the idea to set QDir::Name to 0x0?
- static bool isSortByName( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) != QDir::Time &&
- (sort & QDir::Size) != QDir::Size;
+ // grr, who had the idea to set TQDir::Name to 0x0?
+ static bool isSortByName( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) != TQDir::Time &&
+ (sort & TQDir::Size) != TQDir::Size;
}
- static bool isSortBySize( const QDir::SortSpec& sort ) {
- return (sort & QDir::Size) == QDir::Size;
+ static bool isSortBySize( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Size) == TQDir::Size;
}
- static bool isSortByDate( const QDir::SortSpec& sort ) {
- return (sort & QDir::Time) == QDir::Time;
+ static bool isSortByDate( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::Time) == TQDir::Time;
}
- static bool isSortDirsFirst( const QDir::SortSpec& sort ) {
- return (sort & QDir::DirsFirst) == QDir::DirsFirst;
+ static bool isSortDirsFirst( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::DirsFirst) == TQDir::DirsFirst;
}
- static bool isSortCaseInsensitive( const QDir::SortSpec& sort ) {
- return (sort & QDir::IgnoreCase) == QDir::IgnoreCase;
+ static bool isSortCaseInsensitive( const TQDir::SortSpec& sort ) {
+ return (sort & TQDir::IgnoreCase) == TQDir::IgnoreCase;
}
diff --git a/kio/kfile/kfilebookmarkhandler.cpp b/kio/kfile/kfilebookmarkhandler.cpp
index f69ae07a2..f78fe2547 100644
--- a/kio/kfile/kfilebookmarkhandler.cpp
+++ b/kio/kfile/kfilebookmarkhandler.cpp
@@ -28,13 +28,13 @@
#include "kfilebookmarkhandler.h"
KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
- : QObject( dialog, "KFileBookmarkHandler" ),
+ : TQObject( dialog, "KFileBookmarkHandler" ),
KBookmarkOwner(),
m_dialog( dialog )
{
m_menu = new KPopupMenu( dialog, "bookmark menu" );
- QString file = locate( "data", "kfile/bookmarks.xml" );
+ TQString file = locate( "data", "kfile/bookmarks.xml" );
if ( file.isEmpty() )
file = locateLocal( "data", "kfile/bookmarks.xml" );
@@ -42,7 +42,7 @@ KFileBookmarkHandler::KFileBookmarkHandler( KFileDialog *dialog )
// import old bookmarks
if ( !KStandardDirs::exists( file ) ) {
- QString oldFile = locate( "data", "kfile/bookmarks.html" );
+ TQString oldFile = locate( "data", "kfile/bookmarks.html" );
if ( !oldFile.isEmpty() )
importOldBookmarks( oldFile, manager );
}
@@ -59,12 +59,12 @@ KFileBookmarkHandler::~KFileBookmarkHandler()
delete m_bookmarkMenu;
}
-QString KFileBookmarkHandler::currentURL() const
+TQString KFileBookmarkHandler::currentURL() const
{
return m_dialog->baseURL().url();
}
-void KFileBookmarkHandler::importOldBookmarks( const QString& path,
+void KFileBookmarkHandler::importOldBookmarks( const TQString& path,
KBookmarkManager *manager )
{
KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( manager->root(), manager );
diff --git a/kio/kfile/kfilebookmarkhandler.h b/kio/kfile/kfilebookmarkhandler.h
index a6ad4fa2a..d03cb1da8 100644
--- a/kio/kfile/kfilebookmarkhandler.h
+++ b/kio/kfile/kfilebookmarkhandler.h
@@ -26,7 +26,7 @@ class QTextStream;
class KPopupMenu;
-class KIO_EXPORT KFileBookmarkHandler : public QObject, public KBookmarkOwner
+class KIO_EXPORT KFileBookmarkHandler : public TQObject, public KBookmarkOwner
{
Q_OBJECT
@@ -34,19 +34,19 @@ public:
KFileBookmarkHandler( KFileDialog *dialog );
~KFileBookmarkHandler();
- QPopupMenu * popupMenu();
+ TQPopupMenu * popupMenu();
// KBookmarkOwner interface:
- virtual void openBookmarkURL( const QString& url ) { emit openURL( url ); }
- virtual QString currentURL() const;
+ virtual void openBookmarkURL( const TQString& url ) { emit openURL( url ); }
+ virtual TQString currentURL() const;
KPopupMenu *menu() const { return m_menu; }
signals:
- void openURL( const QString& url );
+ void openURL( const TQString& url );
private:
- void importOldBookmarks( const QString& path, KBookmarkManager *manager );
+ void importOldBookmarks( const TQString& path, KBookmarkManager *manager );
KFileDialog *m_dialog;
KPopupMenu *m_menu;
diff --git a/kio/kfile/kfiledetailview.cpp b/kio/kfile/kfiledetailview.cpp
index 78aef5fb0..823714396 100644
--- a/kio/kfile/kfiledetailview.cpp
+++ b/kio/kfile/kfiledetailview.cpp
@@ -19,11 +19,11 @@
Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
-#include <qkeycode.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqkeycode.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kapplication.h>
#include <kfileitem.h>
@@ -52,10 +52,10 @@ public:
{ }
KFileListViewItem *dropItem;
- QTimer autoOpenTimer;
+ TQTimer autoOpenTimer;
};
-KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
+KFileDetailView::KFileDetailView(TQWidget *parent, const char *name)
: KListView(parent, name), KFileView(), d(new KFileDetailViewPrivate())
{
// this is always the static section, not the index depending on column order
@@ -73,50 +73,50 @@ KFileDetailView::KFileDetailView(QWidget *parent, const char *name)
setAllColumnsShowFocus( true );
setDragEnabled(true);
- connect( header(), SIGNAL( clicked(int)),
- SLOT(slotSortingChanged(int) ));
+ connect( header(), TQT_SIGNAL( clicked(int)),
+ TQT_SLOT(slotSortingChanged(int) ));
- connect( this, SIGNAL( returnPressed(QListViewItem *) ),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQListViewItem *) ),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL( clicked(QListViewItem *, const QPoint&, int)),
- SLOT( selected( QListViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QListViewItem *, const QPoint&, int)),
- SLOT( slotActivate( QListViewItem *) ) );
+ connect( this, TQT_SIGNAL( clicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( selected( TQListViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotActivate( TQListViewItem *) ) );
- connect( this, SIGNAL(contextMenuRequested( QListViewItem *,
- const QPoint &, int )),
- this, SLOT( slotActivateMenu( QListViewItem *, const QPoint& )));
+ connect( this, TQT_SIGNAL(contextMenuRequested( TQListViewItem *,
+ const TQPoint &, int )),
+ this, TQT_SLOT( slotActivateMenu( TQListViewItem *, const TQPoint& )));
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
// for highlighting
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * ) ),
- SLOT( highlighted( QListViewItem * ) ));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ TQT_SLOT( highlighted( TQListViewItem * ) ));
// DND
- connect( &(d->autoOpenTimer), SIGNAL( timeout() ),
- this, SLOT( slotAutoOpen() ));
+ connect( &(d->autoOpenTimer), TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpen() ));
setSorting( sorting() );
@@ -130,12 +130,12 @@ KFileDetailView::~KFileDetailView()
delete d;
}
-void KFileDetailView::readConfig( KConfig *config, const QString& group )
+void KFileDetailView::readConfig( KConfig *config, const TQString& group )
{
restoreLayout( config, group );
}
-void KFileDetailView::writeConfig( KConfig *config, const QString& group )
+void KFileDetailView::writeConfig( KConfig *config, const TQString& group )
{
saveLayout( config, group );
}
@@ -189,7 +189,7 @@ void KFileDetailView::invertSelection()
KListView::invertSelection();
}
-void KFileDetailView::slotActivateMenu (QListViewItem *item,const QPoint& pos )
+void KFileDetailView::slotActivateMenu (TQListViewItem *item,const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -209,7 +209,7 @@ void KFileDetailView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- KFileListViewItem *item = new KFileListViewItem( (QListView*) this, i );
+ KFileListViewItem *item = new KFileListViewItem( (TQListView*) this, i );
setSortingKey( item, i );
@@ -219,7 +219,7 @@ void KFileDetailView::insertItem( KFileItem *i )
m_resolver->m_lstPendingMimeIconItems.append( item );
}
-void KFileDetailView::slotActivate( QListViewItem *item )
+void KFileDetailView::slotActivate( TQListViewItem *item )
{
if ( !item )
return;
@@ -229,7 +229,7 @@ void KFileDetailView::slotActivate( QListViewItem *item )
sig->activate( fi );
}
-void KFileDetailView::selected( QListViewItem *item )
+void KFileDetailView::selected( TQListViewItem *item )
{
if ( !item )
return;
@@ -241,7 +241,7 @@ void KFileDetailView::selected( QListViewItem *item )
}
}
-void KFileDetailView::highlighted( QListViewItem *item )
+void KFileDetailView::highlighted( TQListViewItem *item )
{
if ( !item )
return;
@@ -254,33 +254,33 @@ void KFileDetailView::highlighted( QListViewItem *item )
void KFileDetailView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( this, SIGNAL( selectionChanged() ));
- disconnect( this, SIGNAL( selectionChanged( QListViewItem * ) ));
+ disconnect( this, TQT_SIGNAL( selectionChanged() ));
+ disconnect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ));
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QListView::setSelectionMode( QListView::Multi );
+ TQListView::setSelectionMode( TQListView::Multi );
break;
case KFile::Extended:
- QListView::setSelectionMode( QListView::Extended );
+ TQListView::setSelectionMode( TQListView::Extended );
break;
case KFile::NoSelection:
- QListView::setSelectionMode( QListView::NoSelection );
+ TQListView::setSelectionMode( TQListView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QListView::setSelectionMode( QListView::Single );
+ TQListView::setSelectionMode( TQListView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QListViewItem * )),
- SLOT( highlighted( QListViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQListViewItem * )),
+ TQT_SLOT( highlighted( TQListViewItem * )));
}
bool KFileDetailView::isSelected( const KFileItem *i ) const
@@ -298,7 +298,7 @@ void KFileDetailView::updateView( bool b )
if ( !b )
return;
- QListViewItemIterator it( (QListView*)this );
+ TQListViewItemIterator it( (TQListView*)this );
for ( ; it.current(); ++it ) {
KFileListViewItem *item=static_cast<KFileListViewItem *>(it.current());
item->setPixmap( 0, item->fileInfo()->pixmap(KIcon::SizeSmall) );
@@ -324,12 +324,12 @@ void KFileDetailView::setSortingKey( KFileListViewItem *item,
const KFileItem *i )
{
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
item->setKey( sortingKey( i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -353,56 +353,56 @@ void KFileDetailView::slotSortingChanged( int col )
{
// col is the section here, not the index!
- QDir::SortSpec sort = sorting();
+ TQDir::SortSpec sort = sorting();
int sortSpec = -1;
- bool reversed = (col == m_sortingCol) && (sort & QDir::Reversed) == 0;
+ bool reversed = (col == m_sortingCol) && (sort & TQDir::Reversed) == 0;
m_sortingCol = col;
switch( col ) {
case COL_NAME:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Name);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Name);
break;
case COL_SIZE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Size);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Size);
break;
case COL_DATE:
- sortSpec = (sort & ~QDir::SortByMask | QDir::Time);
+ sortSpec = (sort & ~TQDir::SortByMask | TQDir::Time);
break;
- // the following columns have no equivalent in QDir, so we set it
- // to QDir::Unsorted and remember the column (m_sortingCol)
+ // the following columns have no equivalent in TQDir, so we set it
+ // to TQDir::Unsorted and remember the column (m_sortingCol)
case COL_OWNER:
case COL_GROUP:
case COL_PERM:
- // grmbl, QDir::Unsorted == SortByMask.
- sortSpec = (sort & ~QDir::SortByMask);// | QDir::Unsorted;
+ // grmbl, TQDir::Unsorted == SortByMask.
+ sortSpec = (sort & ~TQDir::SortByMask);// | TQDir::Unsorted;
break;
default:
break;
}
if ( reversed )
- sortSpec |= QDir::Reversed;
+ sortSpec |= TQDir::Reversed;
else
- sortSpec &= ~QDir::Reversed;
+ sortSpec &= ~TQDir::Reversed;
- if ( sort & QDir::IgnoreCase )
- sortSpec |= QDir::IgnoreCase;
+ if ( sort & TQDir::IgnoreCase )
+ sortSpec |= TQDir::IgnoreCase;
else
- sortSpec &= ~QDir::IgnoreCase;
+ sortSpec &= ~TQDir::IgnoreCase;
- KFileView::setSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ KFileView::setSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
KFileItem *item;
KFileItemListIterator it( *items() );
- if ( sortSpec & QDir::Time ) {
+ if ( sortSpec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), sortSpec ));
}
- else if ( sortSpec & QDir::Size ) {
+ else if ( sortSpec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
sortSpec ));
@@ -419,30 +419,30 @@ void KFileDetailView::slotSortingChanged( int col )
KListView::sort();
if ( !m_blockSortingSignal )
- sig->changeSorting( static_cast<QDir::SortSpec>( sortSpec ) );
+ sig->changeSorting( static_cast<TQDir::SortSpec>( sortSpec ) );
}
-void KFileDetailView::setSorting( QDir::SortSpec spec )
+void KFileDetailView::setSorting( TQDir::SortSpec spec )
{
int col = 0;
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
col = COL_DATE;
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
col = COL_SIZE;
- else if ( spec & QDir::Unsorted )
+ else if ( spec & TQDir::Unsorted )
col = m_sortingCol;
else
col = COL_NAME;
// inversed, because slotSortingChanged will reverse it
- if ( spec & QDir::Reversed )
- spec = (QDir::SortSpec) (spec & ~QDir::Reversed);
+ if ( spec & TQDir::Reversed )
+ spec = (TQDir::SortSpec) (spec & ~TQDir::Reversed);
else
- spec = (QDir::SortSpec) (spec | QDir::Reversed);
+ spec = (TQDir::SortSpec) (spec | TQDir::Reversed);
m_sortingCol = col;
- KFileView::setSorting( (QDir::SortSpec) spec );
+ KFileView::setSorting( (TQDir::SortSpec) spec );
// don't emit sortingChanged() when called via setSorting()
@@ -502,7 +502,7 @@ KFileItem * KFileDetailView::prevItem( const KFileItem *fileItem ) const
return firstFileItem();
}
-void KFileDetailView::keyPressEvent( QKeyEvent *e )
+void KFileDetailView::keyPressEvent( TQKeyEvent *e )
{
KListView::keyPressEvent( e );
@@ -533,7 +533,7 @@ void KFileDetailView::listingCompleted()
m_resolver->start();
}
-QDragObject *KFileDetailView::dragObject()
+TQDragObject *KFileDetailView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -541,16 +541,16 @@ QDragObject *KFileDetailView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", KIcon::SizeSmall );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( KIcon::SizeSmall );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -572,16 +572,16 @@ void KFileDetailView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileDetailView::acceptDrag(QDropEvent* e) const
+bool KFileDetailView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!= const_cast<KFileDetailView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileDetailView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -604,7 +604,7 @@ void KFileDetailView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileDetailView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -630,13 +630,13 @@ void KFileDetailView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileDetailView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileDetailView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileDetailView::contentsDropEvent( QDropEvent *e )
+void KFileDetailView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfiledetailview.h b/kio/kfile/kfiledetailview.h
index 174a2483d..61e2156f4 100644
--- a/kio/kfile/kfiledetailview.h
+++ b/kio/kfile/kfiledetailview.h
@@ -37,8 +37,8 @@ class QKeyEvent;
class KIO_EXPORT KFileListViewItem : public KListViewItem
{
public:
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi )
: KListViewItem( parent, text ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -47,14 +47,14 @@ public:
/**
* @since 3.1
*/
- KFileListViewItem( QListView *parent, KFileItem *fi )
+ KFileListViewItem( TQListView *parent, KFileItem *fi )
: KListViewItem( parent ), inf( fi ) {
init();
}
- KFileListViewItem( QListView *parent, const QString &text,
- const QPixmap &icon, KFileItem *fi,
- QListViewItem *after)
+ KFileListViewItem( TQListView *parent, const TQString &text,
+ const TQPixmap &icon, KFileItem *fi,
+ TQListViewItem *after)
: KListViewItem( parent, after ), inf( fi ) {
setPixmap( 0, icon );
setText( 0, text );
@@ -70,17 +70,17 @@ public:
return inf;
}
- virtual QString key( int /*column*/, bool /*ascending*/ ) const {
+ virtual TQString key( int /*column*/, bool /*ascending*/ ) const {
return m_key;
}
- void setKey( const QString& key ) { m_key = key; }
+ void setKey( const TQString& key ) { m_key = key; }
- QRect rect() const
+ TQRect rect() const
{
- QRect r = listView()->itemRect(this);
- return QRect( listView()->viewportToContents( r.topLeft() ),
- QSize( r.width(), r.height() ) );
+ TQRect r = listView()->itemRect(this);
+ return TQRect( listView()->viewportToContents( r.topLeft() ),
+ TQSize( r.width(), r.height() ) );
}
/**
@@ -90,7 +90,7 @@ public:
private:
KFileItem *inf;
- QString m_key;
+ TQString m_key;
private:
class KFileListViewItemPrivate;
@@ -111,10 +111,10 @@ class KIO_EXPORT KFileDetailView : public KListView, public KFileView
Q_OBJECT
public:
- KFileDetailView(QWidget *parent, const char *name);
+ KFileDetailView(TQWidget *parent, const char *name);
virtual ~KFileDetailView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -140,17 +140,17 @@ public:
virtual void insertItem( KFileItem *i );
// implemented to get noticed about sorting changes (for sortingIndicator)
- virtual void setSorting( QDir::SortSpec );
+ virtual void setSorting( TQDir::SortSpec );
void ensureItemVisible( const KFileItem * );
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileListViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
signals:
/**
@@ -159,25 +159,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
protected:
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
- virtual bool acceptDrag(QDropEvent* e ) const;
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
+ virtual bool acceptDrag(TQDropEvent* e ) const;
int m_sortingCol;
@@ -186,16 +186,16 @@ protected slots:
private slots:
void slotSortingChanged( int );
- void selected( QListViewItem *item );
- void slotActivate( QListViewItem *item );
- void highlighted( QListViewItem *item );
- void slotActivateMenu ( QListViewItem *item, const QPoint& pos );
+ void selected( TQListViewItem *item );
+ void slotActivate( TQListViewItem *item );
+ void highlighted( TQListViewItem *item );
+ void slotActivateMenu ( TQListViewItem *item, const TQPoint& pos );
void slotAutoOpen();
private:
- virtual void insertItem(QListViewItem *i) { KListView::insertItem(i); }
+ virtual void insertItem(TQListViewItem *i) { KListView::insertItem(i); }
virtual void setSorting(int i, bool b) { KListView::setSorting(i, b); }
- virtual void setSelected(QListViewItem *i, bool b) { KListView::setSelected(i, b); }
+ virtual void setSelected(TQListViewItem *i, bool b) { KListView::setSelected(i, b); }
inline KFileListViewItem * viewItem( const KFileItem *item ) const {
if ( item )
diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp
index 5668ec616..f206a4887 100644
--- a/kio/kfile/kfiledialog.cpp
+++ b/kio/kfile/kfiledialog.cpp
@@ -28,19 +28,19 @@
#include <stdlib.h>
#include <stdio.h>
-#include <qptrcollection.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
-#include <qtextcodec.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qfiledialog.h>
+#include <tqptrcollection.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
+#include <tqtextcodec.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqfiledialog.h>
#include <kaccel.h>
#include <kaction.h>
@@ -97,7 +97,7 @@
enum Buttons { HOTLIST_BUTTON,
PATH_COMBO, CONFIGURE_BUTTON };
-template class QPtrList<KIO::StatJob>;
+template class TQPtrList<KIO::StatJob>;
namespace {
static void silenceQToolBar(QtMsgType, const char *)
@@ -111,36 +111,36 @@ struct KFileDialogPrivate
KURL url;
// the selected filenames in multiselection mode -- FIXME
- QString filenames;
+ TQString filenames;
// the name of the filename set by setSelection
- QString selection;
+ TQString selection;
// now following all kind of widgets, that I need to rebuild
// the geometry management
- QBoxLayout *boxLayout;
- QWidget *mainWidget;
+ TQBoxLayout *boxLayout;
+ TQWidget *mainWidget;
- QLabel *locationLabel;
+ TQLabel *locationLabel;
// @deprecated remove in KDE4
- QLabel *filterLabel;
+ TQLabel *filterLabel;
KURLComboBox *pathCombo;
KPushButton *okButton, *cancelButton;
KFileSpeedBar *urlBar;
- QHBoxLayout *urlBarLayout;
- QWidget *customWidget;
+ TQHBoxLayout *urlBarLayout;
+ TQWidget *customWidget;
// Automatically Select Extension stuff
- QCheckBox *autoSelectExtCheckBox;
+ TQCheckBox *autoSelectExtCheckBox;
bool autoSelectExtChecked; // whether or not the _user_ has checked the above box
- QString extension; // current extension for this filter
+ TQString extension; // current extension for this filter
- QPtrList<KIO::StatJob> statJobs;
+ TQPtrList<KIO::StatJob> statJobs;
KURL::List urlList; //the list of selected urls
- QStringList mimetypes; //the list of possible mimetypes to save as
+ TQStringList mimetypes; //the list of possible mimetypes to save as
// indicates if the location edit should be kept or cleared when changing
// directories
@@ -154,7 +154,7 @@ struct KFileDialogPrivate
KFileDialog::OperationMode operationMode;
// The file class used for KRecentDirs
- QString fileClass;
+ TQString fileClass;
KFileBookmarkHandler *bookmarkHandler;
@@ -166,16 +166,16 @@ KURL *KFileDialog::lastDirectory; // to set the start path
static KStaticDeleter<KURL> ldd;
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, 0 );
}
-KFileDialog::KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char* name, bool modal, QWidget* widget)
- : KDialogBase( parent, name, modal, QString::null, 0 )
+KFileDialog::KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char* name, bool modal, TQWidget* widget)
+ : KDialogBase( parent, name, modal, TQString::null, 0 )
{
init( startDir, filter, widget );
}
@@ -197,12 +197,12 @@ KFileDialog::~KFileDialog()
delete d;
}
-void KFileDialog::setLocationLabel(const QString& text)
+void KFileDialog::setLocationLabel(const TQString& text)
{
d->locationLabel->setText(text);
}
-void KFileDialog::setFilter(const QString& filter)
+void KFileDialog::setFilter(const TQString& filter)
{
int pos = filter.find('/');
@@ -210,7 +210,7 @@ void KFileDialog::setFilter(const QString& filter)
// interpret as a MIME filter.
if (pos > 0 && filter[pos - 1] != '\\') {
- QStringList filters = QStringList::split( " ", filter );
+ TQStringList filters = TQStringList::split( " ", filter );
setMimeFilter( filters );
return;
}
@@ -218,7 +218,7 @@ void KFileDialog::setFilter(const QString& filter)
// Strip the escape characters from
// escaped '/' characters.
- QString copy (filter);
+ TQString copy (filter);
for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos)
copy.remove(pos, 1);
@@ -231,13 +231,13 @@ void KFileDialog::setFilter(const QString& filter)
updateAutoSelectExtension ();
}
-QString KFileDialog::currentFilter() const
+TQString KFileDialog::currentFilter() const
{
return filterWidget->currentFilter();
}
// deprecated
-void KFileDialog::setFilterMimeType(const QString &label,
+void KFileDialog::setFilterMimeType(const TQString &label,
const KMimeType::List &types,
const KMimeType::Ptr &defaultType)
{
@@ -251,14 +251,14 @@ void KFileDialog::setFilterMimeType(const QString &label,
setMimeFilter( d->mimetypes, defaultType->name() );
}
-void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
- const QString& defaultType )
+void KFileDialog::setMimeFilter( const TQStringList& mimeTypes,
+ const TQString& defaultType )
{
d->mimetypes = mimeTypes;
filterWidget->setMimeFilter( mimeTypes, defaultType );
- QStringList types = QStringList::split(" ", filterWidget->currentFilter());
- types.append( QString::fromLatin1( "inode/directory" ));
+ TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
+ types.append( TQString::fromLatin1( "inode/directory" ));
ops->clearFilter();
ops->setMimeFilter( types );
d->hasDefaultFilter = !defaultType.isEmpty();
@@ -271,7 +271,7 @@ void KFileDialog::setMimeFilter( const QStringList& mimeTypes,
void KFileDialog::clearFilter()
{
d->mimetypes.clear();
- filterWidget->setFilter( QString::null );
+ filterWidget->setFilter( TQString::null );
ops->clearFilter();
d->hasDefaultFilter = false;
filterWidget->setEditable( true );
@@ -279,7 +279,7 @@ void KFileDialog::clearFilter()
updateAutoSelectExtension ();
}
-QString KFileDialog::currentMimeFilter() const
+TQString KFileDialog::currentMimeFilter() const
{
int i = filterWidget->currentItem();
if (filterWidget->showsAllTypes())
@@ -287,7 +287,7 @@ QString KFileDialog::currentMimeFilter() const
if ((i >= 0) && (i < (int) d->mimetypes.count()))
return d->mimetypes[i];
- return QString::null; // The "all types" item has no mimetype
+ return TQString::null; // The "all types" item has no mimetype
}
KMimeType::Ptr KFileDialog::currentFilterMimeType()
@@ -295,7 +295,7 @@ KMimeType::Ptr KFileDialog::currentFilterMimeType()
return KMimeType::mimeType( currentMimeFilter() );
}
-void KFileDialog::setPreviewWidget(const QWidget *w) {
+void KFileDialog::setPreviewWidget(const TQWidget *w) {
ops->setPreviewWidget(w);
ops->clearHistory();
d->hasView = true;
@@ -307,14 +307,14 @@ void KFileDialog::setPreviewWidget(const KPreviewWidgetBase *w) {
d->hasView = true;
}
-KURL KFileDialog::getCompleteURL(const QString &_url)
+KURL KFileDialog::getCompleteURL(const TQString &_url)
{
- QString url = KShell::tildeExpand(_url);
+ TQString url = KShell::tildeExpand(_url);
KURL u;
if ( KURL::isRelativeURL(url) ) // only a full URL isn't relative. Even /path is.
{
- if (!url.isEmpty() && !QDir::isRelativePath(url) ) // absolute path
+ if (!url.isEmpty() && !TQDir::isRelativePath(url) ) // absolute path
u.setPath( url );
else
{
@@ -342,7 +342,7 @@ void KFileDialog::slotOk()
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
if ( !items || items->isEmpty() )
{
- QString msg;
+ TQString msg;
if ( d->operationMode == Saving )
msg = i18n("Please specify the filename to save to.");
else
@@ -357,8 +357,8 @@ void KFileDialog::slotOk()
bool multi = (mode() & KFile::Files) != 0;
KFileItemListIterator it( *items );
- QString endQuote = QString::fromLatin1("\" ");
- QString name, files;
+ TQString endQuote = TQString::fromLatin1("\" ");
+ TQString name, files;
while ( it.current() ) {
name = (*it)->name();
if ( multi ) {
@@ -382,7 +382,7 @@ void KFileDialog::slotOk()
!(items->isEmpty() && !dirOnly) ) {
d->urlList.clear();
- d->filenames = QString::null;
+ d->filenames = TQString::null;
if ( dirOnly ) {
d->url = ops->url();
@@ -421,7 +421,7 @@ void KFileDialog::slotOk()
KURL selectedURL;
if ( (mode() & KFile::Files) == KFile::Files ) {// multiselection mode
- QString locationText = locationEdit->currentText();
+ TQString locationText = locationEdit->currentText();
if ( locationText.contains( '/' )) {
// relative path? -> prepend the current directory
KURL u( ops->url(), KShell::tildeExpand(locationText));
@@ -464,9 +464,9 @@ void KFileDialog::slotOk()
bool done = true;
if ( d->url.isLocalFile() ) {
if ( locationEdit->currentText().stripWhiteSpace().isEmpty() ) {
- QFileInfo info( d->url.path() );
+ TQFileInfo info( d->url.path() );
if ( info.isDir() ) {
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
accept();
@@ -492,10 +492,10 @@ void KFileDialog::slotOk()
if ( ops->dirOnlyMode() )
{
KURL fullURL(d->url, locationEdit->currentText());
- if ( QFile::exists( fullURL.path() ) )
+ if ( TQFile::exists( fullURL.path() ) )
{
d->url = fullURL;
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
return;
@@ -512,7 +512,7 @@ void KFileDialog::slotOk()
}
else { // FIXME: remote directory, should we allow that?
// qDebug( "**** Selected remote directory: %s", d->url.url().latin1());
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
d->urlList.append( d->url );
@@ -528,7 +528,7 @@ void KFileDialog::slotOk()
if (!kapp->authorizeURLAction("open", KURL(), d->url))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, d->url.prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -546,7 +546,7 @@ void KFileDialog::slotOk()
{
if (!kapp->authorizeURLAction("open", KURL(), *it))
{
- QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
+ TQString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, (*it).prettyURL());
KMessageBox::error( d->mainWidget, msg);
return;
}
@@ -558,8 +558,8 @@ void KFileDialog::slotOk()
job->setWindow (topLevelWidget());
KIO::Scheduler::scheduleJob( job );
d->statJobs.append( job );
- connect( job, SIGNAL( result(KIO::Job *) ),
- SLOT( slotStatResult( KIO::Job *) ));
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ TQT_SLOT( slotStatResult( KIO::Job *) ));
}
return;
}
@@ -567,7 +567,7 @@ void KFileDialog::slotOk()
job = KIO::stat(d->url,!d->url.isLocalFile());
job->setWindow (topLevelWidget());
d->statJobs.append( job );
- connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotStatResult(KIO::Job*)));
+ connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotStatResult(KIO::Job*)));
}
@@ -616,7 +616,7 @@ void KFileDialog::slotStatResult(KIO::Job* job)
{
if ( ops->dirOnlyMode() )
{
- d->filenames = QString::null;
+ d->filenames = TQString::null;
d->urlList.clear();
accept();
}
@@ -644,23 +644,23 @@ void KFileDialog::slotStatResult(KIO::Job* job)
void KFileDialog::accept()
{
- setResult( QDialog::Accepted ); // parseSelectedURLs() checks that
+ setResult( TQDialog::Accepted ); // parseSelectedURLs() checks that
*lastDirectory = ops->url();
if (!d->fileClass.isEmpty())
KRecentDirs::add(d->fileClass, ops->url().url());
// clear the topmost item, we insert it as full path later on as item 1
- locationEdit->changeItem( QString::null, 0 );
+ locationEdit->changeItem( TQString::null, 0 );
KURL::List list = selectedURLs();
- QValueListConstIterator<KURL> it = list.begin();
+ TQValueListConstIterator<KURL> it = list.begin();
for ( ; it != list.end(); ++it ) {
const KURL& url = *it;
// we strip the last slash (-1) because KURLComboBox does that as well
// when operating in file-mode. If we wouldn't , dupe-finding wouldn't
// work.
- QString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
+ TQString file = url.isLocalFile() ? url.path(-1) : url.prettyURL(-1);
// remove dupes
for ( int i = 1; i < locationEdit->count(); i++ ) {
@@ -751,9 +751,9 @@ void KFileDialog::multiSelectionChanged()
return;
}
- static const QString &begin = KGlobal::staticQString(" \"");
+ static const TQString &begin = KGlobal::staticQString(" \"");
KFileItemListIterator it ( *list );
- QString text;
+ TQString text;
while ( (item = it.current()) ) {
text.append( begin ).append( item->name() ).append( '\"' );
++it;
@@ -762,16 +762,16 @@ void KFileDialog::multiSelectionChanged()
setLocationText( text.stripWhiteSpace() );
}
-void KFileDialog::setLocationText( const QString& text )
+void KFileDialog::setLocationText( const TQString& text )
{
// setCurrentItem() will cause textChanged() being emitted,
// so slotLocationChanged() will be called. Make sure we don't clear
// the KDirOperator's view-selection in there
- disconnect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- this, SLOT( slotLocationChanged( const QString& ) ) );
+ disconnect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ this, TQT_SLOT( slotLocationChanged( const TQString& ) ) );
locationEdit->setCurrentItem( 0 );
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
locationEdit->setEditText( text );
// don't change selection when user has clicked on an item
@@ -785,7 +785,7 @@ static const char autocompletionWhatsThisText[] = I18N_NOOP("<p>While typing in
"and selecting a preferred mode from the <b>Text Completion</b> menu.") "</qt>";
void KFileDialog::updateLocationWhatsThis (void)
{
- QString whatsThisText;
+ TQString whatsThisText;
if (d->operationMode == KFileDialog::Saving)
{
whatsThisText = "<qt>" + i18n("This is the name to save the file as.") +
@@ -804,11 +804,11 @@ void KFileDialog::updateLocationWhatsThis (void)
i18n (autocompletionWhatsThisText);
}
- QWhatsThis::add(d->locationLabel, whatsThisText);
- QWhatsThis::add(locationEdit, whatsThisText);
+ TQWhatsThis::add(d->locationLabel, whatsThisText);
+ TQWhatsThis::add(locationEdit, whatsThisText);
}
-void KFileDialog::init(const QString& startDir, const QString& filter, QWidget* widget)
+void KFileDialog::init(const TQString& startDir, const TQString& filter, TQWidget* widget)
{
initStatic();
d = new KFileDialogPrivate();
@@ -819,13 +819,13 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->bookmarkHandler = 0;
d->hasDefaultFilter = false;
d->hasView = false;
- d->mainWidget = new QWidget( this, "KFileDialog::mainWidget");
+ d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget");
setMainWidget( d->mainWidget );
d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget );
d->okButton->setDefault( true );
d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget);
- connect( d->okButton, SIGNAL( clicked() ), SLOT( slotOk() ));
- connect( d->cancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ));
+ connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() ));
+ connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() ));
d->customWidget = widget;
d->autoSelectExtCheckBox = 0; // delayed loading
d->autoSelectExtChecked = false;
@@ -838,20 +838,20 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true,
toolbar, "path combo" );
- QToolTip::add( d->pathCombo, i18n("Current location") );
- QWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
+ TQToolTip::add( d->pathCombo, i18n("Current location") );
+ TQWhatsThis::add( d->pathCombo, "<qt>" + i18n("This is the currently listed location. "
"The drop-down list also lists commonly used locations. "
"This includes standard locations, such as your home folder, as well as "
"locations that have been visited recently.") + i18n (autocompletionWhatsThisText));
KURL u;
- u.setPath( QDir::rootDirPath() );
- QString text = i18n("Root Folder: %1").arg( u.path() );
+ u.setPath( TQDir::rootDirPath() );
+ TQString text = i18n("Root Folder: %1").arg( u.path() );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
text = i18n("Home Folder: %1").arg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
@@ -859,7 +859,7 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() );
if ( (u.path(+1) != docPath.path(+1)) &&
- QDir(docPath.path(+1)).exists() )
+ TQDir(docPath.path(+1)).exists() )
{
text = i18n("Documents: %1").arg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( docPath,
@@ -879,10 +879,10 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
// If local, check it exists. If not, go up until it exists.
if ( d->url.isLocalFile() )
{
- if ( !QFile::exists( d->url.path() ) )
+ if ( !TQFile::exists( d->url.path() ) )
{
d->url = d->url.upURL();
- QDir dir( d->url.path() );
+ TQDir dir( d->url.path() );
while ( !dir.exists() )
{
d->url = d->url.upURL();
@@ -893,14 +893,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops");
ops->setOnlyDoubleClickSelectsFiles( true );
- connect(ops, SIGNAL(urlEntered(const KURL&)),
- SLOT(urlEntered(const KURL&)));
- connect(ops, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(ops, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
- connect(ops, SIGNAL(finishedLoading()),
- SLOT(slotLoadingFinished()));
+ connect(ops, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT(urlEntered(const KURL&)));
+ connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(finishedLoading()),
+ TQT_SLOT(slotLoadingFinished()));
ops->setupMenu(KDirOperator::SortActions |
KDirOperator::FileActions |
@@ -925,14 +925,14 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
KToggleAction *showSidebarAction =
new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar");
showSidebarAction->setCheckedState(i18n("Hide Quick Access Navigation Panel"));
- connect( showSidebarAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleSpeedbar( bool )) );
+ connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleSpeedbar( bool )) );
KToggleAction *showBookmarksAction =
new KToggleAction(i18n("Show Bookmarks"), 0, coll, "toggleBookmarks");
showBookmarksAction->setCheckedState(i18n("Hide Bookmarks"));
- connect( showBookmarksAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleBookmarks( bool )) );
+ connect( showBookmarksAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleBookmarks( bool )) );
KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" );
menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. "
@@ -960,8 +960,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
menu->insert( coll->action( "separate dirs" ));
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ),
- ops, SLOT( updateSelectionDependentActions() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ ops, TQT_SLOT( updateSelectionDependentActions() ));
menu->plug( toolbar );
//Insert a separator.
@@ -981,37 +981,37 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
d->pathCombo->setCompletionObject( pathCompletionObj );
d->pathCombo->setAutoDeleteCompletionObject( true );
- connect( d->pathCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( enterURL( const KURL& ) ));
- connect( d->pathCombo, SIGNAL( returnPressed( const QString& )),
- this, SLOT( enterURL( const QString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( enterURL( const KURL& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( enterURL( const TQString& ) ));
- QString whatsThisText;
+ TQString whatsThisText;
// the Location label/edit
- d->locationLabel = new QLabel(i18n("&Location:"), d->mainWidget);
+ d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget);
locationEdit = new KURLComboBox(KURLComboBox::Files, true,
d->mainWidget, "LocationEdit");
- connect( locationEdit, SIGNAL( textChanged( const QString& ) ),
- SLOT( slotLocationChanged( const QString& )) );
+ connect( locationEdit, TQT_SIGNAL( textChanged( const TQString& ) ),
+ TQT_SLOT( slotLocationChanged( const TQString& )) );
updateLocationWhatsThis ();
d->locationLabel->setBuddy(locationEdit);
locationEdit->setFocus();
KURLCompletion *fileCompletionObj = new KURLCompletion( KURLCompletion::FileCompletion );
- QString dir = d->url.url(+1);
+ TQString dir = d->url.url(+1);
pathCompletionObj->setDir( dir );
fileCompletionObj->setDir( dir );
locationEdit->setCompletionObject( fileCompletionObj );
locationEdit->setAutoDeleteCompletionObject( true );
- connect( fileCompletionObj, SIGNAL( match( const QString& ) ),
- SLOT( fileCompletion( const QString& )) );
+ connect( fileCompletionObj, TQT_SIGNAL( match( const TQString& ) ),
+ TQT_SLOT( fileCompletion( const TQString& )) );
- connect( locationEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotOk()));
- connect(locationEdit, SIGNAL( activated( const QString& )),
- this, SLOT( locationActivated( const QString& ) ));
+ connect( locationEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotOk()));
+ connect(locationEdit, TQT_SIGNAL( activated( const TQString& )),
+ this, TQT_SLOT( locationActivated( const TQString& ) ));
// the Filter label/edit
whatsThisText = i18n("<qt>This is the filter to apply to the file list. "
@@ -1020,19 +1020,19 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
"drop down menu, or you may enter a custom filter "
"directly into the text area.<p>"
"Wildcards such as * and ? are allowed.</qt>");
- d->filterLabel = new QLabel(i18n("&Filter:"), d->mainWidget);
- QWhatsThis::add(d->filterLabel, whatsThisText);
+ d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget);
+ TQWhatsThis::add(d->filterLabel, whatsThisText);
filterWidget = new KFileFilterCombo(d->mainWidget,
"KFileDialog::filterwidget");
- QWhatsThis::add(filterWidget, whatsThisText);
+ TQWhatsThis::add(filterWidget, whatsThisText);
setFilter(filter);
d->filterLabel->setBuddy(filterWidget);
- connect(filterWidget, SIGNAL(filterChanged()), SLOT(slotFilterChanged()));
+ connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged()));
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
- d->autoSelectExtCheckBox = new QCheckBox (d->mainWidget);
- connect(d->autoSelectExtCheckBox, SIGNAL(clicked()), SLOT(slotAutoSelectExtClicked()));
+ d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget);
+ connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked()));
initGUI(); // activate GM
@@ -1049,8 +1049,8 @@ void KFileDialog::init(const QString& startDir, const QString& filter, QWidget*
void KFileDialog::initSpeedbar()
{
d->urlBar = new KFileSpeedBar( d->mainWidget, "url bar" );
- connect( d->urlBar, SIGNAL( activated( const KURL& )),
- SLOT( enterURL( const KURL& )) );
+ connect( d->urlBar, TQT_SIGNAL( activated( const KURL& )),
+ TQT_SLOT( enterURL( const KURL& )) );
// need to set the current url of the urlbar manually (not via urlEntered()
// here, because the initial url of KDirOperator might be the same as the
@@ -1065,16 +1065,16 @@ void KFileDialog::initGUI()
{
delete d->boxLayout; // deletes all sub layouts
- d->boxLayout = new QVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
+ d->boxLayout = new TQVBoxLayout( d->mainWidget, 0, KDialog::spacingHint());
d->boxLayout->addWidget(toolbar, AlignTop);
- d->urlBarLayout = new QHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
- QVBoxLayout *vbox = new QVBoxLayout( d->urlBarLayout );
+ d->urlBarLayout = new TQHBoxLayout( d->boxLayout ); // needed for the urlBar that may appear
+ TQVBoxLayout *vbox = new TQVBoxLayout( d->urlBarLayout );
vbox->addWidget(ops, 4);
vbox->addSpacing(3);
- QGridLayout* lafBox= new QGridLayout(2, 3, KDialog::spacingHint());
+ TQGridLayout* lafBox= new TQGridLayout(2, 3, KDialog::spacingHint());
lafBox->addWidget(d->locationLabel, 0, 0, AlignVCenter);
lafBox->addWidget(locationEdit, 0, 1, AlignVCenter);
@@ -1107,7 +1107,7 @@ void KFileDialog::initGUI()
// ...add it to the dialog, below the filter list box.
// Change the parent so that this widget is a child of the main widget
- d->customWidget->reparent( d->mainWidget, QPoint() );
+ d->customWidget->reparent( d->mainWidget, TQPoint() );
vbox->addWidget( d->customWidget );
vbox->addSpacing(3);
@@ -1130,11 +1130,11 @@ void KFileDialog::initGUI()
void KFileDialog::slotFilterChanged()
{
- QString filter = filterWidget->currentFilter();
+ TQString filter = filterWidget->currentFilter();
ops->clearFilter();
if ( filter.find( '/' ) > -1 ) {
- QStringList types = QStringList::split( " ", filter );
+ TQStringList types = TQStringList::split( " ", filter );
types.prepend( "inode/directory" );
ops->setMimeFilter( types );
}
@@ -1151,15 +1151,15 @@ void KFileDialog::slotFilterChanged()
void KFileDialog::setURL(const KURL& url, bool clearforward)
{
- d->selection = QString::null;
+ d->selection = TQString::null;
ops->setURL( url, clearforward);
}
// Protected
void KFileDialog::urlEntered(const KURL& url)
{
- QString filename = locationEdit->currentText();
- d->selection = QString::null;
+ TQString filename = locationEdit->currentText();
+ d->selection = TQString::null;
if ( d->pathCombo->count() != 0 ) { // little hack
d->pathCombo->setURL( url );
@@ -1172,7 +1172,7 @@ void KFileDialog::urlEntered(const KURL& url)
locationEdit->blockSignals( false );
- QString dir = url.url(+1);
+ TQString dir = url.url(+1);
static_cast<KURLCompletion*>( d->pathCombo->completionObject() )->setDir( dir );
static_cast<KURLCompletion*>( locationEdit->completionObject() )->setDir( dir );
@@ -1180,7 +1180,7 @@ void KFileDialog::urlEntered(const KURL& url)
d->urlBar->setCurrentItem( url );
}
-void KFileDialog::locationActivated( const QString& url )
+void KFileDialog::locationActivated( const TQString& url )
{
// This guard prevents any URL _typed_ by the user from being interpreted
// twice (by returnPressed/slotOk and here, activated/locationActivated)
@@ -1196,7 +1196,7 @@ void KFileDialog::enterURL( const KURL& url)
setURL( url );
}
-void KFileDialog::enterURL( const QString& url )
+void KFileDialog::enterURL( const TQString& url )
{
setURL( KURL::fromPathOrURL( KURLCompletion::replacedPath( url, true, true )) );
}
@@ -1210,12 +1210,12 @@ void KFileDialog::toolbarCallback(int) // SLOT
}
-void KFileDialog::setSelection(const QString& url)
+void KFileDialog::setSelection(const TQString& url)
{
kdDebug(kfile_area) << "setSelection " << url << endl;
if (url.isEmpty()) {
- d->selection = QString::null;
+ d->selection = TQString::null;
return;
}
@@ -1235,7 +1235,7 @@ void KFileDialog::setSelection(const QString& url)
*/
KFileItem i(KFileItem::Unknown, KFileItem::Unknown, u, true );
// KFileItem i(u.path());
- if ( i.isDir() && u.isLocalFile() && QFile::exists( u.path() ) ) {
+ if ( i.isDir() && u.isLocalFile() && TQFile::exists( u.path() ) ) {
// trust isDir() only if the file is
// local (we cannot stat non-local urls) and if it exists!
// (as KFileItem does not check if the file exists or not
@@ -1243,13 +1243,13 @@ void KFileDialog::setSelection(const QString& url)
setURL(u, true);
}
else {
- QString filename = u.url();
+ TQString filename = u.url();
int sep = filename.findRev('/');
if (sep >= 0) { // there is a / in it
if ( KProtocolInfo::supportsListing( u )) {
KURL dir(u);
- dir.setQuery( QString::null );
- dir.setFileName( QString::null );
+ dir.setQuery( TQString::null );
+ dir.setFileName( TQString::null );
setURL(dir, true );
}
@@ -1282,13 +1282,13 @@ void KFileDialog::slotLoadingFinished()
}
// ### remove in KDE4
-void KFileDialog::pathComboChanged( const QString& )
+void KFileDialog::pathComboChanged( const TQString& )
{
}
-void KFileDialog::dirCompletion( const QString& ) // SLOT
+void KFileDialog::dirCompletion( const TQString& ) // SLOT
{
}
-void KFileDialog::fileCompletion( const QString& match )
+void KFileDialog::fileCompletion( const TQString& match )
{
if ( match.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1296,7 +1296,7 @@ void KFileDialog::fileCompletion( const QString& match )
ops->setCurrentItem( match );
}
-void KFileDialog::slotLocationChanged( const QString& text )
+void KFileDialog::slotLocationChanged( const TQString& text )
{
if ( text.isEmpty() && ops->view() )
ops->view()->clearSelection();
@@ -1309,9 +1309,9 @@ void KFileDialog::updateStatusLine(int /* dirs */, int /* files */)
kdWarning() << "KFileDialog::updateStatusLine is deprecated! The status line no longer exists. Do not try and use it!" << endl;
}
-QString KFileDialog::getOpenFileName(const QString& startDir,
- const QString& filter,
- QWidget *parent, const QString& caption)
+TQString KFileDialog::getOpenFileName(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1325,11 +1325,11 @@ QString KFileDialog::getOpenFileName(const QString& startDir,
return dlg.selectedFile();
}
-QString KFileDialog::getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption)
+TQString KFileDialog::getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption)
{
- QWidget* parent = QWidget::find( parent_id );
+ TQWidget* parent = TQWidget::find( parent_id );
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
@@ -1349,10 +1349,10 @@ QString KFileDialog::getOpenFileNameWId(const QString& startDir,
return dlg.selectedFile();
}
-QStringList KFileDialog::getOpenFileNames(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQStringList KFileDialog::getOpenFileNames(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1365,8 +1365,8 @@ QStringList KFileDialog::getOpenFileNames(const QString& startDir,
return dlg.selectedFiles();
}
-KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getOpenURL(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1379,10 +1379,10 @@ KURL KFileDialog::getOpenURL(const QString& startDir, const QString& filter,
return dlg.selectedURL();
}
-KURL::List KFileDialog::getOpenURLs(const QString& startDir,
- const QString& filter,
- QWidget *parent,
- const QString& caption)
+KURL::List KFileDialog::getOpenURLs(const TQString& startDir,
+ const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
KFileDialog dlg(startDir, filter, parent, "filedialog", true);
dlg.setOperationMode( Opening );
@@ -1395,19 +1395,19 @@ KURL::List KFileDialog::getOpenURLs(const QString& startDir,
return dlg.selectedURLs();
}
-KURL KFileDialog::getExistingURL(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getExistingURL(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
return KDirSelectDialog::selectDirectory(startDir, false, parent, caption);
}
-QString KFileDialog::getExistingDirectory(const QString& startDir,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getExistingDirectory(const TQString& startDir,
+ TQWidget *parent,
+ const TQString& caption)
{
#ifdef Q_WS_WIN
- return QFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
+ return TQFileDialog::getExistingDirectory(startDir, parent, "getExistingDirectory",
caption, true, true);
#else
KURL url = KDirSelectDialog::selectDirectory(startDir, true, parent,
@@ -1415,14 +1415,14 @@ QString KFileDialog::getExistingDirectory(const QString& startDir,
if ( url.isValid() )
return url.path();
- return QString::null;
+ return TQString::null;
#endif
}
-KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
- const QString& caption)
+KURL KFileDialog::getImageOpenURL( const TQString& startDir, TQWidget *parent,
+ const TQString& caption)
{
- QStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
+ TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading );
KFileDialog dlg(startDir,
mimetypes.join(" "),
parent, "filedialog", true);
@@ -1439,7 +1439,7 @@ KURL KFileDialog::getImageOpenURL( const QString& startDir, QWidget *parent,
KURL KFileDialog::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return d->url;
else
return KURL();
@@ -1448,7 +1448,7 @@ KURL KFileDialog::selectedURL() const
KURL::List KFileDialog::selectedURLs() const
{
KURL::List list;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files )
list = parseSelectedURLs();
else
@@ -1466,7 +1466,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const
d->urlList.clear();
if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename
- static const QString &prot = KGlobal::staticQString(":/");
+ static const TQString &prot = KGlobal::staticQString(":/");
KURL u;
if ( d->filenames.find( prot ) != -1 )
u = d->filenames;
@@ -1485,18 +1485,18 @@ KURL::List& KFileDialog::parseSelectedURLs() const
else
d->urlList = tokenize( d->filenames );
- d->filenames = QString::null; // indicate that we parsed that one
+ d->filenames = TQString::null; // indicate that we parsed that one
return d->urlList;
}
// FIXME: current implementation drawback: a filename can't contain quotes
-KURL::List KFileDialog::tokenize( const QString& line ) const
+KURL::List KFileDialog::tokenize( const TQString& line ) const
{
KURL::List urls;
KURL u( ops->url() );
- QString name;
+ TQString name;
int count = line.contains( '"' );
if ( count == 0 ) { // no " " -> assume one single file
@@ -1508,7 +1508,7 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
if ( (count % 2) == 1 ) { // odd number of " -> error
- QWidget *that = const_cast<KFileDialog *>(this);
+ TQWidget *that = const_cast<KFileDialog *>(this);
KMessageBox::sorry(that, i18n("The requested filenames\n"
"%1\n"
"do not appear to be valid;\n"
@@ -1538,9 +1538,9 @@ KURL::List KFileDialog::tokenize( const QString& line ) const
}
-QString KFileDialog::selectedFile() const
+TQString KFileDialog::selectedFile() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
{
KURL url = KIO::NetAccess::mostLocalURL(d->url,topLevelWidget());
if (url.isLocalFile())
@@ -1551,18 +1551,18 @@ QString KFileDialog::selectedFile() const
i18n("Remote Files Not Accepted") );
}
}
- return QString::null;
+ return TQString::null;
}
-QStringList KFileDialog::selectedFiles() const
+TQStringList KFileDialog::selectedFiles() const
{
- QStringList list;
+ TQStringList list;
KURL url;
- if ( result() == QDialog::Accepted ) {
+ if ( result() == TQDialog::Accepted ) {
if ( (ops->mode() & KFile::Files) == KFile::Files ) {
KURL::List urls = parseSelectedURLs();
- QValueListConstIterator<KURL> it = urls.begin();
+ TQValueListConstIterator<KURL> it = urls.begin();
while ( it != urls.end() ) {
url = KIO::NetAccess::mostLocalURL(*it,topLevelWidget());
if ( url.isLocalFile() )
@@ -1585,12 +1585,12 @@ KURL KFileDialog::baseURL() const
return ops->url();
}
-QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
- QWidget *parent,
- const QString& caption)
+TQString KFileDialog::getSaveFileName(const TQString& dir, const TQString& filter,
+ TQWidget *parent,
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1599,20 +1599,20 @@ QString KFileDialog::getSaveFileName(const QString& dir, const QString& filter,
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filter,
+TQString KFileDialog::getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption)
+ const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- QWidget* parent = QWidget::find( parent_id );
- KFileDialog dlg( specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ TQWidget* parent = TQWidget::find( parent_id );
+ KFileDialog dlg( specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
#ifdef Q_WS_X11
if( parent == NULL && parent_id != 0 )
XSetTransientForHint(qt_xdisplay(), dlg.winId(), parent_id);
@@ -1628,18 +1628,18 @@ QString KFileDialog::getSaveFileNameWId(const QString& dir, const QString& filte
dlg.exec();
- QString filename = dlg.selectedFile();
+ TQString filename = dlg.selectedFile();
if (!filename.isEmpty())
KRecentDocument::add(filename);
return filename;
}
-KURL KFileDialog::getSaveURL(const QString& dir, const QString& filter,
- QWidget *parent, const QString& caption)
+KURL KFileDialog::getSaveURL(const TQString& dir, const TQString& filter,
+ TQWidget *parent, const TQString& caption)
{
bool specialDir = dir.at(0) == ':';
- KFileDialog dlg(specialDir ? dir : QString::null, filter, parent, "filedialog", true);
+ KFileDialog dlg(specialDir ? dir : TQString::null, filter, parent, "filedialog", true);
if ( !specialDir )
dlg.setSelection( dir ); // may also be a filename
@@ -1690,12 +1690,12 @@ KFile::Mode KFileDialog::mode() const
}
-void KFileDialog::readConfig( KConfig *kc, const QString& group )
+void KFileDialog::readConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1736,17 +1736,17 @@ void KFileDialog::readConfig( KConfig *kc, const QString& group )
if (w1 < w2)
setMinimumWidth(w2);
- QSize size = configDialogSize( group );
+ TQSize size = configDialogSize( group );
resize( size );
kc->setGroup( oldGroup );
}
-void KFileDialog::writeConfig( KConfig *kc, const QString& group )
+void KFileDialog::writeConfig( KConfig *kc, const TQString& group )
{
if ( !kc )
return;
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
if ( !group.isEmpty() )
kc->setGroup( group );
@@ -1765,14 +1765,14 @@ void KFileDialog::writeConfig( KConfig *kc, const QString& group )
void KFileDialog::readRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
locationEdit->setMaxItems( kc->readNumEntry( RecentFilesNumber,
DefaultRecentURLsNumber ) );
locationEdit->setURLs( kc->readPathListEntry( RecentFiles ),
KURLComboBox::RemoveBottom );
- locationEdit->insertItem( QString::null, 0 ); // dummy item without pixmap
+ locationEdit->insertItem( TQString::null, 0 ); // dummy item without pixmap
locationEdit->setCurrentItem( 0 );
kc->setGroup( oldGroup );
@@ -1780,7 +1780,7 @@ void KFileDialog::readRecentFiles( KConfig *kc )
void KFileDialog::saveRecentFiles( KConfig *kc )
{
- QString oldGroup = kc->group();
+ TQString oldGroup = kc->group();
kc->setGroup( ConfigGroup );
kc->writePathEntry( RecentFiles, locationEdit->urls() );
@@ -1858,13 +1858,13 @@ void KFileDialog::slotAutoSelectExtClicked()
updateLocationEditExtension (d->extension /* extension hasn't changed */);
}
-static QString getExtensionFromPatternList (const QStringList &patternList)
+static TQString getExtensionFromPatternList (const TQStringList &patternList)
{
- QString ret;
+ TQString ret;
kdDebug (kfile_area) << "\tgetExtension " << patternList << endl;
- QStringList::ConstIterator patternListEnd = patternList.end ();
- for (QStringList::ConstIterator it = patternList.begin ();
+ TQStringList::ConstIterator patternListEnd = patternList.end ();
+ for (TQStringList::ConstIterator it = patternList.begin ();
it != patternListEnd;
it++)
{
@@ -1889,9 +1889,9 @@ static QString getExtensionFromPatternList (const QStringList &patternList)
return ret;
}
-static QString stripUndisplayable (const QString &string)
+static TQString stripUndisplayable (const TQString &string)
{
- QString ret = string;
+ TQString ret = string;
ret.remove (':');
ret.remove ('&');
@@ -1900,7 +1900,7 @@ static QString stripUndisplayable (const QString &string)
}
-QString KFileDialog::currentFilterExtension (void)
+TQString KFileDialog::currentFilterExtension (void)
{
return d->extension;
}
@@ -1917,8 +1917,8 @@ void KFileDialog::updateAutoSelectExtension (void)
//
kdDebug (kfile_area) << "Figure out an extension: " << endl;
- QString lastExtension = d->extension;
- d->extension = QString::null;
+ TQString lastExtension = d->extension;
+ d->extension = TQString::null;
// Automatically Select Extension is only valid if the user is _saving_ a _file_
if ((operationMode () == Saving) && (mode () & KFile::File))
@@ -1927,13 +1927,13 @@ void KFileDialog::updateAutoSelectExtension (void)
// Get an extension from the filter
//
- QString filter = currentFilter ();
+ TQString filter = currentFilter ();
if (!filter.isEmpty ())
{
// e.g. "*.cpp"
if (filter.find ('/') < 0)
{
- d->extension = getExtensionFromPatternList (QStringList::split (" ", filter)).lower ();
+ d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower ();
kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'"
<< d->extension << "\'" << endl;
}
@@ -1943,7 +1943,7 @@ void KFileDialog::updateAutoSelectExtension (void)
KMimeType::Ptr mime = KMimeType::mimeType (filter);
// first try X-KDE-NativeExtension
- QString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
+ TQString nativeExtension = mime->property ("X-KDE-NativeExtension").toString ();
if (nativeExtension.at (0) == '.')
{
d->extension = nativeExtension.lower ();
@@ -1966,7 +1966,7 @@ void KFileDialog::updateAutoSelectExtension (void)
// GUI: checkbox
//
- QString whatsThisExtension;
+ TQString whatsThisExtension;
if (!d->extension.isEmpty ())
{
// remember: sync any changes to the string with below
@@ -1986,9 +1986,9 @@ void KFileDialog::updateAutoSelectExtension (void)
d->autoSelectExtCheckBox->setEnabled (false);
}
- const QString locationLabelText = stripUndisplayable (d->locationLabel->text ());
- const QString filterLabelText = stripUndisplayable (d->filterLabel->text ());
- QWhatsThis::add (d->autoSelectExtCheckBox,
+ const TQString locationLabelText = stripUndisplayable (d->locationLabel->text ());
+ const TQString filterLabelText = stripUndisplayable (d->filterLabel->text ());
+ TQWhatsThis::add (d->autoSelectExtCheckBox,
"<qt>" +
i18n (
"This option enables some convenient features for "
@@ -2038,12 +2038,12 @@ void KFileDialog::updateAutoSelectExtension (void)
// Updates the extension of the filename specified in locationEdit if the
// Automatically Select Extension feature is enabled.
// (this prevents you from accidently saving "file.kwd" as RTF, for example)
-void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
+void KFileDialog::updateLocationEditExtension (const TQString &lastExtension)
{
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString urlStr = locationEdit->currentText ();
+ TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2051,7 +2051,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl;
const int fileNameOffset = urlStr.findRev ('/') + 1;
- QString fileName = urlStr.mid (fileNameOffset);
+ TQString fileName = urlStr.mid (fileNameOffset);
const int dot = fileName.findRev ('.');
const int len = fileName.length ();
@@ -2088,7 +2088,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
fileName.truncate (dot);
// add extension
- const QString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
+ const TQString newText = urlStr.left (fileNameOffset) + fileName + d->extension;
if ( newText != locationEdit->currentText() )
{
locationEdit->setCurrentText (urlStr.left (fileNameOffset) + fileName + d->extension);
@@ -2102,7 +2102,7 @@ void KFileDialog::updateLocationEditExtension (const QString &lastExtension)
void KFileDialog::updateFilter ()
{
if ((operationMode() == Saving) && (mode() & KFile::File) ) {
- const QString urlStr = locationEdit->currentText ();
+ const TQString urlStr = locationEdit->currentText ();
if (urlStr.isEmpty ())
return;
@@ -2122,7 +2122,7 @@ void KFileDialog::appendExtension (KURL &url)
if (!d->autoSelectExtCheckBox->isChecked () || d->extension.isEmpty ())
return;
- QString fileName = url.fileName ();
+ TQString fileName = url.fileName ();
if (fileName.isEmpty ())
return;
@@ -2178,8 +2178,8 @@ void KFileDialog::addToRecentDocuments()
int m = ops->mode();
if ( m & KFile::LocalOnly ) {
- QStringList files = selectedFiles();
- QStringList::ConstIterator it = files.begin();
+ TQStringList files = selectedFiles();
+ TQStringList::ConstIterator it = files.begin();
for ( ; it != files.end(); ++it )
KRecentDocument::add( *it );
}
@@ -2199,7 +2199,7 @@ KActionCollection * KFileDialog::actionCollection() const
return ops->actionCollection();
}
-void KFileDialog::keyPressEvent( QKeyEvent *e )
+void KFileDialog::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Escape )
{
@@ -2222,7 +2222,7 @@ void KFileDialog::toggleSpeedbar( bool show )
// check to see if they have a home item defined, if not show the home button
KURLBarItem *urlItem = static_cast<KURLBarItem*>( d->urlBar->listBox()->firstItem() );
KURL homeURL;
- homeURL.setPath( QDir::homeDirPath() );
+ homeURL.setPath( TQDir::homeDirPath() );
while ( urlItem )
{
if ( homeURL.equals( urlItem->url(), true ) )
@@ -2256,15 +2256,15 @@ void KFileDialog::toggleBookmarks(bool show)
}
d->bookmarkHandler = new KFileBookmarkHandler( this );
- connect( d->bookmarkHandler, SIGNAL( openURL( const QString& )),
- SLOT( enterURL( const QString& )));
+ connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ TQT_SLOT( enterURL( const TQString& )));
- toolbar->insertButton(QString::fromLatin1("bookmark"),
+ toolbar->insertButton(TQString::fromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"), 5);
toolbar->getButton(HOTLIST_BUTTON)->setPopup(d->bookmarkHandler->menu(),
true);
- QWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
+ TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
i18n("<qt>This button allows you to bookmark specific locations. "
"Click on this button to open the bookmark menu where you may add, "
"edit or select a bookmark.<p>"
@@ -2296,12 +2296,12 @@ void KFileDialog::initStatic()
}
// static
-KURL KFileDialog::getStartURL( const QString& startDir,
- QString& recentDirClass )
+KURL KFileDialog::getStartURL( const TQString& startDir,
+ TQString& recentDirClass )
{
initStatic();
- recentDirClass = QString::null;
+ recentDirClass = TQString::null;
KURL ret;
bool useDefaultStartDir = startDir.isEmpty();
@@ -2314,7 +2314,7 @@ KURL KFileDialog::getStartURL( const QString& startDir,
}
else
{
- ret = KCmdLineArgs::makeURL( QFile::encodeName(startDir) );
+ ret = KCmdLineArgs::makeURL( TQFile::encodeName(startDir) );
// If we won't be able to list it (e.g. http), then use default
if ( !KProtocolInfo::supportsListing( ret ) )
useDefaultStartDir = true;
@@ -2326,15 +2326,15 @@ KURL KFileDialog::getStartURL( const QString& startDir,
if (lastDirectory->isEmpty()) {
lastDirectory->setPath(KGlobalSettings::documentPath());
KURL home;
- home.setPath( QDir::homeDirPath() );
+ home.setPath( TQDir::homeDirPath() );
// if there is no docpath set (== home dir), we prefer the current
// directory over it. We also prefer the homedir when our CWD is
// different from our homedirectory or when the document dir
// does not exist
if ( lastDirectory->path(+1) == home.path(+1) ||
- QDir::currentDirPath() != QDir::homeDirPath() ||
- !QDir(lastDirectory->path(+1)).exists() )
- lastDirectory->setPath(QDir::currentDirPath());
+ TQDir::currentDirPath() != TQDir::homeDirPath() ||
+ !TQDir(lastDirectory->path(+1)).exists() )
+ lastDirectory->setPath(TQDir::currentDirPath());
}
ret = *lastDirectory;
}
@@ -2352,7 +2352,7 @@ void KFileDialog::setStartDir( const KURL& directory )
void KFileDialog::setNonExtSelection()
{
// Enhanced rename: Don't highlight the file extension.
- QString pattern, filename = locationEdit->currentText().stripWhiteSpace();
+ TQString pattern, filename = locationEdit->currentText().stripWhiteSpace();
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if ( !pattern.isEmpty() && pattern.at( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 )
diff --git a/kio/kfile/kfiledialog.h b/kio/kfile/kfiledialog.h
index e90338608..b2db9183a 100644
--- a/kio/kfile/kfiledialog.h
+++ b/kio/kfile/kfiledialog.h
@@ -25,7 +25,7 @@
#ifndef __KFILEDIALOG_H__
#define __KFILEDIALOG_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kdialogbase.h>
#include <kfile.h>
@@ -58,7 +58,7 @@ struct KFileDialogPrivate;
* select files and directories.
*
* The widget can be used as a drop in replacement for the
- * QFileDialog widget, but has greater functionality and a nicer GUI.
+ * TQFileDialog widget, but has greater functionality and a nicer GUI.
*
* You will usually want to use one of the static methods
* getOpenFileName(), getSaveFileName(), getOpenURL()
@@ -98,7 +98,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -116,15 +116,15 @@ public:
* See setFilter() for details on how to use this argument.
*
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
bool modal);
/**
* Constructs a file dialog.
*
* The parameters here are identical to the first constructor except
- * for the addition of a QWidget parameter.
+ * for the addition of a TQWidget parameter.
*
* Historical note: The original version of KFileDialog did not have this extra
* parameter. It was added later, and, in order to maintain binary compatibility,
@@ -132,7 +132,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -156,9 +156,9 @@ public:
* @param modal Whether to create a modal dialog or not
* @since 3.1
*/
- KFileDialog(const QString& startDir, const QString& filter,
- QWidget *parent, const char *name,
- bool modal, QWidget* widget);
+ KFileDialog(const TQString& startDir, const TQString& filter,
+ TQWidget *parent, const char *name,
+ bool modal, TQWidget* widget);
/**
@@ -185,12 +185,12 @@ public:
* Returns the full path of the selected file in the local filesystem.
* (Local files only)
*/
- QString selectedFile() const;
+ TQString selectedFile() const;
/**
* Returns a list of all selected local files.
*/
- QStringList selectedFiles() const;
+ TQStringList selectedFiles() const;
/**
* Sets the directory to view.
@@ -206,7 +206,7 @@ public:
*
* This takes absolute URLs and relative file names.
*/
- void setSelection(const QString& name);
+ void setSelection(const TQString& name);
/**
* Sets the operational mode of the filedialog to @p Saving, @p Opening
@@ -289,7 +289,7 @@ public:
* @see filterChanged
* @see setMimeFilter
*/
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* Returns the current filter as entered by the user or one of the
@@ -298,7 +298,7 @@ public:
* @see setFilter()
* @see filterChanged()
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the filter up to specify the output type.
@@ -310,7 +310,7 @@ public:
* Do not use in conjunction with setFilter()
* @deprecated
*/
- void setFilterMimeType(const QString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
+ void setFilterMimeType(const TQString &label, const KMimeType::List &types, const KMimeType::Ptr &defaultType) KDE_DEPRECATED;
/**
* Returns the mimetype for the desired output format.
@@ -333,8 +333,8 @@ public:
*
* Do not use in conjunction with setFilter()
*/
- void setMimeFilter( const QStringList& types,
- const QString& defaultType = QString::null );
+ void setMimeFilter( const TQStringList& types,
+ const TQString& defaultType = TQString::null );
/**
* The mimetype for the desired output format.
@@ -344,7 +344,7 @@ public:
*
* @see setMimeFilter()
*/
- QString currentMimeFilter() const;
+ TQString currentMimeFilter() const;
/**
* Clears any mime- or namefilter. Does not reload the directory.
@@ -357,7 +357,7 @@ public:
*
* In this mode
* the dialog is split and the right part contains your widget.
- * This widget has to inherit QWidget and it has to implement
+ * This widget has to inherit TQWidget and it has to implement
* a slot showPreview(const KURL &); which is called
* every time the file changes. You may want to look at
* koffice/lib/kofficecore/koFilterManager.cc for some hints :)
@@ -365,7 +365,7 @@ public:
* Ownership is transferred to KFileDialog. You need to create the
* preview-widget with "new", i.e. on the heap.
*/
- void setPreviewWidget(const QWidget *w) KDE_DEPRECATED;
+ void setPreviewWidget(const TQWidget *w) KDE_DEPRECATED;
/**
* Adds a preview widget and enters the preview mode.
@@ -389,7 +389,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -405,23 +405,23 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getOpenFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getOpenFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
- * Use this version only if you have no QWidget available as
+ * Use this version only if you have no TQWidget available as
* parent widget. This can be the case if the parent widget is
* a widget in another process or if the parent widget is a
* non-Qt widget. For example, in a GTK program.
*
* @since 3.4
*/
- static QString getOpenFileNameWId(const QString& startDir,
- const QString& filter,
- WId parent_id, const QString& caption);
+ static TQString getOpenFileNameWId(const TQString& startDir,
+ const TQString& filter,
+ WId parent_id, const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -432,7 +432,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -448,10 +448,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QStringList getOpenFileNames(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static TQStringList getOpenFileNames(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -464,7 +464,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -480,10 +480,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getOpenURL(const QString& startDir = QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getOpenURL(const TQString& startDir = TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
@@ -496,7 +496,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -512,10 +512,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL::List getOpenURLs(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent = 0,
- const QString& caption= QString::null);
+ static KURL::List getOpenURLs(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption= TQString::null);
@@ -530,7 +530,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -546,20 +546,20 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getSaveFileName(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static TQString getSaveFileName(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
* This function accepts the window id of the parent window, instead
- * of QWidget*. It should be used only when necessary.
+ * of TQWidget*. It should be used only when necessary.
* @since 3.4
*/
- static QString getSaveFileNameWId(const QString& dir, const QString& filter,
+ static TQString getSaveFileNameWId(const TQString& dir, const TQString& filter,
WId parent_id,
- const QString& caption);
+ const TQString& caption);
/**
* Creates a modal file dialog and returns the selected
@@ -572,7 +572,7 @@ public:
* @li The URL of the directory to start in.
* @li a relative path or a filename determining the
* directory to start in and the file to be selected.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -588,10 +588,10 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getSaveURL(const QString& startDir= QString::null,
- const QString& filter= QString::null,
- QWidget *parent= 0,
- const QString& caption = QString::null);
+ static KURL getSaveURL(const TQString& startDir= TQString::null,
+ const TQString& filter= TQString::null,
+ TQWidget *parent= 0,
+ const TQString& caption = TQString::null);
/**
@@ -600,7 +600,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -612,9 +612,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static QString getExistingDirectory(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static TQString getExistingDirectory(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog and returns the selected
@@ -625,7 +625,7 @@ public:
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -638,16 +638,16 @@ public:
* @param caption The name of the dialog widget.
* @since 3.1
*/
- static KURL getExistingURL(const QString & startDir = QString::null,
- QWidget * parent = 0,
- const QString& caption= QString::null);
+ static KURL getExistingURL(const TQString & startDir = TQString::null,
+ TQWidget * parent = 0,
+ const TQString& caption= TQString::null);
/**
* Creates a modal file dialog with an image previewer and returns the
* selected url or an empty string if none was chosen.
*
* @param startDir This can either be
* @li The URL of the directory to start in.
- * @li QString::null to start in the current working
+ * @li TQString::null to start in the current working
* directory, or the last directory where a file has been
* selected.
* @li ':&lt;keyword&gt;' to start in the directory last used
@@ -659,9 +659,9 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The name of the dialog widget.
*/
- static KURL getImageOpenURL( const QString& startDir = QString::null,
- QWidget *parent = 0,
- const QString& caption = QString::null );
+ static KURL getImageOpenURL( const TQString& startDir = TQString::null,
+ TQWidget *parent = 0,
+ const TQString& caption = TQString::null );
virtual void show();
/**
@@ -705,7 +705,7 @@ public:
* Most useful if you want to make clear what
* the location is used for.
*/
- void setLocationLabel(const QString& text);
+ void setLocationLabel(const TQString& text);
/**
* Returns a pointer to the toolbar.
@@ -714,7 +714,7 @@ public:
* items into it, e.g.:
* \code
* yourAction = new KAction( i18n("Your Action"), 0,
- * this, SLOT( yourSlot() ),
+ * this, TQT_SLOT( yourSlot() ),
* this, "action name" );
* yourAction->plug( kfileDialog->toolBar() );
* \endcode
@@ -774,7 +774,7 @@ public:
* KDirSelectDialog).
* @since 3.1
*/
- static KURL getStartURL( const QString& startDir, QString& recentDirClass );
+ static KURL getStartURL( const TQString& startDir, TQString& recentDirClass );
/**
* @internal
@@ -790,12 +790,12 @@ signals:
* and call selectedFile(), selectedFiles(),
* selectedURL() or selectedURLs().
*/
- void fileSelected(const QString&);
+ void fileSelected(const TQString&);
/**
* Emitted when the user highlights a file.
*/
- void fileHighlighted(const QString&);
+ void fileHighlighted(const TQString&);
/**
* Emitted when the user hilights one or more files in multiselection mode.
@@ -817,7 +817,7 @@ signals:
* @see setFilter()
* @see currentFilter()
*/
- void filterChanged( const QString& filter );
+ void filterChanged( const TQString& filter );
protected:
KToolBar *toolbar;
@@ -831,13 +831,13 @@ protected:
/**
* Reimplemented to animate the cancel button.
*/
- virtual void keyPressEvent( QKeyEvent *e );
+ virtual void keyPressEvent( TQKeyEvent *e );
/**
* Perform basic initialization tasks. Called by constructors.
* @since 3.1
*/
- void init(const QString& startDir, const QString& filter, QWidget* widget);
+ void init(const TQString& startDir, const TQString& filter, TQWidget* widget);
/**
* rebuild geometry management.
@@ -854,12 +854,12 @@ protected:
/**
* Reads configuration and applies it (size, recent directories, ...)
*/
- virtual void readConfig( KConfig *, const QString& group = QString::null );
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
/**
* Saves the current configuration
*/
- virtual void writeConfig( KConfig *, const QString& group = QString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null );
/**
* Reads the recent used files and inserts them into the location combobox
@@ -877,21 +877,21 @@ protected:
* an empty list will be returned. Otherwise, all items enclosed in " "
* will be returned as correct urls.
*/
- KURL::List tokenize(const QString& line) const;
+ KURL::List tokenize(const TQString& line) const;
/**
* Returns the absolute version of the URL specified in locationEdit.
* @since 3.2
*/
- KURL getCompleteURL(const QString&);
+ KURL getCompleteURL(const TQString&);
/**
* Returns the filename extension associated with the currentFilter().
- * QString::null is returned if an extension is not available or if
+ * TQString::null is returned if an extension is not available or if
* operationMode() != Saving.
* @since 3.2
*/
- QString currentFilterExtension();
+ TQString currentFilterExtension();
/**
* Updates the currentFilterExtension and the availability of the
@@ -907,8 +907,8 @@ protected:
protected slots:
void urlEntered( const KURL& );
void enterURL( const KURL& url );
- void enterURL( const QString& url );
- void locationActivated( const QString& url );
+ void enterURL( const TQString& url );
+ void locationActivated( const TQString& url );
/**
* @deprecated,
@@ -919,12 +919,12 @@ protected slots:
* @deprecated
*/
// ### remove in KDE4
- void pathComboChanged( const QString& );
+ void pathComboChanged( const TQString& );
/**
* @deprecated
*/
// ### remove in KDE4
- void dirCompletion( const QString& );
+ void dirCompletion( const TQString& );
void slotFilterChanged();
void fileHighlighted(const KFileItem *i);
@@ -932,7 +932,7 @@ protected slots:
void slotStatResult(KIO::Job* job);
void slotLoadingFinished();
- void fileCompletion( const QString& );
+ void fileCompletion( const TQString& );
/**
* @since 3.1
*/
@@ -957,17 +957,17 @@ protected slots:
void initSpeedbar();
private slots:
- void slotLocationChanged( const QString& text );
+ void slotLocationChanged( const TQString& text );
private:
KFileDialog(const KFileDialog&);
KFileDialog operator=(const KFileDialog&);
- void setLocationText( const QString& text );
+ void setLocationText( const TQString& text );
void updateLocationWhatsThis();
void appendExtension(KURL &url);
- void updateLocationEditExtension(const QString &);
+ void updateLocationEditExtension(const TQString &);
void updateFilter();
static void initStatic();
diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp
index 747a738fe..c865cc0e1 100644
--- a/kio/kfile/kfilefiltercombo.cpp
+++ b/kio/kfile/kfilefiltercombo.cpp
@@ -40,18 +40,18 @@ public:
bool hasAllSupportedFiles;
// true when setMimeFilter was called
bool isMimeFilter;
- QString lastFilter;
- QString defaultFilter;
+ TQString lastFilter;
+ TQString defaultFilter;
};
-KFileFilterCombo::KFileFilterCombo( QWidget *parent, const char *name)
+KFileFilterCombo::KFileFilterCombo( TQWidget *parent, const char *name)
: KComboBox(true, parent, name), d( new KFileFilterComboPrivate )
{
setTrapReturnKey( true );
setInsertionPolicy(NoInsertion);
- connect( this, SIGNAL( activated( int )), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( returnPressed() ), this, SIGNAL( filterChanged() ));
- connect( this, SIGNAL( filterChanged() ), SLOT( slotFilterChanged() ));
+ connect( this, TQT_SIGNAL( activated( int )), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( returnPressed() ), this, TQT_SIGNAL( filterChanged() ));
+ connect( this, TQT_SIGNAL( filterChanged() ), TQT_SLOT( slotFilterChanged() ));
m_allTypes = false;
}
@@ -60,14 +60,14 @@ KFileFilterCombo::~KFileFilterCombo()
delete d;
}
-void KFileFilterCombo::setFilter(const QString& filter)
+void KFileFilterCombo::setFilter(const TQString& filter)
{
clear();
filters.clear();
d->hasAllSupportedFiles = false;
if (!filter.isEmpty()) {
- QString tmp = filter;
+ TQString tmp = filter;
int index = tmp.find('\n');
while (index > 0) {
filters.append(tmp.left(index));
@@ -79,8 +79,8 @@ void KFileFilterCombo::setFilter(const QString& filter)
else
filters.append( d->defaultFilter );
- QStringList::ConstIterator it;
- QStringList::ConstIterator end(filters.end());
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator end(filters.end());
for (it = filters.begin(); it != end; ++it) {
int tab = (*it).find('|');
insertItem((tab < 0) ? *it :
@@ -91,9 +91,9 @@ void KFileFilterCombo::setFilter(const QString& filter)
d->isMimeFilter = false;
}
-QString KFileFilterCombo::currentFilter() const
+TQString KFileFilterCombo::currentFilter() const
{
- QString f = currentText();
+ TQString f = currentText();
if (f == text(currentItem())) { // user didn't edit the text
f = *filters.at(currentItem());
if ( d->isMimeFilter || (currentItem() == 0 && d->hasAllSupportedFiles) ) {
@@ -108,10 +108,10 @@ QString KFileFilterCombo::currentFilter() const
return f.left(tab);
}
-void KFileFilterCombo::setCurrentFilter( const QString& filter )
+void KFileFilterCombo::setCurrentFilter( const TQString& filter )
{
int pos = 0;
- for( QStringList::ConstIterator it = filters.begin();
+ for( TQStringList::ConstIterator it = filters.begin();
it != filters.end();
++it, ++pos ) {
if( *it == filter ) {
@@ -124,19 +124,19 @@ void KFileFilterCombo::setCurrentFilter( const QString& filter )
filterChanged();
}
-void KFileFilterCombo::setMimeFilter( const QStringList& types,
- const QString& defaultType )
+void KFileFilterCombo::setMimeFilter( const TQStringList& types,
+ const TQString& defaultType )
{
clear();
filters.clear();
- QString delim = QString::fromLatin1(", ");
+ TQString delim = TQString::fromLatin1(", ");
d->hasAllSupportedFiles = false;
m_allTypes = defaultType.isEmpty() && (types.count() > 1);
- QString allComments, allTypes;
+ TQString allComments, allTypes;
int i = 0;
- for(QStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
+ for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it, ++i)
{
if ( m_allTypes && it != types.begin() ) {
allComments += delim;
@@ -177,9 +177,9 @@ void KFileFilterCombo::slotFilterChanged()
d->lastFilter = currentText();
}
-bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
+bool KFileFilterCombo::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == lineEdit() && e->type() == QEvent::FocusOut ) {
+ if ( o == lineEdit() && e->type() == TQEvent::FocusOut ) {
if ( currentText() != d->lastFilter )
emit filterChanged();
}
@@ -187,12 +187,12 @@ bool KFileFilterCombo::eventFilter( QObject *o, QEvent *e )
return KComboBox::eventFilter( o, e );
}
-void KFileFilterCombo::setDefaultFilter( const QString& filter )
+void KFileFilterCombo::setDefaultFilter( const TQString& filter )
{
d->defaultFilter = filter;
}
-QString KFileFilterCombo::defaultFilter() const
+TQString KFileFilterCombo::defaultFilter() const
{
return d->defaultFilter;
}
diff --git a/kio/kfile/kfilefiltercombo.h b/kio/kfile/kfilefiltercombo.h
index 9b7c103bf..d1f9cbf62 100644
--- a/kio/kfile/kfilefiltercombo.h
+++ b/kio/kfile/kfilefiltercombo.h
@@ -20,8 +20,8 @@
#ifndef KFILEFILTERCOMBO_H
#define KFILEFILTERCOMBO_H
-#include <qstringlist.h>
-#include <qptrdict.h>
+#include <tqstringlist.h>
+#include <tqptrdict.h>
#include <kcombobox.h>
#include <kmimetype.h>
@@ -33,31 +33,31 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
Q_OBJECT
public:
- KFileFilterCombo(QWidget *parent= 0, const char *name= 0);
+ KFileFilterCombo(TQWidget *parent= 0, const char *name= 0);
~KFileFilterCombo();
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
/**
* @returns the current filter, either something like "*.cpp *.h"
* or the current mimetype, like "text/html", or a list of those, like
" "text/html text/plain image/png", all separated with one space.
*/
- QString currentFilter() const;
+ TQString currentFilter() const;
/**
* Sets the current filter. Filter must match one of the filter items
* passed before to this widget.
* @since 3.4
*/
- void setCurrentFilter( const QString& filter );
+ void setCurrentFilter( const TQString& filter );
/**
* Sets a list of mimetypes.
* If @p defaultType is set, it will be set as the current item.
* Otherwise, a first item showing all the mimetypes will be created.
*/
- void setMimeFilter( const QStringList& types, const QString& defaultType );
+ void setMimeFilter( const TQStringList& types, const TQString& defaultType );
/**
* @return true if the filter's first item is the list of all mimetypes
@@ -72,19 +72,19 @@ class KIO_EXPORT KFileFilterCombo : public KComboBox
* By default, this is set to i18n("*|All Files")
* @see defaultFilter
*/
- void setDefaultFilter( const QString& filter );
+ void setDefaultFilter( const TQString& filter );
/**
* @return the default filter, used when an empty filter is set.
* @see setDefaultFilter
*/
- QString defaultFilter() const;
+ TQString defaultFilter() const;
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// KDE4: those variables are private. filters() was added
- QStringList filters;
+ TQStringList filters;
bool m_allTypes;
signals:
diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp
index 0668e91e2..4f0dbf9e1 100644
--- a/kio/kfile/kfileiconview.cpp
+++ b/kio/kfile/kfileiconview.cpp
@@ -19,14 +19,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfontmetrics.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqfontmetrics.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h>
#include <kapplication.h>
@@ -60,37 +60,37 @@ public:
noArrangement = false;
ignoreMaximumSize = false;
smallColumns = new KRadioAction( i18n("Small Icons"), 0, parent,
- SLOT( slotSmallColumns() ),
+ TQT_SLOT( slotSmallColumns() ),
parent->actionCollection(),
"small columns" );
largeRows = new KRadioAction( i18n("Large Icons"), 0, parent,
- SLOT( slotLargeRows() ),
+ TQT_SLOT( slotLargeRows() ),
parent->actionCollection(),
"large rows" );
- smallColumns->setExclusiveGroup(QString::fromLatin1("IconView mode"));
- largeRows->setExclusiveGroup(QString::fromLatin1("IconView mode"));
+ smallColumns->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
+ largeRows->setExclusiveGroup(TQString::fromLatin1("IconView mode"));
previews = new KToggleAction( i18n("Thumbnail Previews"), 0,
parent->actionCollection(),
"show previews" );
- zoomIn = KStdAction::zoomIn( parent, SLOT( zoomIn() ),
+ zoomIn = KStdAction::zoomIn( parent, TQT_SLOT( zoomIn() ),
parent->actionCollection(), "zoomIn" );
- zoomOut = KStdAction::zoomOut( parent, SLOT( zoomOut() ),
+ zoomOut = KStdAction::zoomOut( parent, TQT_SLOT( zoomOut() ),
parent->actionCollection(), "zoomOut" );
previews->setGroup("previews");
zoomIn->setGroup("previews");
zoomOut->setGroup("previews");
- connect( previews, SIGNAL( toggled( bool )),
- parent, SLOT( slotPreviewsToggled( bool )));
+ connect( previews, TQT_SIGNAL( toggled( bool )),
+ parent, TQT_SLOT( slotPreviewsToggled( bool )));
- connect( &previewTimer, SIGNAL( timeout() ),
- parent, SLOT( showPreviews() ));
- connect( &autoOpenTimer, SIGNAL( timeout() ),
- parent, SLOT( slotAutoOpen() ));
+ connect( &previewTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( showPreviews() ));
+ connect( &autoOpenTimer, TQT_SIGNAL( timeout() ),
+ parent, TQT_SLOT( slotAutoOpen() ));
}
~KFileIconViewPrivate() {
@@ -103,15 +103,15 @@ public:
KToggleAction *previews;
KIO::PreviewJob *job;
KFileIconViewItem *dropItem;
- QTimer previewTimer;
- QTimer autoOpenTimer;
- QStringList previewMimeTypes;
+ TQTimer previewTimer;
+ TQTimer autoOpenTimer;
+ TQStringList previewMimeTypes;
int previewIconSize;
bool noArrangement :1;
bool ignoreMaximumSize :1;
};
-KFileIconView::KFileIconView(QWidget *parent, const char *name)
+KFileIconView::KFileIconView(TQWidget *parent, const char *name)
: KIconView(parent, name), KFileView()
{
d = new KFileIconViewPrivate( this );
@@ -127,51 +127,51 @@ KFileIconView::KFileIconView(QWidget *parent, const char *name)
setItemsMovable( false );
setMode( KIconView::Select );
KIconView::setSorting( true );
- // as long as QIconView only shows tooltips when the cursor is over the
+ // as long as TQIconView only shows tooltips when the cursor is over the
// icon (and not the text), we have to create our own tooltips
setShowToolTips( false );
slotSmallColumns();
d->smallColumns->setChecked( true );
- connect( this, SIGNAL( returnPressed(QIconViewItem *) ),
- SLOT( slotActivate( QIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( returnPressed(TQIconViewItem *) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
// we want single click _and_ double click (as convenience)
- connect( this, SIGNAL( clicked(QIconViewItem *, const QPoint&) ),
- SLOT( selected( QIconViewItem *) ) );
- connect( this, SIGNAL( doubleClicked(QIconViewItem *, const QPoint&) ),
- SLOT( slotActivate( QIconViewItem *) ) );
-
- connect( this, SIGNAL( onItem( QIconViewItem * ) ),
- SLOT( showToolTip( QIconViewItem * ) ) );
- connect( this, SIGNAL( onViewport() ),
- SLOT( removeToolTip() ) );
- connect( this, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&)),
- SLOT( slotActivateMenu( QIconViewItem*, const QPoint& ) ) );
+ connect( this, TQT_SIGNAL( clicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( selected( TQIconViewItem *) ) );
+ connect( this, TQT_SIGNAL( doubleClicked(TQIconViewItem *, const TQPoint&) ),
+ TQT_SLOT( slotActivate( TQIconViewItem *) ) );
+
+ connect( this, TQT_SIGNAL( onItem( TQIconViewItem * ) ),
+ TQT_SLOT( showToolTip( TQIconViewItem * ) ) );
+ connect( this, TQT_SIGNAL( onViewport() ),
+ TQT_SLOT( removeToolTip() ) );
+ connect( this, TQT_SIGNAL( contextMenuRequested(TQIconViewItem*,const TQPoint&)),
+ TQT_SLOT( slotActivateMenu( TQIconViewItem*, const TQPoint& ) ) );
KFile::SelectionMode sm = KFileView::selectionMode();
switch ( sm ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
viewport()->installEventFilter( this );
@@ -186,11 +186,11 @@ KFileIconView::~KFileIconView()
delete d;
}
-void KFileIconView::readConfig( KConfig *kc, const QString& group )
+void KFileIconView::readConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString small = QString::fromLatin1("SmallColumns");
+ TQString small = TQString::fromLatin1("SmallColumns");
d->previewIconSize = kc->readNumEntry( "Preview Size", DEFAULT_PREVIEW_SIZE );
d->previews->setChecked( kc->readBoolEntry( "ShowPreviews", DEFAULT_SHOW_PREVIEWS ) );
@@ -207,14 +207,14 @@ void KFileIconView::readConfig( KConfig *kc, const QString& group )
showPreviews();
}
-void KFileIconView::writeConfig( KConfig *kc, const QString& group )
+void KFileIconView::writeConfig( KConfig *kc, const TQString& group )
{
- QString gr = group.isEmpty() ? QString("KFileIconView") : group;
+ TQString gr = group.isEmpty() ? TQString("KFileIconView") : group;
KConfigGroupSaver cs( kc, gr );
- QString viewMode = d->smallColumns->isChecked() ?
- QString::fromLatin1("SmallColumns") :
- QString::fromLatin1("LargeRows");
+ TQString viewMode = d->smallColumns->isChecked() ?
+ TQString::fromLatin1("SmallColumns") :
+ TQString::fromLatin1("LargeRows");
if(!kc->hasDefault( "ViewMode" ) && viewMode == DEFAULT_VIEW_MODE )
kc->revertToDefault( "ViewMode" );
else
@@ -239,7 +239,7 @@ void KFileIconView::removeToolTip()
toolTip = 0;
}
-void KFileIconView::showToolTip( QIconViewItem *item )
+void KFileIconView::showToolTip( TQIconViewItem *item )
{
delete toolTip;
toolTip = 0;
@@ -247,32 +247,32 @@ void KFileIconView::showToolTip( QIconViewItem *item )
if ( !item )
return;
- int w = maxItemWidth() - ( itemTextPos() == QIconView::Bottom ? 0 :
+ int w = maxItemWidth() - ( itemTextPos() == TQIconView::Bottom ? 0 :
item->pixmapRect().width() ) - 4;
if ( fontMetrics().width( item->text() ) >= w ) {
- toolTip = new QLabel( QString::fromLatin1(" %1 ").arg(item->text()), 0,
+ toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(item->text()), 0,
"myToolTip",
WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM );
- toolTip->setFrameStyle( QFrame::Plain | QFrame::Box );
+ toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
toolTip->setLineWidth( 1 );
toolTip->setAlignment( AlignLeft | AlignTop );
- toolTip->move( QCursor::pos() + QPoint( 14, 14 ) );
+ toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) );
toolTip->adjustSize();
- QRect screen = QApplication::desktop()->screenGeometry(
- QApplication::desktop()->screenNumber(QCursor::pos()));
+ TQRect screen = TQApplication::desktop()->screenGeometry(
+ TQApplication::desktop()->screenNumber(TQCursor::pos()));
if (toolTip->x()+toolTip->width() > screen.right()) {
toolTip->move(toolTip->x()+screen.right()-toolTip->x()-toolTip->width(), toolTip->y());
}
if (toolTip->y()+toolTip->height() > screen.bottom()) {
toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y());
}
- toolTip->setFont( QToolTip::font() );
- toolTip->setPalette( QToolTip::palette(), true );
+ toolTip->setFont( TQToolTip::font() );
+ toolTip->setPalette( TQToolTip::palette(), true );
toolTip->show();
}
}
-void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
+void KFileIconView::slotActivateMenu( TQIconViewItem* item, const TQPoint& pos )
{
if ( !item ) {
sig->activateMenu( 0, pos );
@@ -282,13 +282,13 @@ void KFileIconView::slotActivateMenu( QIconViewItem* item, const QPoint& pos )
sig->activateMenu( i->fileInfo(), pos );
}
-void KFileIconView::hideEvent( QHideEvent *e )
+void KFileIconView::hideEvent( TQHideEvent *e )
{
removeToolTip();
KIconView::hideEvent( e );
}
-void KFileIconView::keyPressEvent( QKeyEvent *e )
+void KFileIconView::keyPressEvent( TQKeyEvent *e )
{
KIconView::keyPressEvent( e );
@@ -336,7 +336,7 @@ void KFileIconView::insertItem( KFileItem *i )
{
KFileView::insertItem( i );
- QIconView* qview = static_cast<QIconView*>( this );
+ TQIconView* qview = static_cast<TQIconView*>( this );
// Since creating and initializing an item leads to a repaint,
// we disable updates on the IconView for a while.
qview->setUpdatesEnabled( false );
@@ -350,7 +350,7 @@ void KFileIconView::insertItem( KFileItem *i )
i->setExtraData( this, item );
}
-void KFileIconView::slotActivate( QIconViewItem *item )
+void KFileIconView::slotActivate( TQIconViewItem *item )
{
if ( !item )
return;
@@ -359,7 +359,7 @@ void KFileIconView::slotActivate( QIconViewItem *item )
sig->activate( fi );
}
-void KFileIconView::selected( QIconViewItem *item )
+void KFileIconView::selected( TQIconViewItem *item )
{
if ( !item || (KApplication::keyboardMouseState() & (ShiftButton | ControlButton)) != 0 )
return;
@@ -387,7 +387,7 @@ KFileItem * KFileIconView::currentFileItem() const
return 0L;
}
-void KFileIconView::highlighted( QIconViewItem *item )
+void KFileIconView::highlighted( TQIconViewItem *item )
{
if ( !item )
return;
@@ -398,32 +398,32 @@ void KFileIconView::highlighted( QIconViewItem *item )
void KFileIconView::setSelectionMode( KFile::SelectionMode sm )
{
- disconnect( SIGNAL( selectionChanged() ), this );
- disconnect( SIGNAL( selectionChanged( QIconViewItem * )), this );
+ disconnect( TQT_SIGNAL( selectionChanged() ), this );
+ disconnect( TQT_SIGNAL( selectionChanged( TQIconViewItem * )), this );
KFileView::setSelectionMode( sm );
switch ( KFileView::selectionMode() ) {
case KFile::Multi:
- QIconView::setSelectionMode( QIconView::Multi );
+ TQIconView::setSelectionMode( TQIconView::Multi );
break;
case KFile::Extended:
- QIconView::setSelectionMode( QIconView::Extended );
+ TQIconView::setSelectionMode( TQIconView::Extended );
break;
case KFile::NoSelection:
- QIconView::setSelectionMode( QIconView::NoSelection );
+ TQIconView::setSelectionMode( TQIconView::NoSelection );
break;
default: // fall through
case KFile::Single:
- QIconView::setSelectionMode( QIconView::Single );
+ TQIconView::setSelectionMode( TQIconView::Single );
break;
}
if ( sm == KFile::Multi || sm == KFile::Extended )
- connect( this, SIGNAL( selectionChanged() ),
- SLOT( slotSelectionChanged() ));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( slotSelectionChanged() ));
else
- connect( this, SIGNAL( selectionChanged( QIconViewItem * )),
- SLOT( highlighted( QIconViewItem * )));
+ connect( this, TQT_SIGNAL( selectionChanged( TQIconViewItem * )),
+ TQT_SLOT( highlighted( TQIconViewItem * )));
}
bool KFileIconView::isSelected( const KFileItem *i ) const
@@ -437,17 +437,17 @@ void KFileIconView::updateView( bool b )
if ( !b )
return; // eh?
- KFileIconViewItem *item = static_cast<KFileIconViewItem*>(QIconView::firstItem());
+ KFileIconViewItem *item = static_cast<KFileIconViewItem*>(TQIconView::firstItem());
if ( item ) {
do {
if ( d->previews->isChecked() ) {
if ( canPreview( item->fileInfo() ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
}
else {
// unset pixmap size (used for previews)
if ( !item->pixmapSize().isNull() )
- item->setPixmapSize( QSize( 0, 0 ) );
+ item->setPixmapSize( TQSize( 0, 0 ) );
}
// recalculate item parameters but avoid an in-place repaint
item->setPixmap( (item->fileInfo())->pixmap( myIconSize ), true, false );
@@ -593,12 +593,12 @@ void KFileIconView::showPreviews()
d->job = KIO::filePreview(*items(), d->previewIconSize,d->previewIconSize);
d->job->setIgnoreMaximumSize(d->ignoreMaximumSize);
- connect( d->job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotPreviewResult( KIO::Job * )));
- connect( d->job, SIGNAL( gotPreview( const KFileItem*, const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-// connect( d->job, SIGNAL( failed( const KFileItem* )),
-// this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( d->job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotPreviewResult( KIO::Job * )));
+ connect( d->job, TQT_SIGNAL( gotPreview( const KFileItem*, const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+// connect( d->job, TQT_SIGNAL( failed( const KFileItem* )),
+// this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
void KFileIconView::slotPreviewResult( KIO::Job *job )
@@ -607,13 +607,13 @@ void KFileIconView::slotPreviewResult( KIO::Job *job )
d->job = 0L;
}
-void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
+void KFileIconView::gotPreview( const KFileItem *item, const TQPixmap& pix )
{
KFileIconViewItem *it = viewItem( item );
if ( it )
if( item->overlays() & KIcon::HiddenOverlay )
{
- QPixmap p( pix );
+ TQPixmap p( pix );
KIconEffect::semiTransparent( p );
it->setPixmap( p );
@@ -624,12 +624,12 @@ void KFileIconView::gotPreview( const KFileItem *item, const QPixmap& pix )
bool KFileIconView::canPreview( const KFileItem *item ) const
{
- QStringList::Iterator it = d->previewMimeTypes.begin();
- QRegExp r;
+ TQStringList::Iterator it = d->previewMimeTypes.begin();
+ TQRegExp r;
r.setWildcard( true );
for ( ; it != d->previewMimeTypes.end(); ++it ) {
- QString type = *it;
+ TQString type = *it;
// the "mimetype" can be "image/*"
if ( type.at( type.length() - 1 ) == '*' ) {
r.setPattern( type );
@@ -672,20 +672,20 @@ KFileItem * KFileIconView::prevItem( const KFileItem *fileItem ) const
return 0L;
}
-void KFileIconView::setSorting( QDir::SortSpec spec )
+void KFileIconView::setSorting( TQDir::SortSpec spec )
{
KFileView::setSorting( spec );
KFileItemListIterator it( *items() );
KFileItem *item;
- if ( spec & QDir::Time ) {
+ if ( spec & TQDir::Time ) {
for ( ; (item = it.current()); ++it )
// warning, time_t is often signed -> cast it
viewItem(item)->setKey( sortingKey( (unsigned long)item->time( KIO::UDS_MODIFICATION_TIME ), item->isDir(), spec ));
}
- else if ( spec & QDir::Size ) {
+ else if ( spec & TQDir::Size ) {
for ( ; (item = it.current()); ++it )
viewItem(item)->setKey( sortingKey( item->size(), item->isDir(),
spec ));
@@ -718,12 +718,12 @@ void KFileIconView::listingCompleted()
{
arrangeItemsInGrid();
- // QIconView doesn't set the current item automatically, so we have to do
+ // TQIconView doesn't set the current item automatically, so we have to do
// that. We don't want to emit selectionChanged() tho.
if ( !currentItem() ) {
bool block = signalsBlocked();
blockSignals( true );
- QIconViewItem *item = viewItem( firstFileItem() );
+ TQIconViewItem *item = viewItem( firstFileItem() );
KIconView::setCurrentItem( item );
KIconView::setSelected( item, false );
blockSignals( block );
@@ -733,12 +733,12 @@ void KFileIconView::listingCompleted()
}
// need to remove our tooltip, eventually
-bool KFileIconView::eventFilter( QObject *o, QEvent *e )
+bool KFileIconView::eventFilter( TQObject *o, TQEvent *e )
{
if ( o == viewport() || o == this ) {
int type = e->type();
- if ( type == QEvent::Leave ||
- type == QEvent::FocusOut )
+ if ( type == TQEvent::Leave ||
+ type == TQEvent::FocusOut )
removeToolTip();
}
@@ -748,7 +748,7 @@ bool KFileIconView::eventFilter( QObject *o, QEvent *e )
/////////////////////////////////////////////////////////////////
// ### workaround for Qt3 Bug
-void KFileIconView::showEvent( QShowEvent *e )
+void KFileIconView::showEvent( TQShowEvent *e )
{
KIconView::showEvent( e );
}
@@ -758,7 +758,7 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
bool updateTextAndPixmap )
{
if ( d->previews->isChecked() && canPreview( i ) )
- item->setPixmapSize( QSize( d->previewIconSize, d->previewIconSize ) );
+ item->setPixmapSize( TQSize( d->previewIconSize, d->previewIconSize ) );
if ( updateTextAndPixmap )
{
@@ -770,13 +770,13 @@ void KFileIconView::initItem( KFileIconViewItem *item, const KFileItem *i,
}
// see also setSorting()
- QDir::SortSpec spec = KFileView::sorting();
+ TQDir::SortSpec spec = KFileView::sorting();
- if ( spec & QDir::Time )
+ if ( spec & TQDir::Time )
// warning, time_t is often signed -> cast it
item->setKey( sortingKey( (unsigned long) i->time( KIO::UDS_MODIFICATION_TIME ),
i->isDir(), spec ));
- else if ( spec & QDir::Size )
+ else if ( spec & TQDir::Size )
item->setKey( sortingKey( i->size(), i->isDir(), spec ));
else // Name or Unsorted
@@ -806,7 +806,7 @@ void KFileIconView::zoomOut()
setPreviewSize( d->previewIconSize - 30 );
}
-QDragObject *KFileIconView::dragObject()
+TQDragObject *KFileIconView::dragObject()
{
// create a list of the URL:s that we want to drag
KURL::List urls;
@@ -814,16 +814,16 @@ QDragObject *KFileIconView::dragObject()
for ( ; it.current(); ++it ){
urls.append( (*it)->url() );
}
- QPixmap pixmap;
+ TQPixmap pixmap;
if( urls.count() > 1 )
pixmap = DesktopIcon( "kmultiple", iconSize() );
if( pixmap.isNull() )
pixmap = currentFileItem()->pixmap( iconSize() );
- QPoint hotspot;
+ TQPoint hotspot;
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* myDragObject = new KURLDrag( urls, widget() );
+ TQDragObject* myDragObject = new KURLDrag( urls, widget() );
myDragObject->setPixmap( pixmap, hotspot );
return myDragObject;
}
@@ -845,16 +845,16 @@ void KFileIconView::slotAutoOpen()
sig->activate( fileItem );
}
-bool KFileIconView::acceptDrag(QDropEvent* e) const
+bool KFileIconView::acceptDrag(TQDropEvent* e) const
{
return KURLDrag::canDecode( e ) &&
(e->source()!=const_cast<KFileIconView*>(this)) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
+void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -877,7 +877,7 @@ void KFileIconView::contentsDragEnterEvent( QDragEnterEvent *e )
}
}
-void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if ( ! acceptDrag( e ) ) { // can we decode this ?
e->ignore(); // No
@@ -903,13 +903,13 @@ void KFileIconView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileIconView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileIconView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
}
-void KFileIconView::contentsDropEvent( QDropEvent *e )
+void KFileIconView::contentsDropEvent( TQDropEvent *e )
{
d->dropItem = 0;
d->autoOpenTimer.stop();
diff --git a/kio/kfile/kfileiconview.h b/kio/kfile/kfileiconview.h
index 63a841a8e..ea8fe7d89 100644
--- a/kio/kfile/kfileiconview.h
+++ b/kio/kfile/kfileiconview.h
@@ -38,14 +38,14 @@ class QLabel;
class KIO_EXPORT KFileIconViewItem : public KIconViewItem
{
public:
- KFileIconViewItem( QIconView *parent, const QString &text,
- const QPixmap &pixmap,
+ KFileIconViewItem( TQIconView *parent, const TQString &text,
+ const TQPixmap &pixmap,
KFileItem *fi )
: KIconViewItem( parent, text, pixmap ), inf( fi ) {}
/**
* @since 3.1
*/
- KFileIconViewItem( QIconView *parent, KFileItem *fi )
+ KFileIconViewItem( TQIconView *parent, KFileItem *fi )
: KIconViewItem( parent ), inf( fi ) {}
virtual ~KFileIconViewItem();
@@ -83,10 +83,10 @@ class KIO_EXPORT KFileIconView : public KIconView, public KFileView
Q_OBJECT
public:
- KFileIconView(QWidget *parent, const char *name);
+ KFileIconView(TQWidget *parent, const char *name);
virtual ~KFileIconView();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
virtual void setAutoUpdate( bool ) {} // ### unused. remove in KDE4
@@ -137,15 +137,15 @@ public:
void ensureItemVisible( const KFileItem * );
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
// for KMimeTypeResolver
void mimeTypeDeterminationFinished();
void determineIcon( KFileIconViewItem *item );
- QScrollView *scrollWidget() const { return (QScrollView*) this; }
+ TQScrollView *scrollWidget() const { return (TQScrollView*) this; }
void setAcceptDrops(bool b)
{
KIconView::setAcceptDrops(b);
@@ -173,37 +173,37 @@ public slots:
protected:
/**
- * Reimplemented to not let QIconView eat return-key events
+ * Reimplemented to not let TQIconView eat return-key events
*/
- virtual void keyPressEvent( QKeyEvent * );
+ virtual void keyPressEvent( TQKeyEvent * );
/**
* Reimplemented to remove an eventual tooltip
*/
- virtual void hideEvent( QHideEvent * );
+ virtual void hideEvent( TQHideEvent * );
// ### workaround for Qt3 bug (see #35080)
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
// DND support
- virtual QDragObject *dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual TQDragObject *dragObject();
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
// KDE4: Make virtual
- bool acceptDrag(QDropEvent* e ) const;
+ bool acceptDrag(TQDropEvent* e ) const;
private slots:
- void selected( QIconViewItem *item );
- void slotActivate( QIconViewItem * );
- void highlighted( QIconViewItem *item );
- void showToolTip( QIconViewItem *item );
+ void selected( TQIconViewItem *item );
+ void slotActivate( TQIconViewItem * );
+ void highlighted( TQIconViewItem *item );
+ void showToolTip( TQIconViewItem *item );
void removeToolTip();
- void slotActivateMenu( QIconViewItem *, const QPoint& );
+ void slotActivateMenu( TQIconViewItem *, const TQPoint& );
void slotSelectionChanged();
void slotSmallColumns();
@@ -211,7 +211,7 @@ private slots:
void slotPreviewsToggled( bool );
void slotPreviewResult( KIO::Job * );
- void gotPreview( const KFileItem *item, const QPixmap& pix );
+ void gotPreview( const KFileItem *item, const TQPixmap& pix );
void slotAutoOpen();
signals:
@@ -221,25 +221,25 @@ signals:
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, KFileItem *fileItem);
+ void dropped(TQDropEvent *event, KFileItem *fileItem);
/**
* The user dropped the URLs @p urls.
* @p url points to the item dropped on or can be empty if the
* user dropped on empty space.
* @since 3.2
*/
- void dropped(QDropEvent *event, const KURL::List &urls, const KURL &url);
+ void dropped(TQDropEvent *event, const KURL::List &urls, const KURL &url);
private:
KMimeTypeResolver<KFileIconViewItem,KFileIconView> *m_resolver;
- QLabel *toolTip;
+ TQLabel *toolTip;
int th;
int myIconSize;
- virtual void insertItem(QIconViewItem *a, QIconViewItem *b) { KIconView::insertItem(a, b); }
- virtual void setSelectionMode(QIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
- virtual void setSelected(QIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
+ virtual void insertItem(TQIconViewItem *a, TQIconViewItem *b) { KIconView::insertItem(a, b); }
+ virtual void setSelectionMode(TQIconView::SelectionMode m) { KIconView::setSelectionMode(m); }
+ virtual void setSelected(TQIconViewItem *i, bool a, bool b) { KIconView::setSelected(i, a, b); }
bool canPreview( const KFileItem * ) const;
void stopPreview();
diff --git a/kio/kfile/kfilemetainfowidget.cpp b/kio/kfile/kfilemetainfowidget.cpp
index ee76c82e2..5d54af8b9 100644
--- a/kio/kfile/kfilemetainfowidget.cpp
+++ b/kio/kfile/kfilemetainfowidget.cpp
@@ -28,29 +28,29 @@
#include <kstringvalidator.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qdatetimeedit.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qvalidator.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqdatetimeedit.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqvalidator.h>
/*
Widgets used for different types:
bool : QCheckBox
int : QSpinBox
- QString : KComboBox if the validator is a KStringListValidator, else lineedit
- QDateTime : QDateTimeEdit
+ TQString : KComboBox if the validator is a KStringListValidator, else lineedit
+ TQDateTime : QDateTimeEdit
*/
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -60,9 +60,9 @@ KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
KFileMetaInfoWidget::KFileMetaInfoWidget(KFileMetaInfoItem item,
Mode mode,
- QValidator* val,
- QWidget* parent, const char* name)
- : QWidget(parent, name),
+ TQValidator* val,
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name),
m_value(item.value()),
m_item(item),
m_validator(val)
@@ -80,88 +80,88 @@ void KFileMetaInfoWidget::init(KFileMetaInfoItem item, Mode mode)
else
switch (m_value.type())
{
- case QVariant::Image :
- m_widget = new QLabel(this, "info image");
- static_cast<QLabel*>(m_widget)->setPixmap(QPixmap(m_value.toImage()));
+ case TQVariant::Image :
+ m_widget = new TQLabel(this, "info image");
+ static_cast<TQLabel*>(m_widget)->setPixmap(TQPixmap(m_value.toImage()));
break;
- case QVariant::Pixmap :
- m_widget = new QLabel(this, "info pixmap");
- static_cast<QLabel*>(m_widget)->setPixmap(m_value.toPixmap());
+ case TQVariant::Pixmap :
+ m_widget = new TQLabel(this, "info pixmap");
+ static_cast<TQLabel*>(m_widget)->setPixmap(m_value.toPixmap());
break;
default:
- m_widget = new QLabel(item.string(true), this, "info label");
+ m_widget = new TQLabel(item.string(true), this, "info label");
}
- (new QHBoxLayout(this))->addWidget(m_widget);
+ (new TQHBoxLayout(this))->addWidget(m_widget);
}
KFileMetaInfoWidget::~KFileMetaInfoWidget()
{
}
-QWidget* KFileMetaInfoWidget::makeWidget()
+TQWidget* KFileMetaInfoWidget::makeWidget()
{
- QString valClass;
- QWidget* w;
+ TQString valClass;
+ TQWidget* w;
switch (m_value.type())
{
- case QVariant::Invalid: // no type
+ case TQVariant::Invalid: // no type
// just make a label
- w = new QLabel(i18n("<Error>"), this, "label");
+ w = new TQLabel(i18n("<Error>"), this, "label");
break;
- case QVariant::Int: // an int
- case QVariant::UInt: // an unsigned int
+ case TQVariant::Int: // an int
+ case TQVariant::UInt: // an unsigned int
w = makeIntWidget();
break;
- case QVariant::Bool: // a bool
+ case TQVariant::Bool: // a bool
w = makeBoolWidget();
break;
- case QVariant::Double: // a double
+ case TQVariant::Double: // a double
w = makeDoubleWidget();
break;
- case QVariant::Date: // a QDate
+ case TQVariant::Date: // a QDate
w = makeDateWidget();
break;
- case QVariant::Time: // a QTime
+ case TQVariant::Time: // a QTime
w = makeTimeWidget();
break;
- case QVariant::DateTime: // a QDateTime
+ case TQVariant::DateTime: // a QDateTime
w = makeDateTimeWidget();
break;
#if 0
- case QVariant::Size: // a QSize
- case QVariant::String: // a QString
- case QVariant::List: // a QValueList
- case QVariant::Map: // a QMap
- case QVariant::StringList: // a QStringList
- case QVariant::Font: // a QFont
- case QVariant::Pixmap: // a QPixmap
- case QVariant::Brush: // a QBrush
- case QVariant::Rect: // a QRect
- case QVariant::Color: // a QColor
- case QVariant::Palette: // a QPalette
- case QVariant::ColorGroup: // a QColorGroup
- case QVariant::IconSet: // a QIconSet
- case QVariant::Point: // a QPoint
- case QVariant::Image: // a QImage
- case QVariant::CString: // a QCString
- case QVariant::PointArray: // a QPointArray
- case QVariant::Region: // a QRegion
- case QVariant::Bitmap: // a QBitmap
- case QVariant::Cursor: // a QCursor
- case QVariant::ByteArray: // a QByteArray
- case QVariant::BitArray: // a QBitArray
- case QVariant::SizePolicy: // a QSizePolicy
- case QVariant::KeySequence: // a QKeySequence
+ case TQVariant::Size: // a QSize
+ case TQVariant::String: // a QString
+ case TQVariant::List: // a QValueList
+ case TQVariant::Map: // a QMap
+ case TQVariant::StringList: // a QStringList
+ case TQVariant::Font: // a QFont
+ case TQVariant::Pixmap: // a QPixmap
+ case TQVariant::Brush: // a QBrush
+ case TQVariant::Rect: // a QRect
+ case TQVariant::Color: // a QColor
+ case TQVariant::Palette: // a QPalette
+ case TQVariant::ColorGroup: // a QColorGroup
+ case TQVariant::IconSet: // a QIconSet
+ case TQVariant::Point: // a QPoint
+ case TQVariant::Image: // a QImage
+ case TQVariant::CString: // a QCString
+ case TQVariant::PointArray: // a QPointArray
+ case TQVariant::Region: // a QRegion
+ case TQVariant::Bitmap: // a QBitmap
+ case TQVariant::Cursor: // a QCursor
+ case TQVariant::ByteArray: // a QByteArray
+ case TQVariant::BitArray: // a QBitArray
+ case TQVariant::SizePolicy: // a QSizePolicy
+ case TQVariant::KeySequence: // a QKeySequence
#endif
default:
w = makeStringWidget();
@@ -181,39 +181,39 @@ QWidget* KFileMetaInfoWidget::makeWidget()
// now the different methods to make the widgets for specific types
// ****************************************************************
-QWidget* KFileMetaInfoWidget::makeBoolWidget()
+TQWidget* KFileMetaInfoWidget::makeBoolWidget()
{
- QCheckBox* cb = new QCheckBox(this, "metainfo bool widget");
+ TQCheckBox* cb = new TQCheckBox(this, "metainfo bool widget");
cb->setChecked(m_item.value().toBool());
- connect(cb, SIGNAL(toggled(bool)), this, SLOT(slotChanged(bool)));
+ connect(cb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotChanged(bool)));
return cb;
}
-QWidget* KFileMetaInfoWidget::makeIntWidget()
+TQWidget* KFileMetaInfoWidget::makeIntWidget()
{
- QSpinBox* sb = new QSpinBox(this, "metainfo integer widget");
+ TQSpinBox* sb = new TQSpinBox(this, "metainfo integer widget");
sb->setValue(m_item.value().toInt());
if (m_validator)
{
- if (m_validator->inherits("QIntValidator"))
+ if (m_validator->inherits("TQIntValidator"))
{
- sb->setMinValue(static_cast<QIntValidator*>(m_validator)->bottom());
- sb->setMaxValue(static_cast<QIntValidator*>(m_validator)->top());
+ sb->setMinValue(static_cast<TQIntValidator*>(m_validator)->bottom());
+ sb->setMaxValue(static_cast<TQIntValidator*>(m_validator)->top());
}
reparentValidator(sb, m_validator);
sb->setValidator(m_validator);
}
// make sure that an uint cannot be set to a value < 0
- if (m_item.type() == QVariant::UInt)
+ if (m_item.type() == TQVariant::UInt)
sb->setMinValue(QMAX(sb->minValue(), 0));
- connect(sb, SIGNAL(valueChanged(int)), this, SLOT(slotChanged(int)));
+ connect(sb, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChanged(int)));
return sb;
}
-QWidget* KFileMetaInfoWidget::makeDoubleWidget()
+TQWidget* KFileMetaInfoWidget::makeDoubleWidget()
{
KDoubleNumInput* dni = new KDoubleNumInput(m_item.value().toDouble(),
this, "metainfo double widget");
@@ -221,19 +221,19 @@ QWidget* KFileMetaInfoWidget::makeDoubleWidget()
if (m_validator)
{
- if (m_validator->inherits("QDoubleValidator"))
+ if (m_validator->inherits("TQDoubleValidator"))
{
- dni->setMinValue(static_cast<QDoubleValidator*>(m_validator)->bottom());
- dni->setMaxValue(static_cast<QDoubleValidator*>(m_validator)->top());
+ dni->setMinValue(static_cast<TQDoubleValidator*>(m_validator)->bottom());
+ dni->setMaxValue(static_cast<TQDoubleValidator*>(m_validator)->top());
}
reparentValidator(dni, m_validator);
}
- connect(dni, SIGNAL(valueChanged(double)), this, SLOT(slotChanged(double)));
+ connect(dni, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotChanged(double)));
return dni;
}
-QWidget* KFileMetaInfoWidget::makeStringWidget()
+TQWidget* KFileMetaInfoWidget::makeStringWidget()
{
if (m_validator && m_validator->inherits("KStringListValidator"))
{
@@ -242,7 +242,7 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
(m_validator);
b->insertStringList(val->stringList());
b->setCurrentText(m_item.value().toString());
- connect(b, SIGNAL(activated(const QString &)), this, SLOT(slotComboChanged(const QString &)));
+ connect(b, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotComboChanged(const TQString &)));
b->setValidator(val);
reparentValidator(b, val);
return b;
@@ -251,9 +251,9 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
if ( m_item.attributes() & KFileMimeTypeInfo::MultiLine ) {
KEdit *edit = new KEdit( this );
edit->setText( m_item.value().toString() );
- connect( edit, SIGNAL( textChanged() ),
- this, SLOT( slotMultiLineEditChanged() ));
- // can't use a validator with a QTextEdit, but we may need to delete it
+ connect( edit, TQT_SIGNAL( textChanged() ),
+ this, TQT_SLOT( slotMultiLineEditChanged() ));
+ // can't use a validator with a TQTextEdit, but we may need to delete it
if ( m_validator )
reparentValidator( edit, m_validator );
return edit;
@@ -265,31 +265,31 @@ QWidget* KFileMetaInfoWidget::makeStringWidget()
e->setValidator(m_validator);
reparentValidator(e, m_validator);
}
- connect(e, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotLineEditChanged(const QString&)));
+ connect(e, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotLineEditChanged(const TQString&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeDateWidget()
+TQWidget* KFileMetaInfoWidget::makeDateWidget()
{
- QWidget *e = new QDateEdit(m_item.value().toDate(), this);
- connect(e, SIGNAL(valueChanged(const QDate&)),
- this, SLOT(slotDateChanged(const QDate&)));
+ TQWidget *e = new QDateEdit(m_item.value().toDate(), this);
+ connect(e, TQT_SIGNAL(valueChanged(const TQDate&)),
+ this, TQT_SLOT(slotDateChanged(const TQDate&)));
return e;
}
-QWidget* KFileMetaInfoWidget::makeTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeTimeWidget()
{
return new QTimeEdit(m_item.value().toTime(), this);
}
-QWidget* KFileMetaInfoWidget::makeDateTimeWidget()
+TQWidget* KFileMetaInfoWidget::makeDateTimeWidget()
{
return new QDateTimeEdit(m_item.value().toDateTime(), this);
}
-void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
- QValidator *validator )
+void KFileMetaInfoWidget::reparentValidator( TQWidget *widget,
+ TQValidator *validator )
{
if ( !validator->parent() )
widget->insertChild( validator );
@@ -301,16 +301,16 @@ void KFileMetaInfoWidget::reparentValidator( QWidget *widget,
void KFileMetaInfoWidget::slotChanged(bool value)
{
- Q_ASSERT(m_widget->inherits("QComboBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQComboBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
void KFileMetaInfoWidget::slotChanged(int value)
{
- Q_ASSERT(m_widget->inherits("QSpinBox"));
- m_value = QVariant(value);
+ Q_ASSERT(m_widget->inherits("TQSpinBox"));
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -318,23 +318,23 @@ void KFileMetaInfoWidget::slotChanged(int value)
void KFileMetaInfoWidget::slotChanged(double value)
{
Q_ASSERT(m_widget->inherits("KDoubleNumInput"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotComboChanged(const QString &value)
+void KFileMetaInfoWidget::slotComboChanged(const TQString &value)
{
Q_ASSERT(m_widget->inherits("KComboBox"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
+void KFileMetaInfoWidget::slotLineEditChanged(const TQString& value)
{
Q_ASSERT(m_widget->inherits("KLineEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
@@ -342,32 +342,32 @@ void KFileMetaInfoWidget::slotLineEditChanged(const QString& value)
// that may be a little expensive for long texts, but what can we do?
void KFileMetaInfoWidget::slotMultiLineEditChanged()
{
- Q_ASSERT(m_widget->inherits("QTextEdit"));
- m_value = QVariant( static_cast<const QTextEdit*>( sender() )->text() );
+ Q_ASSERT(m_widget->inherits("TQTextEdit"));
+ m_value = TQVariant( static_cast<const TQTextEdit*>( sender() )->text() );
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateChanged(const QDate& value)
+void KFileMetaInfoWidget::slotDateChanged(const TQDate& value)
{
Q_ASSERT(m_widget->inherits("QDateEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotTimeChanged(const QTime& value)
+void KFileMetaInfoWidget::slotTimeChanged(const TQTime& value)
{
Q_ASSERT(m_widget->inherits("QTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
-void KFileMetaInfoWidget::slotDateTimeChanged(const QDateTime& value)
+void KFileMetaInfoWidget::slotDateTimeChanged(const TQDateTime& value)
{
Q_ASSERT(m_widget->inherits("QDateTimeEdit"));
- m_value = QVariant(value);
+ m_value = TQVariant(value);
emit valueChanged(m_value);
m_dirty = true;
}
diff --git a/kio/kfile/kfilemetainfowidget.h b/kio/kfile/kfilemetainfowidget.h
index 4d0070949..c22936b5e 100644
--- a/kio/kfile/kfilemetainfowidget.h
+++ b/kio/kfile/kfilemetainfowidget.h
@@ -20,8 +20,8 @@
#ifndef __KFILEMETAINFOWIDGET_H__
#define __KFILEMETAINFOWIDGET_H__
-#include <qwidget.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
#include <kfilemetainfo.h>
/*!
@@ -38,11 +38,11 @@ public:
Reserve = 0xff
};
- KFileMetaInfoWidget(KFileMetaInfoItem item, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
- KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, QValidator* val = 0,
- QWidget* parent = 0, const char* name = 0);
+ KFileMetaInfoWidget(KFileMetaInfoItem item, Mode mode, TQValidator* val = 0,
+ TQWidget* parent = 0, const char* name = 0);
virtual ~KFileMetaInfoWidget();
@@ -51,44 +51,44 @@ public:
return m_item.isEditable() && m_item.setValue(m_value);
}
- void setValue(const QVariant& value) { m_value = value; }
- QVariant value()const { return m_value; }
- QValidator* validator() const { return m_validator; }
+ void setValue(const TQVariant& value) { m_value = value; }
+ TQVariant value()const { return m_value; }
+ TQValidator* validator() const { return m_validator; }
KFileMetaInfoItem item()const { return m_item; }
signals:
- void valueChanged(const QVariant& value);
+ void valueChanged(const TQVariant& value);
protected:
- void reparentValidator(QWidget *widget, QValidator *validator);
- virtual QWidget* makeWidget();
+ void reparentValidator(TQWidget *widget, TQValidator *validator);
+ virtual TQWidget* makeWidget();
- QWidget* makeBoolWidget();
- QWidget* makeIntWidget();
- QWidget* makeDoubleWidget();
- QWidget* makeStringWidget();
- QWidget* makeDateWidget();
- QWidget* makeTimeWidget();
- QWidget* makeDateTimeWidget();
+ TQWidget* makeBoolWidget();
+ TQWidget* makeIntWidget();
+ TQWidget* makeDoubleWidget();
+ TQWidget* makeStringWidget();
+ TQWidget* makeDateWidget();
+ TQWidget* makeTimeWidget();
+ TQWidget* makeDateTimeWidget();
private slots:
void slotChanged(bool value);
void slotChanged(int value);
void slotChanged(double value);
- void slotComboChanged(const QString &value);
- void slotLineEditChanged(const QString& value);
+ void slotComboChanged(const TQString &value);
+ void slotLineEditChanged(const TQString& value);
void slotMultiLineEditChanged();
- void slotDateChanged(const QDate& value);
- void slotTimeChanged(const QTime& value);
- void slotDateTimeChanged(const QDateTime& value);
+ void slotDateChanged(const TQDate& value);
+ void slotTimeChanged(const TQTime& value);
+ void slotDateTimeChanged(const TQDateTime& value);
private:
void init(KFileMetaInfoItem item, Mode mode);
- QVariant m_value; // the value will be saved here until apply() is called
+ TQVariant m_value; // the value will be saved here until apply() is called
KFileMetaInfoItem m_item;
- QWidget* m_widget;
- QValidator* m_validator;
+ TQWidget* m_widget;
+ TQValidator* m_validator;
bool m_dirty : 1;
};
diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp
index 4d5ec339b..1be7743a1 100644
--- a/kio/kfile/kfilemetapreview.cpp
+++ b/kio/kfile/kfilemetapreview.cpp
@@ -8,7 +8,7 @@
#include "kfilemetapreview.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kio/previewjob.h>
#include <klibloader.h>
@@ -17,12 +17,12 @@
bool KFileMetaPreview::s_tryAudioPreview = true;
-KFileMetaPreview::KFileMetaPreview( QWidget *parent, const char *name )
+KFileMetaPreview::KFileMetaPreview( TQWidget *parent, const char *name )
: KPreviewWidgetBase( parent, name ),
haveAudioPreview( false )
{
- QHBoxLayout *layout = new QHBoxLayout( this, 0, 0 );
- m_stack = new QWidgetStack( this );
+ TQHBoxLayout *layout = new TQHBoxLayout( this, 0, 0 );
+ m_stack = new TQWidgetStack( this );
layout->addWidget( m_stack );
// ###
@@ -45,8 +45,8 @@ void KFileMetaPreview::initPreviewProviders()
m_stack->raiseWidget( imagePreview );
resize( imagePreview->sizeHint() );
- QStringList mimeTypes = imagePreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = imagePreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
{
// qDebug(".... %s", (*it).latin1());
@@ -54,7 +54,7 @@ void KFileMetaPreview::initPreviewProviders()
}
}
-KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeType )
+KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeType )
{
// qDebug("### looking for: %s", mimeType.latin1());
// often the first highlighted item, where we can be sure, there is no plugin
@@ -78,8 +78,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
{
haveAudioPreview = true;
(void) m_stack->addWidget( audioPreview );
- QStringList mimeTypes = audioPreview->supportedMimeTypes();
- QStringList::ConstIterator it = mimeTypes.begin();
+ TQStringList mimeTypes = audioPreview->supportedMimeTypes();
+ TQStringList::ConstIterator it = mimeTypes.begin();
for ( ; it != mimeTypes.end(); ++it )
m_previewProviders.insert( *it, audioPreview );
}
@@ -104,7 +104,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
if ( mimeInfo )
{
// check mime type inheritance
- QString parentMimeType = mimeInfo->parentMimeType();
+ TQString parentMimeType = mimeInfo->parentMimeType();
while ( !parentMimeType.isEmpty() )
{
provider = m_previewProviders.find( parentMimeType );
@@ -118,8 +118,8 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const QString& mimeTy
}
// check X-KDE-Text property
- QVariant textProperty = mimeInfo->property( "X-KDE-text" );
- if ( textProperty.isValid() && textProperty.type() == QVariant::Bool )
+ TQVariant textProperty = mimeInfo->property( "X-KDE-text" );
+ if ( textProperty.isValid() && textProperty.type() == TQVariant::Bool )
{
if ( textProperty.toBool() )
{
@@ -163,7 +163,7 @@ void KFileMetaPreview::clearPreview()
static_cast<KPreviewWidgetBase*>( m_stack->visibleWidget() )->clearPreview();
}
-void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
+void KFileMetaPreview::addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider )
{
m_previewProviders.insert( mimeType, provider );
@@ -171,7 +171,7 @@ void KFileMetaPreview::addPreviewProvider( const QString& mimeType,
void KFileMetaPreview::clearPreviewProviders()
{
- QDictIterator<KPreviewWidgetBase> it( m_previewProviders );
+ TQDictIterator<KPreviewWidgetBase> it( m_previewProviders );
for ( ; it.current(); ++it )
m_stack->removeWidget( it.current() );
@@ -179,7 +179,7 @@ void KFileMetaPreview::clearPreviewProviders()
}
// static
-KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( QWidget *parent )
+KPreviewWidgetBase * KFileMetaPreview::createAudioPreview( TQWidget *parent )
{
KLibFactory *factory = KLibLoader::self()->factory( "kfileaudiopreview" );
if ( !factory )
diff --git a/kio/kfile/kfilemetapreview.h b/kio/kfile/kfilemetapreview.h
index ae0650ea1..19b7901a1 100644
--- a/kio/kfile/kfilemetapreview.h
+++ b/kio/kfile/kfilemetapreview.h
@@ -9,8 +9,8 @@
#ifndef KFILEMETAPREVIEW_H
#define KFILEMETAPREVIEW_H
-#include <qdict.h>
-#include <qwidgetstack.h>
+#include <tqdict.h>
+#include <tqwidgetstack.h>
#include <kpreviewwidgetbase.h>
#include <kurl.h>
@@ -20,10 +20,10 @@ class KIO_EXPORT KFileMetaPreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KFileMetaPreview(QWidget *parent, const char *name = 0);
+ KFileMetaPreview(TQWidget *parent, const char *name = 0);
~KFileMetaPreview();
- virtual void addPreviewProvider( const QString& mimeType,
+ virtual void addPreviewProvider( const TQString& mimeType,
KPreviewWidgetBase *provider );
virtual void clearPreviewProviders();
@@ -32,7 +32,7 @@ public slots:
virtual void clearPreview();
protected:
- virtual KPreviewWidgetBase *previewProviderFor( const QString& mimeType );
+ virtual KPreviewWidgetBase *previewProviderFor( const TQString& mimeType );
protected:
virtual void virtual_hook( int id, void* data );
@@ -40,12 +40,12 @@ protected:
private:
void initPreviewProviders();
- QWidgetStack *m_stack;
- QDict<KPreviewWidgetBase> m_previewProviders;
+ TQWidgetStack *m_stack;
+ TQDict<KPreviewWidgetBase> m_previewProviders;
bool haveAudioPreview;
// may return 0L
- static KPreviewWidgetBase * createAudioPreview( QWidget *parent );
+ static KPreviewWidgetBase * createAudioPreview( TQWidget *parent );
static bool s_tryAudioPreview;
private:
diff --git a/kio/kfile/kfilepreview.cpp b/kio/kfile/kfilepreview.cpp
index 14065c3cb..b221a1ebb 100644
--- a/kio/kfile/kfilepreview.cpp
+++ b/kio/kfile/kfilepreview.cpp
@@ -24,24 +24,24 @@
#include <kfilepreview.moc>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "config-kfile.h"
-KFilePreview::KFilePreview(KFileView *view, QWidget *parent, const char *name)
- : QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(KFileView *view, TQWidget *parent, const char *name)
+ : TQSplitter(parent, name), KFileView()
{
if ( view )
init( view );
else
- init( new KFileIconView( (QSplitter*) this, "left" ));
+ init( new KFileIconView( (TQSplitter*) this, "left" ));
}
-KFilePreview::KFilePreview(QWidget *parent, const char *name) :
- QSplitter(parent, name), KFileView()
+KFilePreview::KFilePreview(TQWidget *parent, const char *name) :
+ TQSplitter(parent, name), KFileView()
{
- init( new KFileIconView((QSplitter*)this, "left") );
+ init( new KFileIconView((TQSplitter*)this, "left") );
}
KFilePreview::~KFilePreview()
@@ -54,7 +54,7 @@ KFilePreview::~KFilePreview()
// don't delete the preview, we can reuse it
// (it will get deleted by ~KDirOperator)
if ( preview && preview->parentWidget() == this ) {
- preview->reparent(0L, 0, QPoint(0, 0), false);
+ preview->reparent(0L, 0, TQPoint(0, 0), false);
}
}
@@ -65,13 +65,13 @@ void KFilePreview::init( KFileView *view )
left = 0L;
setFileView( view );
- preview = new QWidget((QSplitter*)this, "preview");
- QString tmp = i18n("No preview available.");
- QLabel *l = new QLabel(tmp, preview);
+ preview = new TQWidget((TQSplitter*)this, "preview");
+ TQString tmp = i18n("No preview available.");
+ TQLabel *l = new TQLabel(tmp, preview);
l->setMinimumSize(l->sizeHint());
l->move(10, 5);
preview->setMinimumWidth(l->sizeHint().width()+20);
- setResizeMode(preview, QSplitter::KeepSize);
+ setResizeMode(preview, TQSplitter::KeepSize);
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -89,14 +89,14 @@ void KFilePreview::setFileView( KFileView *view )
//}
delete left;
- view->widget()->reparent( this, QPoint(0,0) );
+ view->widget()->reparent( this, TQPoint(0,0) );
view->KFileView::setViewMode(All);
view->setParentView(this);
view->setSorting( sorting() );
left = view;
- connect( left->signaler(), SIGNAL( fileHighlighted(const KFileItem*) ),
- SLOT( slotHighlighted( const KFileItem * )));
+ connect( left->signaler(), TQT_SIGNAL( fileHighlighted(const KFileItem*) ),
+ TQT_SLOT( slotHighlighted( const KFileItem * )));
// Why copy the actions? --ellis, 13 Jan 02.
//for ( uint i = 0; i < view->actionCollection()->count(); i++ )
@@ -105,15 +105,15 @@ void KFilePreview::setFileView( KFileView *view )
// this url parameter is useless... it's the url of the current directory.
// what for?
-void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
+void KFilePreview::setPreviewWidget(const TQWidget *w, const KURL &)
{
left->setOnlyDoubleClickSelectsFiles( onlyDoubleClickSelectsFiles() );
if (w) {
- connect(this, SIGNAL( showPreview(const KURL &) ),
- w, SLOT( showPreview(const KURL &) ));
- connect( this, SIGNAL( clearPreview() ),
- w, SLOT( clearPreview() ));
+ connect(this, TQT_SIGNAL( showPreview(const KURL &) ),
+ w, TQT_SLOT( showPreview(const KURL &) ));
+ connect( this, TQT_SIGNAL( clearPreview() ),
+ w, TQT_SLOT( clearPreview() ));
}
else {
preview->hide();
@@ -121,8 +121,8 @@ void KFilePreview::setPreviewWidget(const QWidget *w, const KURL &)
}
delete preview;
- preview = const_cast<QWidget*>(w);
- preview->reparent((QSplitter*)this, 0, QPoint(0, 0), true);
+ preview = const_cast<TQWidget*>(w);
+ preview->reparent((TQSplitter*)this, 0, TQPoint(0, 0), true);
preview->resize(preview->sizeHint());
preview->show();
}
@@ -133,7 +133,7 @@ void KFilePreview::insertItem(KFileItem *item)
left->insertItem(item);
}
-void KFilePreview::setSorting( QDir::SortSpec sort )
+void KFilePreview::setSorting( TQDir::SortSpec sort )
{
left->setSorting( sort );
KFileView::setSorting( left->sorting() );
@@ -264,12 +264,12 @@ KActionCollection * KFilePreview::actionCollection() const
}
}
-void KFilePreview::readConfig( KConfig *config, const QString& group )
+void KFilePreview::readConfig( KConfig *config, const TQString& group )
{
left->readConfig( config, group );
}
-void KFilePreview::writeConfig( KConfig *config, const QString& group )
+void KFilePreview::writeConfig( KConfig *config, const TQString& group )
{
left->writeConfig( config, group );
}
diff --git a/kio/kfile/kfilepreview.h b/kio/kfile/kfilepreview.h
index d6ee487f7..123d221f1 100644
--- a/kio/kfile/kfilepreview.h
+++ b/kio/kfile/kfilepreview.h
@@ -23,9 +23,9 @@
#ifndef _KFILEPREVIEW_H
#define _KFILEPREVIEW_H
-#include <qsplitter.h>
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqsplitter.h>
+#include <tqwidget.h>
+#include <tqstring.h>
#include <kurl.h>
#include <kfileitem.h>
@@ -36,16 +36,16 @@
/*!
* This KFileView is an empbedded preview for some file types.
*/
-class KIO_EXPORT KFilePreview : public QSplitter, public KFileView
+class KIO_EXPORT KFilePreview : public TQSplitter, public KFileView
{
Q_OBJECT
public:
- KFilePreview(QWidget *parent, const char *name);
- KFilePreview(KFileView *view, QWidget *parent, const char *name);
+ KFilePreview(TQWidget *parent, const char *name);
+ KFilePreview(KFileView *view, TQWidget *parent, const char *name);
virtual ~KFilePreview();
- virtual QWidget *widget() { return this; }
+ virtual TQWidget *widget() { return this; }
virtual void clearView();
/**
@@ -81,10 +81,10 @@ public:
virtual KFileItem * nextItem( const KFileItem * ) const;
virtual KFileItem * prevItem( const KFileItem * ) const;
- virtual void setSorting( QDir::SortSpec sort );
+ virtual void setSorting( TQDir::SortSpec sort );
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* This overrides KFileView::actionCollection() by returning
@@ -96,7 +96,7 @@ public:
void ensureItemVisible(const KFileItem *);
- void setPreviewWidget(const QWidget *w, const KURL &u);
+ void setPreviewWidget(const TQWidget *w, const KURL &u);
protected slots:
virtual void slotHighlighted( const KFileItem * );
@@ -109,8 +109,8 @@ private:
void init( KFileView *view );
KFileView *left;
- QWidget *preview;
- QString viewname;
+ TQWidget *preview;
+ TQString viewname;
protected:
/** \internal */
diff --git a/kio/kfile/kfilesharedlg.cpp b/kio/kfile/kfilesharedlg.cpp
index 9be183728..788edee51 100644
--- a/kio/kfile/kfilesharedlg.cpp
+++ b/kio/kfile/kfilesharedlg.cpp
@@ -18,12 +18,12 @@
*/
#include "kfilesharedlg.h"
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlayout.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqdir.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
#include <kprocess.h>
#include <kprocio.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include <errno.h>
#include <kio/kfileshare.h>
#include <kseparator.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <ksimpleconfig.h>
#include <kmessagebox.h>
@@ -43,7 +43,7 @@
class KFileSharePropsPlugin::Private
{
public:
- QVBox *m_vBox;
+ TQVBox *m_vBox;
KProcess *m_configProc;
bool m_bAllShared;
bool m_bAllUnshared;
@@ -98,14 +98,14 @@ void KFileSharePropsPlugin::init()
delete m_widget;
m_rbShare = 0L;
m_rbUnShare = 0L;
- m_widget = new QWidget( d->m_vBox );
- QVBoxLayout * vbox = new QVBoxLayout( m_widget );
+ m_widget = new TQWidget( d->m_vBox );
+ TQVBoxLayout * vbox = new TQVBoxLayout( m_widget );
switch ( KFileShare::authorization() ) {
case KFileShare::Authorized:
{
// Check if all selected dirs are in $HOME
- QString home = QDir::homeDirPath();
+ TQString home = TQDir::homeDirPath();
if ( home[home.length()-1] != '/' )
home += '/';
bool ok = true;
@@ -115,7 +115,7 @@ void KFileSharePropsPlugin::init()
d->m_bAllUnshared = true;
KFileItemListIterator it( items );
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
if ( !path.startsWith( home ) )
ok = false;
if ( KFileShare::isDirectoryShared( path ) )
@@ -125,7 +125,7 @@ void KFileSharePropsPlugin::init()
}
if ( !ok )
{
- vbox->addWidget( new QLabel( i18n( "Only folders in your home folder can be shared."),
+ vbox->addWidget( new TQLabel( i18n( "Only folders in your home folder can be shared."),
m_widget ), 0 );
}
else
@@ -134,15 +134,15 @@ void KFileSharePropsPlugin::init()
vbox->setSpacing( KDialog::spacingHint() );
vbox->setMargin( KDialog::marginHint() );
- QButtonGroup *rbGroup = new QButtonGroup( m_widget );
+ TQButtonGroup *rbGroup = new TQButtonGroup( m_widget );
rbGroup->hide();
- m_rbUnShare = new QRadioButton( i18n("Not shared"), m_widget );
- connect( m_rbUnShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbUnShare = new TQRadioButton( i18n("Not shared"), m_widget );
+ connect( m_rbUnShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbUnShare, 0 );
rbGroup->insert( m_rbUnShare );
- m_rbShare = new QRadioButton( i18n("Shared"), m_widget );
- connect( m_rbShare, SIGNAL( toggled(bool) ), SIGNAL( changed() ) );
+ m_rbShare = new TQRadioButton( i18n("Shared"), m_widget );
+ connect( m_rbShare, TQT_SIGNAL( toggled(bool) ), TQT_SIGNAL( changed() ) );
vbox->addWidget( m_rbShare, 0 );
rbGroup->insert( m_rbShare );
@@ -153,17 +153,17 @@ void KFileSharePropsPlugin::init()
m_rbUnShare->setChecked(true);
// Some help text
- QLabel *label = new QLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
+ TQLabel *label = new TQLabel( i18n("Sharing this folder makes it available under Linux/UNIX (NFS) and Windows (Samba).") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
KSeparator* sep=new KSeparator(m_widget);
vbox->addWidget( sep, 0 );
- label = new QLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
+ label = new TQLabel( i18n("You can also reconfigure file sharing authorization.") , m_widget );
label->setAlignment( Qt::AlignAuto | Qt::AlignVCenter | Qt::WordBreak );
vbox->addWidget( label, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
vbox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 );
@@ -171,23 +171,23 @@ void KFileSharePropsPlugin::init()
}
break;
case KFileShare::ErrorNotFound:
- vbox->addWidget( new QLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
+ vbox->addWidget( new TQLabel( i18n("Error running 'filesharelist'. Check if installed and in $PATH or /usr/sbin."),
m_widget ), 0 );
break;
case KFileShare::UserNotAllowed:
{
vbox->setSpacing( 10 );
if (KFileShare::sharingEnabled()) {
- vbox->addWidget( new QLabel( i18n("You need to be authorized to share folders."),
+ vbox->addWidget( new TQLabel( i18n("You need to be authorized to share folders."),
m_widget ), 0 );
} else {
- vbox->addWidget( new QLabel( i18n("File sharing is disabled."),
+ vbox->addWidget( new TQLabel( i18n("File sharing is disabled."),
m_widget ), 0 );
}
- QHBoxLayout* hBox = new QHBoxLayout( (QWidget *)0L );
+ TQHBoxLayout* hBox = new TQHBoxLayout( (TQWidget *)0L );
vbox->addLayout( hBox, 0 );
- m_pbConfig = new QPushButton( i18n("Configure File Sharing..."), m_widget );
- connect( m_pbConfig, SIGNAL( clicked() ), SLOT( slotConfigureFileSharing() ) );
+ m_pbConfig = new TQPushButton( i18n("Configure File Sharing..."), m_widget );
+ connect( m_pbConfig, TQT_SIGNAL( clicked() ), TQT_SLOT( slotConfigureFileSharing() ) );
hBox->addWidget( m_pbConfig, 0, Qt::AlignHCenter );
vbox->addStretch( 10 ); // align items on top
break;
@@ -211,8 +211,8 @@ void KFileSharePropsPlugin::slotConfigureFileSharing()
d->m_configProc = 0;
return;
}
- connect(d->m_configProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotConfigureFileSharingDone()));
+ connect(d->m_configProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotConfigureFileSharingDone()));
m_pbConfig->setEnabled(false);
}
@@ -241,7 +241,7 @@ void KFileSharePropsPlugin::applyChanges()
KFileItemListIterator it( items );
bool ok = true;
for ( ; it.current() && ok; ++it ) {
- QString path = (*it)->url().path();
+ TQString path = (*it)->url().path();
ok = setShared( path, share );
if (!ok) {
if (share)
@@ -267,13 +267,13 @@ void KFileSharePropsPlugin::applyChanges()
}
}
-bool KFileSharePropsPlugin::setShared( const QString& path, bool shared )
+bool KFileSharePropsPlugin::setShared( const TQString& path, bool shared )
{
kdDebug() << "KFileSharePropsPlugin::setShared " << path << "," << shared << endl;
return KFileShare::setShared( path, shared );
}
-QWidget* KFileSharePropsPlugin::page() const
+TQWidget* KFileSharePropsPlugin::page() const
{
return d->m_vBox;
}
diff --git a/kio/kfile/kfilesharedlg.h b/kio/kfile/kfilesharedlg.h
index c95de779b..a314d0d06 100644
--- a/kio/kfile/kfilesharedlg.h
+++ b/kio/kfile/kfilesharedlg.h
@@ -46,7 +46,7 @@ public:
static bool supports( const KFileItemList& items );
- QWidget* page() const;
+ TQWidget* page() const;
protected slots:
void slotConfigureFileSharing();
@@ -54,12 +54,12 @@ protected slots:
private:
void init();
- bool setShared( const QString&path, bool shared );
+ bool setShared( const TQString&path, bool shared );
- QWidget *m_widget;
- QRadioButton *m_rbShare;
- QRadioButton *m_rbUnShare;
- QPushButton *m_pbConfig;
+ TQWidget *m_widget;
+ TQRadioButton *m_rbShare;
+ TQRadioButton *m_rbUnShare;
+ TQPushButton *m_pbConfig;
class Private;
Private *d;
};
diff --git a/kio/kfile/kfilespeedbar.cpp b/kio/kfile/kfilespeedbar.cpp
index 350423d35..154009625 100644
--- a/kio/kfile/kfilespeedbar.cpp
+++ b/kio/kfile/kfilespeedbar.cpp
@@ -19,10 +19,10 @@
#include "kfilespeedbar.h"
#include "config-kfile.h"
-#include <qdir.h>
-#include <qfile.h>
-#include <qtextcodec.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqtextcodec.h>
+#include <tqtextstream.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -32,7 +32,7 @@
#include <kstandarddirs.h>
#include <kurl.h>
-KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
+KFileSpeedBar::KFileSpeedBar( TQWidget *parent, const char *name )
: KURLBar( true, parent, name )
{
KConfig *config = KGlobal::config();
@@ -49,14 +49,14 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Desktop"), false );
//TODO: win32
- if ((KGlobalSettings::documentPath() != (QDir::homeDirPath()+"/")) &&
- QDir(KGlobalSettings::documentPath()).exists())
+ if ((KGlobalSettings::documentPath() != (TQDir::homeDirPath()+"/")) &&
+ TQDir(KGlobalSettings::documentPath()).exists())
{
u.setPath( KGlobalSettings::documentPath() );
insertItem( u, i18n("Documents"), false, "folder_txt" );
}
- u.setPath( QDir::homeDirPath() );
+ u.setPath( TQDir::homeDirPath() );
insertItem( u, i18n("Home Folder"), false,
"folder_home" );
@@ -65,33 +65,33 @@ KFileSpeedBar::KFileSpeedBar( QWidget *parent, const char *name )
insertItem( u, i18n("Storage Media"), false,
KProtocolInfo::icon( "media" ) );
- if ( QFile::exists( QDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
+ if ( TQFile::exists( TQDir::homeDirPath()+"/.config/user-dirs.dirs" ) )
{
- QString download, music, pictures, videos, templates, publicShares;
+ TQString download, music, pictures, videos, templates, publicShares;
- QFile f( QDir::homeDirPath()+"/.config/user-dirs.dirs" );
+ TQFile f( TQDir::homeDirPath()+"/.config/user-dirs.dirs" );
if (!f.open(IO_ReadOnly))
return;
- QTextStream s( &f );
- s.setCodec( QTextCodec::codecForLocale() );
+ TQTextStream s( &f );
+ s.setCodec( TQTextCodec::codecForLocale() );
// read the xdg user dirs
- QString line = s.readLine();
+ TQString line = s.readLine();
while (!line.isNull())
{
if (line.startsWith("XDG_DOWNLOAD_DIR="))
- download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ download = line.remove("XDG_DOWNLOAD_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_MUSIC_DIR="))
- music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ music = line.remove("XDG_MUSIC_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PICTURES_DIR="))
- pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ pictures = line.remove("XDG_PICTURES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_VIDEOS_DIR="))
- videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ videos = line.remove("XDG_VIDEOS_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_TEMPLATES_DIR="))
- templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ templates = line.remove("XDG_TEMPLATES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
else if (line.startsWith("XDG_PUBLICSHARES_DIR="))
- publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", QDir::homeDirPath());
+ publicShares = line.remove("XDG_PUBLICSHARES_DIR=").remove("\"").replace("$HOME", TQDir::homeDirPath());
line = s.readLine();
}
@@ -133,9 +133,9 @@ void KFileSpeedBar::save( KConfig *config )
writeConfig( config, "KFileDialog Speedbar" );
}
-QSize KFileSpeedBar::sizeHint() const
+TQSize KFileSpeedBar::sizeHint() const
{
- QSize sizeHint = KURLBar::sizeHint();
+ TQSize sizeHint = KURLBar::sizeHint();
int ems = fontMetrics().width("mmmmmmmmmmmm");
if (sizeHint.width() < ems)
{
diff --git a/kio/kfile/kfilespeedbar.h b/kio/kfile/kfilespeedbar.h
index c941a2398..28c621651 100644
--- a/kio/kfile/kfilespeedbar.h
+++ b/kio/kfile/kfilespeedbar.h
@@ -27,11 +27,11 @@ class KIO_EXPORT KFileSpeedBar : public KURLBar
{
Q_OBJECT
public:
- KFileSpeedBar( QWidget *parent = 0, const char *name = 0 );
+ KFileSpeedBar( TQWidget *parent = 0, const char *name = 0 );
~KFileSpeedBar();
virtual void save( KConfig *config );
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
private:
bool m_initializeSpeedbar : 1;
diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp
index b37662f89..352bd875e 100644
--- a/kio/kfile/kfiletreebranch.cpp
+++ b/kio/kfile/kfiletreebranch.cpp
@@ -18,7 +18,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kfileitem.h>
#include <kdebug.h>
@@ -34,8 +34,8 @@
/* --- KFileTreeViewToplevelItem --- */
KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
- const QString& name,
- const QPixmap& pix, bool showHidden,
+ const TQString& name,
+ const TQPixmap& pix, bool showHidden,
KFileTreeViewItem *branchRoot )
: KDirLister( false ),
@@ -64,37 +64,37 @@ KFileTreeBranch::KFileTreeBranch( KFileTreeView *parent, const KURL& url,
setShowingDotFiles( showHidden );
- connect( this, SIGNAL( refreshItems(const KFileItemList&)),
- this, SLOT ( slotRefreshItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( refreshItems(const KFileItemList&)),
+ this, TQT_SLOT ( slotRefreshItems( const KFileItemList& )));
- connect( this, SIGNAL( newItems(const KFileItemList&)),
- this, SLOT ( addItems( const KFileItemList& )));
+ connect( this, TQT_SIGNAL( newItems(const KFileItemList&)),
+ this, TQT_SLOT ( addItems( const KFileItemList& )));
- connect( this, SIGNAL( completed(const KURL& )),
- this, SLOT(slCompleted(const KURL&)));
+ connect( this, TQT_SIGNAL( completed(const KURL& )),
+ this, TQT_SLOT(slCompleted(const KURL&)));
- connect( this, SIGNAL( started( const KURL& )),
- this, SLOT( slotListerStarted( const KURL& )));
+ connect( this, TQT_SIGNAL( started( const KURL& )),
+ this, TQT_SLOT( slotListerStarted( const KURL& )));
- connect( this, SIGNAL( deleteItem( KFileItem* )),
- this, SLOT( slotDeleteItem( KFileItem* )));
+ connect( this, TQT_SIGNAL( deleteItem( KFileItem* )),
+ this, TQT_SLOT( slotDeleteItem( KFileItem* )));
- connect( this, SIGNAL( canceled(const KURL&) ),
- this, SLOT( slotCanceled(const KURL&) ));
+ connect( this, TQT_SIGNAL( canceled(const KURL&) ),
+ this, TQT_SLOT( slotCanceled(const KURL&) ));
- connect( this, SIGNAL( clear()),
- this, SLOT( slotDirlisterClear()));
+ connect( this, TQT_SIGNAL( clear()),
+ this, TQT_SLOT( slotDirlisterClear()));
- connect( this, SIGNAL( clear(const KURL&)),
- this, SLOT( slotDirlisterClearURL(const KURL&)));
+ connect( this, TQT_SIGNAL( clear(const KURL&)),
+ this, TQT_SLOT( slotDirlisterClearURL(const KURL&)));
- connect( this, SIGNAL( redirection( const KURL& , const KURL& ) ),
- this, SLOT( slotRedirect( const KURL&, const KURL& )));
+ connect( this, TQT_SIGNAL( redirection( const KURL& , const KURL& ) ),
+ this, TQT_SLOT( slotRedirect( const KURL&, const KURL& )));
m_openChildrenURLs.append( url );
}
-void KFileTreeBranch::setOpenPixmap( const QPixmap& pix )
+void KFileTreeBranch::setOpenPixmap( const TQPixmap& pix )
{
m_openRootIcon = pix;
@@ -123,7 +123,7 @@ KFileTreeViewItem *KFileTreeBranch::parentKFTVItem( KFileItem *item )
KURL url = item->url();
// kdDebug(250) << "Item's url is " << url.prettyURL() << endl;
KURL dirUrl( url );
- dirUrl.setFileName( QString::null );
+ dirUrl.setFileName( TQString::null );
// kdDebug(250) << "Directory url is " << dirUrl.prettyURL() << endl;
parent = findTVIByURL( dirUrl );
@@ -181,7 +181,7 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
/* Cut off the file extension in case it is not a directory */
if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */
{
- QString name = currItem->text();
+ TQString name = currItem->text();
int mPoint = name.findRev( '.' );
if( mPoint > 0 )
name = name.left( mPoint );
@@ -195,13 +195,13 @@ void KFileTreeBranch::addItems( const KFileItemList& list )
if( dirOnlyMode() && !m_recurseChildren && currItem->isLocalFile( ) && currItem->isDir() )
{
KURL url = currItem->url();
- QString filename = url.directory( false, true ) + url.fileName();
+ TQString filename = url.directory( false, true ) + url.fileName();
/* do the stat trick of Carsten. The problem is, that the hardlink
* count only contains directory links. Thus, this method only seem
* to work in dir-only mode */
kdDebug(250) << "Doing stat on " << filename << endl;
KDE_struct_stat statBuf;
- if( KDE_stat( QFile::encodeName( filename ), &statBuf ) == 0 )
+ if( KDE_stat( TQFile::encodeName( filename ), &statBuf ) == 0 )
{
int hardLinks = statBuf.st_nlink; /* Count of dirs */
kdDebug(250) << "stat succeeded, hardlinks: " << hardLinks << endl;
@@ -346,7 +346,7 @@ void KFileTreeBranch::slotDirlisterClearURL( const KURL& url )
}
}
-void KFileTreeBranch::deleteChildrenOf( QListViewItem *parent )
+void KFileTreeBranch::deleteChildrenOf( TQListViewItem *parent )
{
// for some strange reason, slotDirlisterClearURL() sometimes calls us
// with a 0L parent.
@@ -446,7 +446,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
/* This is the starting point. The visible folder has finished,
processing the children has not yet started */
nextChild = static_cast<KFileTreeViewItem*>
- (static_cast<QListViewItem*>(currParent)->firstChild());
+ (static_cast<TQListViewItem*>(currParent)->firstChild());
if( ! nextChild )
{
@@ -480,7 +480,7 @@ void KFileTreeBranch::slCompleted( const KURL& url )
openURL( recurseUrl, true );
}
}
- nextChild = static_cast<KFileTreeViewItem*>(static_cast<QListViewItem*>(nextChild->nextSibling()));
+ nextChild = static_cast<KFileTreeViewItem*>(static_cast<TQListViewItem*>(nextChild->nextSibling()));
// kdDebug(250) << "Next child " << m_nextChild << endl;
}
}
diff --git a/kio/kfile/kfiletreebranch.h b/kio/kfile/kfiletreebranch.h
index 97d41d9c3..30f5cf47c 100644
--- a/kio/kfile/kfiletreebranch.h
+++ b/kio/kfile/kfiletreebranch.h
@@ -22,8 +22,8 @@
#ifndef kfile_tree_branch_h
#define kfile_tree_branch_h
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
#include <kfileitem.h>
#include <kio/global.h>
@@ -59,8 +59,8 @@ public:
* branch, with the default 0 meaning to let KFileTreeBranch create
* it for you.
*/
- KFileTreeBranch( KFileTreeView*, const KURL& url, const QString& name,
- const QPixmap& pix, bool showHidden = false,
+ KFileTreeBranch( KFileTreeView*, const KURL& url, const TQString& name,
+ const TQPixmap& pix, bool showHidden = false,
KFileTreeViewItem *branchRoot = 0 );
/**
@@ -84,19 +84,19 @@ public:
/**
* @returns the name of the branch.
*/
- QString name() const { return( m_name ); }
+ TQString name() const { return( m_name ); }
/**
* sets the name of the branch.
*/
- virtual void setName( const QString n ) { m_name = n; };
+ virtual void setName( const TQString n ) { m_name = n; };
/*
* returns the current root item pixmap set in the constructor. The root
* item pixmap defaults to the icon for directories.
* @see openPixmap()
*/
- const QPixmap& pixmap(){ return(m_rootIcon); }
+ const TQPixmap& pixmap(){ return(m_rootIcon); }
/*
* returns the current root item pixmap set by setOpenPixmap()
@@ -106,7 +106,7 @@ public:
* Note that it depends on KFileTreeView::showFolderOpenPximap weather
* open pixmap are displayed or not.
*/
- const QPixmap& openPixmap() { return(m_openRootIcon); }
+ const TQPixmap& openPixmap() { return(m_openRootIcon); }
/**
* @returns whether the items in the branch show their file extensions in the
@@ -154,7 +154,7 @@ public slots:
*/
virtual void setShowExtensions( bool visible = true );
- void setOpenPixmap( const QPixmap& pix );
+ void setOpenPixmap( const TQPixmap& pix );
protected:
/**
@@ -201,13 +201,13 @@ private slots:
private:
KFileTreeViewItem *parentKFTVItem( KFileItem *item );
- static void deleteChildrenOf( QListViewItem *parent );
+ static void deleteChildrenOf( TQListViewItem *parent );
KFileTreeViewItem *m_root;
KURL m_startURL;
- QString m_name;
- QPixmap m_rootIcon;
- QPixmap m_openRootIcon;
+ TQString m_name;
+ TQPixmap m_rootIcon;
+ TQPixmap m_openRootIcon;
/* this list holds the url's which children are opened. */
KURL::List m_openChildrenURLs;
@@ -231,12 +231,12 @@ private:
/**
* List of KFileTreeBranches
*/
-typedef QPtrList<KFileTreeBranch> KFileTreeBranchList;
+typedef TQPtrList<KFileTreeBranch> KFileTreeBranchList;
/**
* Iterator for KFileTreeBranchLists
*/
-typedef QPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
+typedef TQPtrListIterator<KFileTreeBranch> KFileTreeBranchIterator;
#endif
diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp
index 542e80d5b..e8451077d 100644
--- a/kio/kfile/kfiletreeview.cpp
+++ b/kio/kfile/kfiletreeview.cpp
@@ -17,9 +17,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qheader.h>
-#include <qtimer.h>
+#include <tqapplication.h>
+#include <tqheader.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kdirnotify_stub.h>
#include <kglobalsettings.h>
@@ -39,7 +39,7 @@
#include "kfiletreebranch.h"
#include "kfiletreeviewitem.h"
-KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
+KFileTreeView::KFileTreeView( TQWidget *parent, const char *name )
: KListView( parent, name ),
m_wantOpenFolderPixmaps( true ),
m_toolTip( this )
@@ -47,33 +47,33 @@ KFileTreeView::KFileTreeView( QWidget *parent, const char *name )
setDragEnabled(true);
setSelectionModeExt( KListView::Single );
- m_animationTimer = new QTimer( this );
- connect( m_animationTimer, SIGNAL( timeout() ),
- this, SLOT( slotAnimation() ) );
+ m_animationTimer = new TQTimer( this );
+ connect( m_animationTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAnimation() ) );
m_currentBeforeDropItem = 0;
m_dropItem = 0;
- m_autoOpenTimer = new QTimer( this );
- connect( m_autoOpenTimer, SIGNAL( timeout() ),
- this, SLOT( slotAutoOpenFolder() ) );
+ m_autoOpenTimer = new TQTimer( this );
+ connect( m_autoOpenTimer, TQT_SIGNAL( timeout() ),
+ this, TQT_SLOT( slotAutoOpenFolder() ) );
/* The executed-Slot only opens a path, while the expanded-Slot populates it */
- connect( this, SIGNAL( executed( QListViewItem * ) ),
- this, SLOT( slotExecuted( QListViewItem * ) ) );
- connect( this, SIGNAL( expanded ( QListViewItem *) ),
- this, SLOT( slotExpanded( QListViewItem *) ));
- connect( this, SIGNAL( collapsed( QListViewItem *) ),
- this, SLOT( slotCollapsed( QListViewItem* )));
+ connect( this, TQT_SIGNAL( executed( TQListViewItem * ) ),
+ this, TQT_SLOT( slotExecuted( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded ( TQListViewItem *) ),
+ this, TQT_SLOT( slotExpanded( TQListViewItem *) ));
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem *) ),
+ this, TQT_SLOT( slotCollapsed( TQListViewItem* )));
/* connections from the konqtree widget */
- connect( this, SIGNAL( selectionChanged() ),
- this, SLOT( slotSelectionChanged() ) );
- connect( this, SIGNAL( onItem( QListViewItem * )),
- this, SLOT( slotOnItem( QListViewItem * ) ) );
- connect( this, SIGNAL(itemRenamed(QListViewItem*, const QString &, int)),
- this, SLOT(slotItemRenamed(QListViewItem*, const QString &, int)));
+ connect( this, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( slotSelectionChanged() ) );
+ connect( this, TQT_SIGNAL( onItem( TQListViewItem * )),
+ this, TQT_SLOT( slotOnItem( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL(itemRenamed(TQListViewItem*, const TQString &, int)),
+ this, TQT_SLOT(slotItemRenamed(TQListViewItem*, const TQString &, int)));
m_bDrag = false;
@@ -93,12 +93,12 @@ KFileTreeView::~KFileTreeView()
}
-bool KFileTreeView::isValidItem( QListViewItem *item)
+bool KFileTreeView::isValidItem( TQListViewItem *item)
{
if (!item)
return false;
- QPtrList<QListViewItem> lst;
- QListViewItemIterator it( this );
+ TQPtrList<TQListViewItem> lst;
+ TQListViewItemIterator it( this );
while ( it.current() )
{
if ( it.current() == item )
@@ -108,7 +108,7 @@ bool KFileTreeView::isValidItem( QListViewItem *item)
return false;
}
-void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
+void KFileTreeView::contentsDragEnterEvent( TQDragEnterEvent *ev )
{
if ( ! acceptDrag( ev ) )
{
@@ -118,7 +118,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
ev->acceptAction();
m_currentBeforeDropItem = selectedItem();
- QListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
+ TQListViewItem *item = itemAt( contentsToViewport( ev->pos() ) );
if( item )
{
m_dropItem = item;
@@ -130,7 +130,7 @@ void KFileTreeView::contentsDragEnterEvent( QDragEnterEvent *ev )
}
}
-void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
+void KFileTreeView::contentsDragMoveEvent( TQDragMoveEvent *e )
{
if( ! acceptDrag( e ) )
{
@@ -140,13 +140,13 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop( e->pos(), parent, afterme );
// "afterme" is 0 when aiming at a directory itself
- QListViewItem *item = afterme ? afterme : parent;
+ TQListViewItem *item = afterme ? afterme : parent;
if( item && item->isSelectable() )
{
@@ -164,7 +164,7 @@ void KFileTreeView::contentsDragMoveEvent( QDragMoveEvent *e )
}
}
-void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
+void KFileTreeView::contentsDragLeaveEvent( TQDragLeaveEvent * )
{
// Restore the current item to what it was before the dragging (#17070)
if ( isValidItem(m_currentBeforeDropItem) )
@@ -179,7 +179,7 @@ void KFileTreeView::contentsDragLeaveEvent( QDragLeaveEvent * )
}
-void KFileTreeView::contentsDropEvent( QDropEvent *e )
+void KFileTreeView::contentsDropEvent( TQDropEvent *e )
{
m_autoOpenTimer->stop();
@@ -192,12 +192,12 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
e->acceptAction();
- QListViewItem *afterme;
- QListViewItem *parent;
+ TQListViewItem *afterme;
+ TQListViewItem *parent;
findDrop(e->pos(), parent, afterme);
- //kdDebug(250) << " parent=" << (parent?parent->text(0):QString::null)
- // << " afterme=" << (afterme?afterme->text(0):QString::null) << endl;
+ //kdDebug(250) << " parent=" << (parent?parent->text(0):TQString::null)
+ // << " afterme=" << (afterme?afterme->text(0):TQString::null) << endl;
if (e->source() == viewport() && itemsMovable())
movableDropEvent(parent, afterme);
@@ -225,7 +225,7 @@ void KFileTreeView::contentsDropEvent( QDropEvent *e )
}
}
-bool KFileTreeView::acceptDrag(QDropEvent* e ) const
+bool KFileTreeView::acceptDrag(TQDropEvent* e ) const
{
bool ancestOK= acceptDrops();
@@ -242,25 +242,25 @@ bool KFileTreeView::acceptDrag(QDropEvent* e ) const
*/
return ancestOK && KURLDrag::canDecode( e ) &&
// Why this test? All DnDs are one of those AFAIK (DF)
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link );
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link );
}
-QDragObject * KFileTreeView::dragObject()
+TQDragObject * KFileTreeView::dragObject()
{
KURL::List urls;
- const QPtrList<QListViewItem> fileList = selectedItems();
- QPtrListIterator<QListViewItem> it( fileList );
+ const TQPtrList<TQListViewItem> fileList = selectedItems();
+ TQPtrListIterator<TQListViewItem> it( fileList );
for ( ; it.current(); ++it )
{
urls.append( static_cast<KFileTreeViewItem*>(it.current())->url() );
}
- QPoint hotspot;
- QPixmap pixmap;
+ TQPoint hotspot;
+ TQPixmap pixmap;
if( urls.count() > 1 ){
pixmap = DesktopIcon( "kmultiple", 16 );
}
@@ -268,7 +268,7 @@ QDragObject * KFileTreeView::dragObject()
pixmap = currentKFileTreeViewItem()->fileItem()->pixmap( 16 );
hotspot.setX( pixmap.width() / 2 );
hotspot.setY( pixmap.height() / 2 );
- QDragObject* dragObject = new KURLDrag( urls, this );
+ TQDragObject* dragObject = new KURLDrag( urls, this );
if( dragObject )
dragObject->setPixmap( pixmap, hotspot );
return dragObject;
@@ -276,7 +276,7 @@ QDragObject * KFileTreeView::dragObject()
-void KFileTreeView::slotCollapsed( QListViewItem *item )
+void KFileTreeView::slotCollapsed( TQListViewItem *item )
{
KFileTreeViewItem *kftvi = static_cast<KFileTreeViewItem*>(item);
kdDebug(250) << "hit slotCollapsed" << endl;
@@ -286,7 +286,7 @@ void KFileTreeView::slotCollapsed( QListViewItem *item )
}
}
-void KFileTreeView::slotExpanded( QListViewItem *item )
+void KFileTreeView::slotExpanded( TQListViewItem *item )
{
kdDebug(250) << "slotExpanded here !" << endl;
@@ -320,7 +320,7 @@ void KFileTreeView::slotExpanded( QListViewItem *item )
-void KFileTreeView::slotExecuted( QListViewItem *item )
+void KFileTreeView::slotExecuted( TQListViewItem *item )
{
if ( !item )
return;
@@ -354,16 +354,16 @@ void KFileTreeView::slotSelectionChanged()
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
bool showHidden )
{
- const QPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
+ const TQPixmap& folderPix = KMimeType::mimeType("inode/directory")->pixmap( KIcon::Desktop,KIcon::SizeSmall );
return addBranch( path, name, folderPix, showHidden);
}
-KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name,
- const QPixmap& pix, bool showHidden )
+KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const TQString& name,
+ const TQPixmap& pix, bool showHidden )
{
kdDebug(250) << "adding another root " << path.prettyURL() << endl;
@@ -375,26 +375,26 @@ KFileTreeBranch* KFileTreeView::addBranch( const KURL &path, const QString& name
KFileTreeBranch *KFileTreeView::addBranch(KFileTreeBranch *newBranch)
{
- connect( newBranch, SIGNAL(populateFinished( KFileTreeViewItem* )),
- this, SLOT( slotPopulateFinished( KFileTreeViewItem* )));
+ connect( newBranch, TQT_SIGNAL(populateFinished( KFileTreeViewItem* )),
+ this, TQT_SLOT( slotPopulateFinished( KFileTreeViewItem* )));
- connect( newBranch, SIGNAL( newTreeViewItems( KFileTreeBranch*,
+ connect( newBranch, TQT_SIGNAL( newTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )),
- this, SLOT( slotNewTreeViewItems( KFileTreeBranch*,
+ this, TQT_SLOT( slotNewTreeViewItems( KFileTreeBranch*,
const KFileTreeViewItemList& )));
m_branches.append( newBranch );
return( newBranch );
}
-KFileTreeBranch *KFileTreeView::branch( const QString& searchName )
+KFileTreeBranch *KFileTreeView::branch( const TQString& searchName )
{
KFileTreeBranch *branch = 0;
- QPtrListIterator<KFileTreeBranch> it( m_branches );
+ TQPtrListIterator<KFileTreeBranch> it( m_branches );
while ( (branch = it.current()) != 0 ) {
++it;
- QString bname = branch->name();
+ TQString bname = branch->name();
kdDebug(250) << "This is the branches name: " << bname << endl;
if( bname == searchName )
{
@@ -463,7 +463,7 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
if( m_nextUrlToSelect.equals(url, true )) // ignore trailing / on dirs
{
- setCurrentItem( static_cast<QListViewItem*>(*it) );
+ setCurrentItem( static_cast<TQListViewItem*>(*it) );
m_nextUrlToSelect = KURL();
end = true;
}
@@ -471,9 +471,9 @@ void KFileTreeView::slotNewTreeViewItems( KFileTreeBranch* branch, const KFileTr
}
}
-QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
+TQPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
{
- QPixmap pix;
+ TQPixmap pix;
kdDebug(250) << "Setting icon for column " << gap << endl;
if( item )
@@ -497,7 +497,7 @@ QPixmap KFileTreeView::itemIcon( KFileTreeViewItem *item, int gap ) const
* change the fileitem's pixmap to the open folder pixmap. */
if( item->isDir() && m_wantOpenFolderPixmaps )
{
- if( isOpen( static_cast<QListViewItem*>(item)))
+ if( isOpen( static_cast<TQListViewItem*>(item)))
pix = m_openFolderPixmap;
}
}
@@ -522,7 +522,7 @@ void KFileTreeView::slotAnimation()
}
uint & iconNumber = it.data().iconNumber;
- QString icon = QString::fromLatin1( it.data().iconBaseName ).append( QString::number( iconNumber ) );
+ TQString icon = TQString::fromLatin1( it.data().iconBaseName ).append( TQString::number( iconNumber ) );
// kdDebug(250) << "Loading icon " << icon << endl;
item->setPixmap( 0, DesktopIcon( icon,KIcon::SizeSmall,KIcon::ActiveState )); // KFileTreeViewFactory::instance() ) );
@@ -597,7 +597,7 @@ KURL KFileTreeView::currentURL() const
return KURL();
}
-void KFileTreeView::slotOnItem( QListViewItem *item )
+void KFileTreeView::slotOnItem( TQListViewItem *item )
{
KFileTreeViewItem *i = static_cast<KFileTreeViewItem *>( item );
if( i )
@@ -610,28 +610,28 @@ void KFileTreeView::slotOnItem( QListViewItem *item )
}
}
-void KFileTreeView::slotItemRenamed(QListViewItem* item, const QString &name, int col)
+void KFileTreeView::slotItemRenamed(TQListViewItem* item, const TQString &name, int col)
{
(void) item;
kdDebug(250) << "Do not bother: " << name << col << endl;
}
-KFileTreeViewItem *KFileTreeView::findItem( const QString& branchName, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( const TQString& branchName, const TQString& relUrl )
{
KFileTreeBranch *br = branch( branchName );
return( findItem( br, relUrl ));
}
-KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QString& relUrl )
+KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const TQString& relUrl )
{
KFileTreeViewItem *ret = 0;
if( brnch )
{
KURL url = brnch->rootUrl();
- if( ! relUrl.isEmpty() && QDir::isRelativePath(relUrl) )
+ if( ! relUrl.isEmpty() && TQDir::isRelativePath(relUrl) )
{
- QString partUrl( relUrl );
+ TQString partUrl( relUrl );
if( partUrl.endsWith("/"))
partUrl.truncate( relUrl.length()-1 );
@@ -659,12 +659,12 @@ KFileTreeViewItem *KFileTreeView::findItem( KFileTreeBranch* brnch, const QStrin
///////////////////////////////////////////////////////////////////
-void KFileTreeViewToolTip::maybeTip( const QPoint & )
+void KFileTreeViewToolTip::maybeTip( const TQPoint & )
{
#if 0
- QListViewItem *item = m_view->itemAt( point );
+ TQListViewItem *item = m_view->itemAt( point );
if ( item ) {
- QString text = static_cast<KFileViewItem*>( item )->toolTipText();
+ TQString text = static_cast<KFileViewItem*>( item )->toolTipText();
if ( !text.isEmpty() )
tip ( m_view->itemRect( item ), text );
}
diff --git a/kio/kfile/kfiletreeview.h b/kio/kfile/kfiletreeview.h
index 93af623a6..d534fb4fb 100644
--- a/kio/kfile/kfiletreeview.h
+++ b/kio/kfile/kfiletreeview.h
@@ -21,11 +21,11 @@
#ifndef kfile_tree_view_h
#define kfile_tree_view_h
-#include <qmap.h>
-#include <qpoint.h>
-#include <qpixmap.h>
-#include <qstrlist.h>
-#include <qtooltip.h>
+#include <tqmap.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
+#include <tqstrlist.h>
+#include <tqtooltip.h>
#include <klistview.h>
#include <kdirnotify.h>
@@ -40,13 +40,13 @@ class QTimer;
class KIO_EXPORT KFileTreeViewToolTip : public QToolTip
{
public:
- KFileTreeViewToolTip( QListView *view ) : QToolTip( view ), m_view( view ) {}
+ KFileTreeViewToolTip( TQListView *view ) : TQToolTip( view ), m_view( view ) {}
protected:
- virtual void maybeTip( const QPoint & );
+ virtual void maybeTip( const TQPoint & );
private:
- QListView *m_view;
+ TQListView *m_view;
};
@@ -67,7 +67,7 @@ class KIO_EXPORT KFileTreeView : public KListView
{
Q_OBJECT
public:
- KFileTreeView( QWidget *parent, const char *name = 0 );
+ KFileTreeView( TQWidget *parent, const char *name = 0 );
virtual ~KFileTreeView();
/**
@@ -93,13 +93,13 @@ public:
* @param name is the name of the branch, which will be the text for column 0
* @param showHidden says if hidden files and directories should be visible
*/
- KFileTreeBranch* addBranch( const KURL &path, const QString& name, bool showHidden = false );
+ KFileTreeBranch* addBranch( const KURL &path, const TQString& name, bool showHidden = false );
/**
* same as the function above but with a pixmap to set for the branch.
*/
- virtual KFileTreeBranch* addBranch( const KURL &path, const QString& name ,
- const QPixmap& pix, bool showHidden = false );
+ virtual KFileTreeBranch* addBranch( const KURL &path, const TQString& name ,
+ const TQPixmap& pix, bool showHidden = false );
/**
* same as the function above but letting the user create the branch.
@@ -117,7 +117,7 @@ public:
* @returns a pointer to the KFileTreeBranch in the KFileTreeView or zero on failure.
* @param searchName is the name of a branch
*/
- KFileTreeBranch *branch( const QString& searchName );
+ KFileTreeBranch *branch( const TQString& searchName );
/**
@@ -139,12 +139,12 @@ public:
* @param brnch is a pointer to the branch to search in
* @param relUrl is the branch relativ url
*/
- KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const QString& relUrl );
+ KFileTreeViewItem *findItem( KFileTreeBranch* brnch, const TQString& relUrl );
/**
* see method above, differs only in the first parameter. Finds the branch by its name.
*/
- KFileTreeViewItem *findItem( const QString& branchName, const QString& relUrl );
+ KFileTreeViewItem *findItem( const TQString& branchName, const TQString& relUrl );
/**
* @returns a flag indicating if extended folder pixmaps are displayed or not.
@@ -168,15 +168,15 @@ protected:
* @returns true if we can decode the drag and support the action
*/
- virtual bool acceptDrag(QDropEvent* event) const;
- virtual QDragObject * dragObject();
+ virtual bool acceptDrag(TQDropEvent* event) const;
+ virtual TQDragObject * dragObject();
virtual void startAnimation( KFileTreeViewItem* item, const char * iconBaseName = "kde", uint iconCount = 6 );
virtual void stopAnimation( KFileTreeViewItem* item );
- virtual void contentsDragEnterEvent( QDragEnterEvent *e );
- virtual void contentsDragMoveEvent( QDragMoveEvent *e );
- virtual void contentsDragLeaveEvent( QDragLeaveEvent *e );
- virtual void contentsDropEvent( QDropEvent *ev );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent *e );
+ virtual void contentsDragMoveEvent( TQDragMoveEvent *e );
+ virtual void contentsDragLeaveEvent( TQDragLeaveEvent *e );
+ virtual void contentsDropEvent( TQDropEvent *ev );
protected slots:
virtual void slotNewTreeViewItems( KFileTreeBranch*,
@@ -185,12 +185,12 @@ protected slots:
virtual void slotSetNextUrlToSelect( const KURL &url )
{ m_nextUrlToSelect = url; }
- virtual QPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
+ virtual TQPixmap itemIcon( KFileTreeViewItem*, int gap = 0 ) const;
private slots:
- void slotExecuted( QListViewItem * );
- void slotExpanded( QListViewItem * );
- void slotCollapsed( QListViewItem *item );
+ void slotExecuted( TQListViewItem * );
+ void slotExpanded( TQListViewItem * );
+ void slotCollapsed( TQListViewItem *item );
void slotSelectionChanged();
@@ -198,26 +198,26 @@ private slots:
void slotAutoOpenFolder();
- void slotOnItem( QListViewItem * );
- void slotItemRenamed(QListViewItem*, const QString &, int);
+ void slotOnItem( TQListViewItem * );
+ void slotItemRenamed(TQListViewItem*, const TQString &, int);
void slotPopulateFinished( KFileTreeViewItem* );
signals:
- void onItem( const QString& );
+ void onItem( const TQString& );
/* New signals if you like it ? */
- void dropped( QWidget*, QDropEvent* );
- void dropped( QWidget*, QDropEvent*, KURL::List& );
+ void dropped( TQWidget*, TQDropEvent* );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List& );
void dropped( KURL::List&, KURL& );
// The drop event allows to differentiate between move and copy
- void dropped( QWidget*, QDropEvent*, KURL::List&, KURL& );
+ void dropped( TQWidget*, TQDropEvent*, KURL::List&, KURL& );
- void dropped( QDropEvent *e, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *);
- void dropped(QDropEvent *e, QListViewItem * parent, QListViewItem * after);
- void dropped(KFileTreeView *, QDropEvent *, QListViewItem *, QListViewItem *);
+ void dropped( TQDropEvent *e, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *);
+ void dropped(TQDropEvent *e, TQListViewItem * parent, TQListViewItem * after);
+ void dropped(KFileTreeView *, TQDropEvent *, TQListViewItem *, TQListViewItem *);
protected:
KURL m_nextUrlToSelect;
@@ -225,7 +225,7 @@ protected:
private:
// Returns whether item is still a valid item in the tree
- bool isValidItem( QListViewItem *item);
+ bool isValidItem( TQListViewItem *item);
void clearTree();
@@ -235,30 +235,30 @@ private:
struct AnimationInfo
{
- AnimationInfo( const char * _iconBaseName, uint _iconCount, const QPixmap & _originalPixmap )
+ AnimationInfo( const char * _iconBaseName, uint _iconCount, const TQPixmap & _originalPixmap )
: iconBaseName(_iconBaseName), iconCount(_iconCount), iconNumber(1), originalPixmap(_originalPixmap) {}
AnimationInfo() : iconCount(0) {}
- QCString iconBaseName;
+ TQCString iconBaseName;
uint iconCount;
uint iconNumber;
- QPixmap originalPixmap;
+ TQPixmap originalPixmap;
};
- typedef QMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
+ typedef TQMap<KFileTreeViewItem *, AnimationInfo> MapCurrentOpeningFolders;
MapCurrentOpeningFolders m_mapCurrentOpeningFolders;
- QTimer *m_animationTimer;
+ TQTimer *m_animationTimer;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
bool m_bDrag;
bool m_wantOpenFolderPixmaps; // Flag weather the folder should have open-folder pixmaps
- QListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
- QListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
- QStrList m_lstDropFormats;
- QPixmap m_openFolderPixmap;
- QTimer *m_autoOpenTimer;
+ TQListViewItem *m_currentBeforeDropItem; // The item that was current before the drag-enter event happened
+ TQListViewItem *m_dropItem; // The item we are moving the mouse over (during a drag)
+ TQStrList m_lstDropFormats;
+ TQPixmap m_openFolderPixmap;
+ TQTimer *m_autoOpenTimer;
KFileTreeViewToolTip m_toolTip;
diff --git a/kio/kfile/kfiletreeviewitem.cpp b/kio/kfile/kfiletreeviewitem.cpp
index 96c100521..17e2d9abe 100644
--- a/kio/kfile/kfiletreeviewitem.cpp
+++ b/kio/kfile/kfiletreeviewitem.cpp
@@ -42,7 +42,7 @@ KFileTreeViewItem::KFileTreeViewItem( KFileTreeViewItem *parent,
KFileTreeViewItem::KFileTreeViewItem( KFileTreeView* parent,
KFileItem* item,
KFileTreeBranch *brnch )
- :KListViewItem( (QListView*)parent ),
+ :KListViewItem( (TQListView*)parent ),
m_kfileitem(item ),
m_branch( brnch ),
m_wasListed(false)
@@ -72,9 +72,9 @@ KURL KFileTreeViewItem::url() const
return m_kfileitem ? m_kfileitem->url() : KURL();
}
-QString KFileTreeViewItem::path() const
+TQString KFileTreeViewItem::path() const
{
- return m_kfileitem ? m_kfileitem->url().path() : QString::null;
+ return m_kfileitem ? m_kfileitem->url().path() : TQString::null;
}
bool KFileTreeViewItem::isDir() const
diff --git a/kio/kfile/kfiletreeviewitem.h b/kio/kfile/kfiletreeviewitem.h
index 69e4a2d90..fe338df3b 100644
--- a/kio/kfile/kfiletreeviewitem.h
+++ b/kio/kfile/kfiletreeviewitem.h
@@ -20,7 +20,7 @@
#ifndef kfile_tree_view_item_h
#define kfile_tree_view_item_h
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kfileitem.h>
@@ -57,7 +57,7 @@ public:
/**
* @return the path of the item.
*/
- QString path() const;
+ TQString path() const;
/**
* @return the items KURL
@@ -94,12 +94,12 @@ private:
/**
* List of KFileTreeViewItems
*/
-typedef QPtrList<KFileTreeViewItem> KFileTreeViewItemList;
+typedef TQPtrList<KFileTreeViewItem> KFileTreeViewItemList;
/**
* Iterator for KFileTreeViewItemList
*/
-typedef QPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
+typedef TQPtrListIterator<KFileTreeViewItem> KFileTreeViewItemListIterator;
#endif
diff --git a/kio/kfile/kfileview.cpp b/kio/kfile/kfileview.cpp
index 976d3b815..165801652 100644
--- a/kio/kfile/kfileview.cpp
+++ b/kio/kfile/kfileview.cpp
@@ -36,7 +36,7 @@
#undef Unsorted
#endif
-QDir::SortSpec KFileView::defaultSortSpec = static_cast<QDir::SortSpec>(QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
+TQDir::SortSpec KFileView::defaultSortSpec = static_cast<TQDir::SortSpec>(TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst);
class KFileView::KFileViewPrivate
{
@@ -55,7 +55,7 @@ public:
}
}
- QGuardedPtr<KActionCollection> actions;
+ TQGuardedPtr<KActionCollection> actions;
int dropOptions;
};
@@ -90,20 +90,20 @@ KFileView::~KFileView()
void KFileView::setParentView(KFileView *parent)
{
if ( parent ) { // pass all signals right to our parent
- QObject::connect(sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& ) ),
- parent->sig, SIGNAL( activatedMenu(const KFileItem *,
- const QPoint& )));
- QObject::connect(sig, SIGNAL( dirActivated(const KFileItem *)),
- parent->sig, SIGNAL( dirActivated(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileSelected(const KFileItem *)),
- parent->sig, SIGNAL( fileSelected(const KFileItem*)));
- QObject::connect(sig, SIGNAL( fileHighlighted(const KFileItem *) ),
- parent->sig,SIGNAL(fileHighlighted(const KFileItem*)));
- QObject::connect(sig, SIGNAL( sortingChanged( QDir::SortSpec ) ),
- parent->sig, SIGNAL(sortingChanged( QDir::SortSpec)));
- QObject::connect(sig, SIGNAL( dropped(const KFileItem *, QDropEvent*, const KURL::List&) ),
- parent->sig, SIGNAL(dropped(const KFileItem *, QDropEvent*, const KURL::List&)));
+ TQObject::connect(sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& ) ),
+ parent->sig, TQT_SIGNAL( activatedMenu(const KFileItem *,
+ const TQPoint& )));
+ TQObject::connect(sig, TQT_SIGNAL( dirActivated(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( dirActivated(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileSelected(const KFileItem *)),
+ parent->sig, TQT_SIGNAL( fileSelected(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( fileHighlighted(const KFileItem *) ),
+ parent->sig,TQT_SIGNAL(fileHighlighted(const KFileItem*)));
+ TQObject::connect(sig, TQT_SIGNAL( sortingChanged( TQDir::SortSpec ) ),
+ parent->sig, TQT_SIGNAL(sortingChanged( TQDir::SortSpec)));
+ TQObject::connect(sig, TQT_SIGNAL( dropped(const KFileItem *, TQDropEvent*, const KURL::List&) ),
+ parent->sig, TQT_SIGNAL(dropped(const KFileItem *, TQDropEvent*, const KURL::List&)));
}
}
@@ -148,7 +148,7 @@ void KFileView::insertItem( KFileItem * )
{
}
-void KFileView::setSorting(QDir::SortSpec new_sort)
+void KFileView::setSorting(TQDir::SortSpec new_sort)
{
m_sorting = new_sort;
}
@@ -165,16 +165,16 @@ void KFileView::sortReversed()
{
int spec = sorting();
- setSorting( static_cast<QDir::SortSpec>( spec ^ QDir::Reversed ) );
+ setSorting( static_cast<TQDir::SortSpec>( spec ^ TQDir::Reversed ) );
}
#if 0
int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
{
- static const QString &dirup = KGlobal::staticQString("..");
+ static const TQString &dirup = KGlobal::staticQString("..");
bool bigger = true;
bool keepFirst = false;
- bool dirsFirst = ((m_sorting & QDir::DirsFirst) == QDir::DirsFirst);
+ bool dirsFirst = ((m_sorting & TQDir::DirsFirst) == TQDir::DirsFirst);
if (fi1 == fi2)
return 0;
@@ -196,21 +196,21 @@ int KFileView::compareItems(const KFileItem *fi1, const KFileItem *fi2) const
}
else {
- QDir::SortSpec sort = static_cast<QDir::SortSpec>(m_sorting & QDir::SortByMask);
+ TQDir::SortSpec sort = static_cast<TQDir::SortSpec>(m_sorting & TQDir::SortByMask);
//if (fi1->isDir() || fi2->isDir())
- // sort = static_cast<QDir::SortSpec>(KFileView::defaultSortSpec & QDir::SortByMask);
+ // sort = static_cast<TQDir::SortSpec>(KFileView::defaultSortSpec & TQDir::SortByMask);
switch (sort) {
- case QDir::Name:
+ case TQDir::Name:
default:
sort_by_name:
- if ( (m_sorting & QDir::IgnoreCase) == QDir::IgnoreCase )
+ if ( (m_sorting & TQDir::IgnoreCase) == TQDir::IgnoreCase )
bigger = (fi1->name( true ) > fi2->name( true ));
else
bigger = (fi1->name() > fi2->name());
break;
- case QDir::Time:
+ case TQDir::Time:
{
time_t t1 = fi1->time( KIO::UDS_MODIFICATION_TIME );
time_t t2 = fi2->time( KIO::UDS_MODIFICATION_TIME );
@@ -226,7 +226,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Size:
+ case TQDir::Size:
{
KIO::filesize_t s1 = fi1->size();
KIO::filesize_t s2 = fi2->size();
@@ -242,7 +242,7 @@ sort_by_name:
goto sort_by_name;
}
}
- case QDir::Unsorted:
+ case TQDir::Unsorted:
bigger = true; // nothing
break;
}
@@ -265,7 +265,7 @@ void KFileView::updateView(const KFileItem *)
{
}
-void KFileView::setCurrentItem(const QString &filename )
+void KFileView::setCurrentItem(const TQString &filename )
{
if (!filename.isNull()) {
KFileItem *item;
@@ -369,27 +369,27 @@ KActionCollection * KFileView::actionCollection() const
return d->actions;
}
-void KFileView::readConfig( KConfig *, const QString& )
+void KFileView::readConfig( KConfig *, const TQString& )
{
}
-void KFileView::writeConfig( KConfig *, const QString& )
+void KFileView::writeConfig( KConfig *, const TQString& )
{
}
-QString KFileView::sortingKey( const QString& value, bool isDir, int sortSpec )
+TQString KFileView::sortingKey( const TQString& value, bool isDir, int sortSpec )
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
- QString result = (sortSpec & QDir::IgnoreCase) ? value.lower() : value;
+ TQString result = (sortSpec & TQDir::IgnoreCase) ? value.lower() : value;
return result.prepend( start );
}
-QString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
+TQString KFileView::sortingKey( KIO::filesize_t value, bool isDir, int sortSpec)
{
- bool reverse = sortSpec & QDir::Reversed;
- bool dirsFirst = sortSpec & QDir::DirsFirst;
+ bool reverse = sortSpec & TQDir::Reversed;
+ bool dirsFirst = sortSpec & TQDir::DirsFirst;
char start = (isDir && dirsFirst) ? (reverse ? '2' : '0') : '1';
return KIO::number( value ).rightJustify( 24, '0' ).prepend( start );
}
@@ -411,7 +411,7 @@ int KFileView::dropOptions()
int KFileView::autoOpenDelay()
{
- return (QApplication::startDragTime() * 3) / 2;
+ return (TQApplication::startDragTime() * 3) / 2;
}
void KFileView::virtual_hook( int id, void* data)
diff --git a/kio/kfile/kfileview.h b/kio/kfile/kfileview.h
index 0b2002e3b..a42927f1b 100644
--- a/kio/kfile/kfileview.h
+++ b/kio/kfile/kfileview.h
@@ -25,7 +25,7 @@
class QPoint;
class KActionCollection;
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kfileitem.h"
#include "kfile.h"
@@ -55,22 +55,22 @@ public:
*/
void highlightFile(const KFileItem *i) { emit fileHighlighted(i); }
- void activateMenu( const KFileItem *i, const QPoint& pos ) {
+ void activateMenu( const KFileItem *i, const TQPoint& pos ) {
emit activatedMenu( i, pos );
}
- void changeSorting( QDir::SortSpec sorting ) {
+ void changeSorting( TQDir::SortSpec sorting ) {
emit sortingChanged( sorting );
}
- void dropURLs(const KFileItem *i, QDropEvent*e, const KURL::List&urls) {
+ void dropURLs(const KFileItem *i, TQDropEvent*e, const KURL::List&urls) {
emit dropped(i, e, urls);
}
signals:
void dirActivated(const KFileItem*);
- void sortingChanged( QDir::SortSpec );
+ void sortingChanged( TQDir::SortSpec );
/**
* the item maybe be 0L, indicating that we're in multiselection mode and
@@ -78,8 +78,8 @@ signals:
*/
void fileHighlighted(const KFileItem*);
void fileSelected(const KFileItem*);
- void activatedMenu( const KFileItem *i, const QPoint& );
- void dropped(const KFileItem *, QDropEvent*, const KURL::List&);
+ void activatedMenu( const KFileItem *i, const TQPoint& );
+ void dropped(const KFileItem *, TQDropEvent*, const KURL::List&);
};
/**
@@ -111,21 +111,21 @@ public:
void addItemList(const KFileItemList &list);
/**
- * a pure virtual function to get a QWidget, that can be added to
+ * a pure virtual function to get a TQWidget, that can be added to
* other widgets. This function is needed to make it possible for
* derived classes to derive from other widgets.
**/
- virtual QWidget *widget() = 0;
+ virtual TQWidget *widget() = 0;
/**
* ### As const-method, to be fixed in 3.0
*/
- QWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
+ TQWidget *widget() const { return const_cast<KFileView*>(this)->widget(); }
/**
* Sets @p filename the current item in the view, if available.
*/
- void setCurrentItem( const QString &filename );
+ void setCurrentItem( const TQString &filename );
/**
* Reimplement this to set @p item the current item in the view, e.g.
@@ -174,29 +174,29 @@ public:
* Returns the sorting order of the internal list. Newly added files
* are added through this sorting.
*/
- QDir::SortSpec sorting() const { return m_sorting; }
+ TQDir::SortSpec sorting() const { return m_sorting; }
/**
* Sets the sorting order of the view.
*
- * Default is QDir::Name | QDir::IgnoreCase | QDir::DirsFirst
+ * Default is TQDir::Name | TQDir::IgnoreCase | TQDir::DirsFirst
* Override this in your subclass and sort accordingly (usually by
* setting the sorting-key for every item and telling QIconView
- * or QListView to sort.
+ * or TQListView to sort.
*
- * A view may choose to use a different sorting than QDir::Name, Time
+ * A view may choose to use a different sorting than TQDir::Name, Time
* or Size. E.g. to sort by mimetype or any possible string. Set the
- * sorting to QDir::Unsorted for that and do the rest internally.
+ * sorting to TQDir::Unsorted for that and do the rest internally.
*
* @see sortingKey
*/
- virtual void setSorting(QDir::SortSpec sort);
+ virtual void setSorting(TQDir::SortSpec sort);
/**
* Tells whether the current items are in reversed order (shortcut to
- * sorting() & QDir::Reversed).
+ * sorting() & TQDir::Reversed).
*/
- bool isReversed() const { return (m_sorting & QDir::Reversed); }
+ bool isReversed() const { return (m_sorting & TQDir::Reversed); }
void sortReversed();
@@ -231,13 +231,13 @@ public:
* somewhere, e.g. in a menu, where the user can choose between views.
* @see setViewName
*/
- QString viewName() const { return m_viewName; }
+ TQString viewName() const { return m_viewName; }
/**
* Sets the name of the view, which could be displayed somewhere.
* E.g. "Image Preview".
*/
- void setViewName( const QString& name ) { m_viewName = name; }
+ void setViewName( const TQString& name ) { m_viewName = name; }
virtual void setParentView(KFileView *parent);
@@ -346,8 +346,8 @@ public:
KFileViewSignaler * signaler() const { return sig; }
- virtual void readConfig( KConfig *, const QString& group = QString::null );
- virtual void writeConfig( KConfig *, const QString& group = QString::null);
+ virtual void readConfig( KConfig *, const TQString& group = TQString::null );
+ virtual void writeConfig( KConfig *, const TQString& group = TQString::null);
/**
* Various options for drag and drop support.
@@ -375,27 +375,27 @@ public:
int dropOptions();
/**
- * This method calculates a QString from the given parameters, that is
- * suitable for sorting with e.g. QIconView or QListView. Their
- * Item-classes usually have a setKey( const QString& ) method or a virtual
- * method QString key() that is used for sorting.
+ * This method calculates a TQString from the given parameters, that is
+ * suitable for sorting with e.g. TQIconView or TQListView. Their
+ * Item-classes usually have a setKey( const TQString& ) method or a virtual
+ * method TQString key() that is used for sorting.
*
* @param value Any string that should be used as sort criterion
* @param isDir Tells whether the key is computed for an item representing
* a directory (directories are usually sorted before files)
- * @param sortSpec An ORed combination of QDir::SortSpec flags.
+ * @param sortSpec An ORed combination of TQDir::SortSpec flags.
* Currently, the values IgnoreCase, Reversed and
* DirsFirst are taken into account.
*/
- static QString sortingKey( const QString& value, bool isDir, int sortSpec);
+ static TQString sortingKey( const TQString& value, bool isDir, int sortSpec);
/**
- * An overloaded method that takes not a QString, but a number as sort
+ * An overloaded method that takes not a TQString, but a number as sort
* criterion. You can use this for file-sizes or dates/times for example.
* If you use a time_t, you need to cast that to KIO::filesize_t because
* of ambiguity problems.
*/
- static QString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
+ static TQString sortingKey( KIO::filesize_t value, bool isDir,int sortSpec);
/**
* @internal
@@ -411,9 +411,9 @@ protected:
KFileViewSignaler *sig;
private:
- static QDir::SortSpec defaultSortSpec;
- QDir::SortSpec m_sorting;
- QString m_viewName;
+ static TQDir::SortSpec defaultSortSpec;
+ TQDir::SortSpec m_sorting;
+ TQString m_viewName;
/**
* counters
diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp
index 21a6ff6cd..164abd35a 100644
--- a/kio/kfile/kicondialog.cpp
+++ b/kio/kfile/kicondialog.cpp
@@ -29,20 +29,20 @@
#include <kfiledialog.h>
#include <kimagefilepreview.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qsortedlist.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qtimer.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qfileinfo.h>
-#include <qtoolbutton.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqsortedlist.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqtimer.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqfileinfo.h>
+#include <tqtoolbutton.h>
+#include <tqwhatsthis.h>
#ifdef HAVE_LIBART
#include <svgicons/ksvgiconengine.h>
@@ -63,17 +63,17 @@ class KIconCanvas::KIconCanvasPrivate
class IconPath : public QString
{
protected:
- QString m_iconName;
+ TQString m_iconName;
public:
- IconPath(const QString &ip) : QString (ip)
+ IconPath(const TQString &ip) : TQString (ip)
{
int n = findRev('/');
- m_iconName = (n==-1) ? static_cast<QString>(*this) : mid(n+1);
+ m_iconName = (n==-1) ? static_cast<TQString>(*this) : mid(n+1);
}
- IconPath() : QString ()
+ IconPath() : TQString ()
{ }
bool operator== (const IconPath &ip) const
@@ -88,14 +88,14 @@ public:
* KIconCanvas: Iconview for the iconloader dialog.
*/
-KIconCanvas::KIconCanvas(QWidget *parent, const char *name)
+KIconCanvas::KIconCanvas(TQWidget *parent, const char *name)
: KIconView(parent, name)
{
d = new KIconCanvasPrivate;
- mpTimer = new QTimer(this);
- connect(mpTimer, SIGNAL(timeout()), SLOT(slotLoadFiles()));
- connect(this, SIGNAL(currentChanged(QIconViewItem *)),
- SLOT(slotCurrentChanged(QIconViewItem *)));
+ mpTimer = new TQTimer(this);
+ connect(mpTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotLoadFiles()));
+ connect(this, TQT_SIGNAL(currentChanged(TQIconViewItem *)),
+ TQT_SLOT(slotCurrentChanged(TQIconViewItem *)));
setGridX(80);
setWordWrapIconText(false);
setShowToolTips(true);
@@ -107,7 +107,7 @@ KIconCanvas::~KIconCanvas()
delete d;
}
-void KIconCanvas::loadFiles(const QStringList& files)
+void KIconCanvas::loadFiles(const TQStringList& files)
{
clear();
mFiles = files;
@@ -119,7 +119,7 @@ void KIconCanvas::loadFiles(const QStringList& files)
void KIconCanvas::slotLoadFiles()
{
setResizeMode(Fixed);
- QApplication::setOverrideCursor(waitCursor);
+ TQApplication::setOverrideCursor(waitCursor);
// disable updates to not trigger paint events when adding child items
setUpdatesEnabled( false );
@@ -130,9 +130,9 @@ void KIconCanvas::slotLoadFiles()
d->m_bLoading = true;
int i;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
uint emitProgress = 10; // so we will emit it once in the beginning
- QStringList::ConstIterator end(mFiles.end());
+ TQStringList::ConstIterator end(mFiles.end());
for (it=mFiles.begin(), i=0; it!=end; ++it, i++)
{
// Calling kapp->processEvents() makes the iconview flicker like hell
@@ -149,11 +149,11 @@ void KIconCanvas::slotLoadFiles()
// kapp->processEvents();
if ( !d->m_bLoading ) // user clicked on a button that will load another set of icons
break;
- QImage img;
+ TQImage img;
// Use the extension as the format. Works for XPM and PNG, but not for SVG
- QString path= *it;
- QString ext = path.right(3).upper();
+ TQString path= *it;
+ TQString ext = path.right(3).upper();
if (ext != "SVG" && ext != "VGZ")
img.load(*it);
@@ -177,10 +177,10 @@ void KIconCanvas::slotLoadFiles()
img = img.smoothScale(width, 60);
}
}
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage(img);
- QFileInfo fi(*it);
- QIconViewItem *item = new QIconViewItem(this, fi.baseName(), pm);
+ TQFileInfo fi(*it);
+ TQIconViewItem *item = new TQIconViewItem(this, fi.baseName(), pm);
item->setKey(*it);
item->setDragEnabled(false);
item->setDropEnabled(false);
@@ -193,16 +193,16 @@ void KIconCanvas::slotLoadFiles()
// enable updates since we have to draw the whole view now
setUpdatesEnabled( true );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
d->m_bLoading = false;
emit finished();
setResizeMode(Adjust);
}
-QString KIconCanvas::getCurrent() const
+TQString KIconCanvas::getCurrent() const
{
if (!currentItem())
- return QString::null;
+ return TQString::null;
return currentItem()->key();
}
@@ -211,9 +211,9 @@ void KIconCanvas::stopLoading()
d->m_bLoading = false;
}
-void KIconCanvas::slotCurrentChanged(QIconViewItem *item)
+void KIconCanvas::slotCurrentChanged(TQIconViewItem *item)
{
- emit nameChanged((item != 0L) ? item->text() : QString::null);
+ emit nameChanged((item != 0L) ? item->text() : TQString::null);
}
class KIconDialog::KIconDialogPrivate
@@ -227,8 +227,8 @@ class KIconDialog::KIconDialogPrivate
}
~KIconDialogPrivate() {}
bool m_bStrictIconSize, m_bLockUser, m_bLockCustomDir;
- QString custom;
- QString customLocation;
+ TQString custom;
+ TQString customLocation;
KIconViewSearchLine *searchLine;
};
@@ -237,7 +237,7 @@ class KIconDialog::KIconDialogPrivate
* specified icons can be chosen.
*/
-KIconDialog::KIconDialog(QWidget *parent, const char *name)
+KIconDialog::KIconDialog(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
d = new KIconDialogPrivate;
@@ -245,7 +245,7 @@ KIconDialog::KIconDialog(QWidget *parent, const char *name)
init();
}
-KIconDialog::KIconDialog(KIconLoader *loader, QWidget *parent,
+KIconDialog::KIconDialog(KIconLoader *loader, TQWidget *parent,
const char *name)
: KDialogBase(parent, name, true, i18n("Select Icon"), Ok|Cancel, Ok)
{
@@ -259,42 +259,42 @@ void KIconDialog::init()
mGroupOrSize = KIcon::Desktop;
mContext = KIcon::Any;
mType = 0;
- mFileList = KGlobal::dirs()->findAllResources("appicon", QString::fromLatin1("*.png"));
+ mFileList = KGlobal::dirs()->findAllResources("appicon", TQString::fromLatin1("*.png"));
- QWidget *main = new QWidget( this );
+ TQWidget *main = new TQWidget( this );
setMainWidget(main);
- QVBoxLayout *top = new QVBoxLayout(main);
+ TQVBoxLayout *top = new TQVBoxLayout(main);
top->setSpacing( spacingHint() );
- QButtonGroup *bgroup = new QButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
+ TQButtonGroup *bgroup = new TQButtonGroup(0, Qt::Vertical, i18n("Icon Source"), main);
bgroup->layout()->setSpacing(KDialog::spacingHint());
bgroup->layout()->setMargin(KDialog::marginHint());
top->addWidget(bgroup);
- connect(bgroup, SIGNAL(clicked(int)), SLOT(slotButtonClicked(int)));
- QGridLayout *grid = new QGridLayout(bgroup->layout(), 3, 2);
- mpRb1 = new QRadioButton(i18n("S&ystem icons:"), bgroup);
+ connect(bgroup, TQT_SIGNAL(clicked(int)), TQT_SLOT(slotButtonClicked(int)));
+ TQGridLayout *grid = new TQGridLayout(bgroup->layout(), 3, 2);
+ mpRb1 = new TQRadioButton(i18n("S&ystem icons:"), bgroup);
grid->addWidget(mpRb1, 1, 0);
- mpCombo = new QComboBox(bgroup);
- connect(mpCombo, SIGNAL(activated(int)), SLOT(slotContext(int)));
+ mpCombo = new TQComboBox(bgroup);
+ connect(mpCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotContext(int)));
grid->addWidget(mpCombo, 1, 1);
- mpRb2 = new QRadioButton(i18n("O&ther icons:"), bgroup);
+ mpRb2 = new TQRadioButton(i18n("O&ther icons:"), bgroup);
grid->addWidget(mpRb2, 2, 0);
- mpBrowseBut = new QPushButton(i18n("&Browse..."), bgroup);
+ mpBrowseBut = new TQPushButton(i18n("&Browse..."), bgroup);
grid->addWidget(mpBrowseBut, 2, 1);
//
// ADD SEARCHLINE
//
- QHBoxLayout *searchLayout = new QHBoxLayout(0, 0, KDialog::spacingHint());
+ TQHBoxLayout *searchLayout = new TQHBoxLayout(0, 0, KDialog::spacingHint());
top->addLayout(searchLayout);
- QToolButton *clearSearch = new QToolButton(main);
+ TQToolButton *clearSearch = new TQToolButton(main);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" :"locationbar_erase"));
searchLayout->addWidget(clearSearch);
- QLabel *searchLabel = new QLabel(i18n("&Search:"), main);
+ TQLabel *searchLabel = new TQLabel(i18n("&Search:"), main);
searchLayout->addWidget(searchLabel);
d->searchLine = new KIconViewSearchLine(main, "searchLine");
@@ -303,28 +303,28 @@ void KIconDialog::init()
// signals and slots connections
- connect(clearSearch, SIGNAL(clicked()), d->searchLine, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(clicked()), d->searchLine, TQT_SLOT(clear()));
- QString wtstr = i18n("Search interactively for icon names (e.g. folder).");
- QWhatsThis::add(searchLabel, wtstr);
- QWhatsThis::add(d->searchLine, wtstr);
+ TQString wtstr = i18n("Search interactively for icon names (e.g. folder).");
+ TQWhatsThis::add(searchLabel, wtstr);
+ TQWhatsThis::add(d->searchLine, wtstr);
mpCanvas = new KIconCanvas(main);
- connect(mpCanvas, SIGNAL(executed(QIconViewItem *)), SLOT(slotAcceptIcons()));
- connect(mpCanvas, SIGNAL(returnPressed(QIconViewItem *)), SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(executed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
+ connect(mpCanvas, TQT_SIGNAL(returnPressed(TQIconViewItem *)), TQT_SLOT(slotAcceptIcons()));
mpCanvas->setMinimumSize(400, 125);
top->addWidget(mpCanvas);
d->searchLine->setIconView(mpCanvas);
mpProgress = new KProgress(main);
top->addWidget(mpProgress);
- connect(mpCanvas, SIGNAL(startLoading(int)), SLOT(slotStartLoading(int)));
- connect(mpCanvas, SIGNAL(progress(int)), SLOT(slotProgress(int)));
- connect(mpCanvas, SIGNAL(finished()), SLOT(slotFinished()));
+ connect(mpCanvas, TQT_SIGNAL(startLoading(int)), TQT_SLOT(slotStartLoading(int)));
+ connect(mpCanvas, TQT_SIGNAL(progress(int)), TQT_SLOT(slotProgress(int)));
+ connect(mpCanvas, TQT_SIGNAL(finished()), TQT_SLOT(slotFinished()));
// When pressing Ok or Cancel, stop loading icons
- connect(this, SIGNAL(hidden()), mpCanvas, SLOT(stopLoading()));
+ connect(this, TQT_SIGNAL(hidden()), mpCanvas, TQT_SLOT(stopLoading()));
static const char* const context_text[] = {
I18N_NOOP( "Actions" ),
@@ -372,7 +372,7 @@ void KIconDialog::init()
mpBrowseBut->setFixedWidth(mpCombo->width());
// Make the dialog a little taller
- incInitialSize(QSize(0,100));
+ incInitialSize(TQSize(0,100));
}
@@ -383,14 +383,14 @@ KIconDialog::~KIconDialog()
void KIconDialog::slotAcceptIcons()
{
- d->custom=QString::null;
+ d->custom=TQString::null;
slotOk();
}
void KIconDialog::showIcons()
{
mpCanvas->clear();
- QStringList filelist;
+ TQStringList filelist;
if (mType == 0)
if (d->m_bStrictIconSize)
filelist=mpLoader->queryIcons(mGroupOrSize, mContext);
@@ -401,9 +401,9 @@ void KIconDialog::showIcons()
else
filelist=mFileList;
- QSortedList <IconPath>iconlist;
+ TQSortedList <IconPath>iconlist;
iconlist.setAutoDelete(true);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for( it = filelist.begin(); it != filelist.end(); ++it )
iconlist.append(new IconPath(*it));
@@ -443,7 +443,7 @@ int KIconDialog::iconSize() const
}
#ifndef KDE_NO_COMPAT
-QString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
+TQString KIconDialog::selectIcon(KIcon::Group group, KIcon::Context context, bool user)
{
setup( group, context, false, 0, user );
return openDialog();
@@ -494,12 +494,12 @@ void KIconDialog::setContext( KIcon::Context context )
}
}
-void KIconDialog::setCustomLocation( const QString& location )
+void KIconDialog::setCustomLocation( const TQString& location )
{
d->customLocation = location;
}
-QString KIconDialog::openDialog()
+TQString KIconDialog::openDialog()
{
showIcons();
@@ -507,13 +507,13 @@ QString KIconDialog::openDialog()
{
if (!d->custom.isNull())
return d->custom;
- QString name = mpCanvas->getCurrent();
+ TQString name = mpCanvas->getCurrent();
if (name.isEmpty() || (mType == 1))
return name;
- QFileInfo fi(name);
+ TQFileInfo fi(name);
return fi.baseName();
}
- return QString::null;
+ return TQString::null;
}
void KIconDialog::showDialog()
@@ -525,7 +525,7 @@ void KIconDialog::showDialog()
void KIconDialog::slotOk()
{
- QString name;
+ TQString name;
if (!d->custom.isNull())
{
name = d->custom;
@@ -535,7 +535,7 @@ void KIconDialog::slotOk()
name = mpCanvas->getCurrent();
if (!name.isEmpty() && (mType != 1))
{
- QFileInfo fi(name);
+ TQFileInfo fi(name);
name = fi.baseName();
}
}
@@ -544,9 +544,9 @@ void KIconDialog::slotOk()
KDialogBase::slotOk();
}
-QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
+TQString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
bool strictIconSize, int iconSize, bool user,
- QWidget *parent, const QString &caption)
+ TQWidget *parent, const TQString &caption)
{
KIconDialog dlg(parent, "icon dialog");
dlg.setup( group, context, strictIconSize, iconSize, user );
@@ -558,7 +558,7 @@ QString KIconDialog::getIcon(KIcon::Group group, KIcon::Context context,
void KIconDialog::slotButtonClicked(int id)
{
- QString file;
+ TQString file;
switch (id)
{
@@ -586,7 +586,7 @@ void KIconDialog::slotButtonClicked(int id)
// Create a file dialog to select a PNG, XPM or SVG file,
// with the image previewer shown.
// KFileDialog::getImageOpenURL doesn't allow svg.
- KFileDialog dlg(QString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
+ KFileDialog dlg(TQString::null, i18n("*.png *.xpm *.svg *.svgz|Icon Files (*.png *.xpm *.svg *.svgz)"),
this, "filedialog", true);
dlg.setOperationMode( KFileDialog::Opening );
dlg.setCaption( i18n("Open") );
@@ -601,7 +601,7 @@ void KIconDialog::slotButtonClicked(int id)
{
d->custom = file;
if ( mType == 1 )
- d->customLocation = QFileInfo( file ).dirPath( true );
+ d->customLocation = TQFileInfo( file ).dirPath( true );
slotOk();
}
}
@@ -657,15 +657,15 @@ class KIconButton::KIconButtonPrivate
* KIconButton: A "choose icon" pushbutton.
*/
-KIconButton::KIconButton(QWidget *parent, const char *name)
- : QPushButton(parent, name)
+KIconButton::KIconButton(TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( KGlobal::iconLoader() );
}
KIconButton::KIconButton(KIconLoader *loader,
- QWidget *parent, const char *name)
- : QPushButton(parent, name)
+ TQWidget *parent, const char *name)
+ : TQPushButton(parent, name)
{
init( loader );
}
@@ -679,7 +679,7 @@ void KIconButton::init( KIconLoader *loader )
mpLoader = loader;
mpDialog = 0L;
- connect(this, SIGNAL(clicked()), SLOT(slotChangeIcon()));
+ connect(this, TQT_SIGNAL(clicked()), TQT_SLOT(slotChangeIcon()));
}
KIconButton::~KIconButton()
@@ -715,7 +715,7 @@ void KIconButton::setIconType(KIcon::Group group, KIcon::Context context, bool u
mbUser = user;
}
-void KIconButton::setIcon(const QString& icon)
+void KIconButton::setIcon(const TQString& icon)
{
mIcon = icon;
setIconSet(mpLoader->loadIconSet(mIcon, mGroup, d->iconSize));
@@ -723,17 +723,17 @@ void KIconButton::setIcon(const QString& icon)
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
}
void KIconButton::resetIcon()
{
- mIcon = QString::null;
- setIconSet(QIconSet());
+ mIcon = TQString::null;
+ setIconSet(TQIconSet());
}
void KIconButton::slotChangeIcon()
@@ -741,24 +741,24 @@ void KIconButton::slotChangeIcon()
if (!mpDialog)
{
mpDialog = new KIconDialog(mpLoader, this);
- connect(mpDialog, SIGNAL(newIconName(const QString&)), SLOT(newIconName(const QString&)));
+ connect(mpDialog, TQT_SIGNAL(newIconName(const TQString&)), TQT_SLOT(newIconName(const TQString&)));
}
mpDialog->setup( mGroup, mContext, d->m_bStrictIconSize, d->iconSize, mbUser );
mpDialog->showDialog();
}
-void KIconButton::newIconName(const QString& name)
+void KIconButton::newIconName(const TQString& name)
{
if (name.isEmpty())
return;
- QIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
+ TQIconSet iconset = mpLoader->loadIconSet(name, mGroup, d->iconSize);
setIconSet(iconset);
mIcon = name;
if ( mbUser )
- mpDialog->setCustomLocation( QFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
+ mpDialog->setCustomLocation( TQFileInfo( mpLoader->iconPath(mIcon, mGroup, true) ).dirPath( true ) );
emit iconChanged(name);
}
diff --git a/kio/kfile/kicondialog.h b/kio/kfile/kicondialog.h
index e6cf4e2fe..de447bc34 100644
--- a/kio/kfile/kicondialog.h
+++ b/kio/kfile/kicondialog.h
@@ -14,9 +14,9 @@
#ifndef __KIconDialog_h__
#define __KIconDialog_h__
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
#include <kicontheme.h>
#include <kdialogbase.h>
@@ -37,18 +37,18 @@ class KIO_EXPORT KIconCanvas: public KIconView
Q_OBJECT
public:
- KIconCanvas(QWidget *parent=0L, const char *name=0L);
+ KIconCanvas(TQWidget *parent=0L, const char *name=0L);
~KIconCanvas();
/**
* Load icons into the canvas.
*/
- void loadFiles(const QStringList& files);
+ void loadFiles(const TQStringList& files);
/**
* Returns the current icon.
*/
- QString getCurrent() const;
+ TQString getCurrent() const;
public slots:
void stopLoading();
@@ -57,8 +57,8 @@ signals:
/**
* Emitted when the current icon has changed.
*/
- void nameChanged(QString);
- /* KDE 4: Make it const QString & */
+ void nameChanged(TQString);
+ /* KDE 4: Make it const TQString & */
void startLoading(int);
void progress(int);
@@ -66,11 +66,11 @@ signals:
private slots:
void slotLoadFiles();
- void slotCurrentChanged(QIconViewItem *item);
+ void slotCurrentChanged(TQIconViewItem *item);
private:
- QStringList mFiles;
- QTimer *mpTimer;
+ TQStringList mFiles;
+ TQTimer *mpTimer;
KIconLoader *mpLoader; // unused
protected:
@@ -96,11 +96,11 @@ public:
/**
* Constructs an icon selection dialog using the global iconloader.
*/
- KIconDialog(QWidget *parent=0L, const char *name=0L);
+ KIconDialog(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs an icon selection dialog using a specific iconloader.
*/
- KIconDialog(KIconLoader *loader, QWidget *parent=0,
+ KIconDialog(KIconLoader *loader, TQWidget *parent=0,
const char *name=0);
/**
* Destructs the dialog.
@@ -122,7 +122,7 @@ public:
* sets a custom icon directory
* @since 3.1
*/
- void setCustomLocation( const QString& location );
+ void setCustomLocation( const TQString& location );
/**
* Sets the size of the icons to be shown / selected.
@@ -141,7 +141,7 @@ public:
/**
* @deprecated in KDE 3.0, use the static method getIcon instead.
*/
- QString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
+ TQString selectIcon(KIcon::Group group=KIcon::Desktop, KIcon::Context
context=KIcon::Application, bool user=false);
#endif
@@ -169,15 +169,15 @@ public:
/**
* exec()utes this modal dialog and returns the name of the selected icon,
- * or QString::null if the dialog was aborted.
+ * or TQString::null if the dialog was aborted.
* @returns the name of the icon, suitable for loading with KIconLoader.
* @see getIcon
*/
- QString openDialog();
+ TQString openDialog();
/**
- * show()es this dialog and emits a newIcon(const QString&) signal when
- * successful. QString::null will be emitted if the dialog was aborted.
+ * show()es this dialog and emits a newIcon(const TQString&) signal when
+ * successful. TQString::null will be emitted if the dialog was aborted.
*/
void showDialog();
@@ -200,14 +200,14 @@ public:
* @return The name of the icon, suitable for loading with KIconLoader.
* @version New in 3.0
*/
- static QString getIcon(KIcon::Group group=KIcon::Desktop,
+ static TQString getIcon(KIcon::Group group=KIcon::Desktop,
KIcon::Context context=KIcon::Application,
bool strictIconSize=false, int iconSize = 0,
- bool user=false, QWidget *parent=0,
- const QString &caption=QString::null);
+ bool user=false, TQWidget *parent=0,
+ const TQString &caption=TQString::null);
signals:
- void newIconName(const QString&);
+ void newIconName(const TQString&);
protected slots:
void slotOk();
@@ -228,10 +228,10 @@ private:
KIcon::Context mContext;
int mType;
- QStringList mFileList;
- QComboBox *mpCombo;
- QPushButton *mpBrowseBut;
- QRadioButton *mpRb1, *mpRb2;
+ TQStringList mFileList;
+ TQComboBox *mpCombo;
+ TQPushButton *mpBrowseBut;
+ TQRadioButton *mpRb1, *mpRb2;
KProgress *mpProgress;
KIconLoader *mpLoader;
KIconCanvas *mpCanvas;
@@ -257,7 +257,7 @@ private:
class KIO_EXPORT KIconButton: public QPushButton
{
Q_OBJECT
- Q_PROPERTY( QString icon READ icon WRITE setIcon RESET resetIcon )
+ Q_PROPERTY( TQString icon READ icon WRITE setIcon RESET resetIcon )
Q_PROPERTY( int iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY( bool strictIconSize READ strictIconSize WRITE setStrictIconSize )
@@ -265,12 +265,12 @@ public:
/**
* Constructs a KIconButton using the global iconloader.
*/
- KIconButton(QWidget *parent=0L, const char *name=0L);
+ KIconButton(TQWidget *parent=0L, const char *name=0L);
/**
* Constructs a KIconButton using a specific KIconLoader.
*/
- KIconButton(KIconLoader *loader, QWidget *parent, const char *name=0L);
+ KIconButton(KIconLoader *loader, TQWidget *parent, const char *name=0L);
/**
* Destructs the button.
*/
@@ -296,7 +296,7 @@ public:
/**
* Sets the button's initial icon.
*/
- void setIcon(const QString& icon);
+ void setIcon(const TQString& icon);
/**
* Resets the icon (reverts to an empty button).
@@ -306,7 +306,7 @@ public:
/**
* Returns the name of the selected icon.
*/
- QString icon() const { return mIcon; }
+ TQString icon() const { return mIcon; }
/**
* Sets the size of the icon to be shown / selected.
@@ -325,12 +325,12 @@ signals:
/**
* Emitted when the icon has changed.
*/
- void iconChanged(QString icon);
- /* KDE 4: Make it const QString & */
+ void iconChanged(TQString icon);
+ /* KDE 4: Make it const TQString & */
private slots:
void slotChangeIcon();
- void newIconName(const QString& name);
+ void newIconName(const TQString& name);
private:
void init( KIconLoader *loader );
@@ -339,7 +339,7 @@ private:
KIcon::Group mGroup;
KIcon::Context mContext;
- QString mIcon;
+ TQString mIcon;
KIconDialog *mpDialog;
KIconLoader *mpLoader;
class KIconButtonPrivate;
diff --git a/kio/kfile/kimagefilepreview.cpp b/kio/kfile/kimagefilepreview.cpp
index d973c6e1b..2d9f7881a 100644
--- a/kio/kfile/kimagefilepreview.cpp
+++ b/kio/kfile/kimagefilepreview.cpp
@@ -7,12 +7,12 @@
* License. See the file "COPYING" for the exact licensing terms.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -31,7 +31,7 @@
/**** KImageFilePreview ****/
-KImageFilePreview::KImageFilePreview( QWidget *parent )
+KImageFilePreview::KImageFilePreview( TQWidget *parent )
: KPreviewWidgetBase( parent ),
m_job( 0L )
{
@@ -39,28 +39,28 @@ KImageFilePreview::KImageFilePreview( QWidget *parent )
KConfigGroupSaver cs( config, ConfigGroup );
autoMode = config->readBoolEntry( "Automatic Preview", true );
- QVBoxLayout *vb = new QVBoxLayout( this, 0, KDialog::spacingHint() );
+ TQVBoxLayout *vb = new TQVBoxLayout( this, 0, KDialog::spacingHint() );
- imageLabel = new QLabel( this );
- imageLabel->setFrameStyle( QFrame::NoFrame );
+ imageLabel = new TQLabel( this );
+ imageLabel->setFrameStyle( TQFrame::NoFrame );
imageLabel->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
- imageLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding) );
+ imageLabel->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding) );
vb->addWidget( imageLabel );
- QHBoxLayout *hb = new QHBoxLayout( 0 );
+ TQHBoxLayout *hb = new TQHBoxLayout( 0 );
vb->addLayout( hb );
- autoPreview = new QCheckBox( i18n("&Automatic preview"), this );
+ autoPreview = new TQCheckBox( i18n("&Automatic preview"), this );
autoPreview->setChecked( autoMode );
hb->addWidget( autoPreview );
- connect( autoPreview, SIGNAL(toggled(bool)), SLOT(toggleAuto(bool)) );
+ connect( autoPreview, TQT_SIGNAL(toggled(bool)), TQT_SLOT(toggleAuto(bool)) );
previewButton = new KPushButton( SmallIconSet("thumbnail"), i18n("&Preview"), this );
hb->addWidget( previewButton );
- connect( previewButton, SIGNAL(clicked()), SLOT(showPreview()) );
+ connect( previewButton, TQT_SIGNAL(clicked()), TQT_SLOT(showPreview()) );
- timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()), SLOT(showPreview()) );
+ timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()), TQT_SLOT(showPreview()) );
setSupportedMimeTypes( KIO::PreviewJob::supportedMimeTypes() );
}
@@ -109,14 +109,14 @@ void KImageFilePreview::showPreview( const KURL &url, bool force )
if ( force ) // explicitly requested previews shall always be generated!
m_job->setIgnoreMaximumSize( true );
- connect( m_job, SIGNAL( result( KIO::Job * )),
- this, SLOT( slotResult( KIO::Job * )));
- connect( m_job, SIGNAL( gotPreview( const KFileItem*,
- const QPixmap& )),
- SLOT( gotPreview( const KFileItem*, const QPixmap& ) ));
-
- connect( m_job, SIGNAL( failed( const KFileItem* )),
- this, SLOT( slotFailed( const KFileItem* ) ));
+ connect( m_job, TQT_SIGNAL( result( KIO::Job * )),
+ this, TQT_SLOT( slotResult( KIO::Job * )));
+ connect( m_job, TQT_SIGNAL( gotPreview( const KFileItem*,
+ const TQPixmap& )),
+ TQT_SLOT( gotPreview( const KFileItem*, const TQPixmap& ) ));
+
+ connect( m_job, TQT_SIGNAL( failed( const KFileItem* )),
+ this, TQT_SLOT( slotFailed( const KFileItem* ) ));
}
}
}
@@ -132,14 +132,14 @@ void KImageFilePreview::toggleAuto( bool a )
}
}
-void KImageFilePreview::resizeEvent( QResizeEvent * )
+void KImageFilePreview::resizeEvent( TQResizeEvent * )
{
timer->start( 100, true ); // forces a new preview
}
-QSize KImageFilePreview::sizeHint() const
+TQSize KImageFilePreview::sizeHint() const
{
- return QSize( 20, 200 ); // otherwise it ends up huge???
+ return TQSize( 20, 200 ); // otherwise it ends up huge???
}
KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
@@ -149,7 +149,7 @@ KIO::PreviewJob * KImageFilePreview::createJob( const KURL& url, int w, int h )
return KIO::filePreview( urls, w, h, 0, 0, true, false );
}
-void KImageFilePreview::gotPreview( const KFileItem* item, const QPixmap& pm )
+void KImageFilePreview::gotPreview( const KFileItem* item, const TQPixmap& pm )
{
if ( item->url() == currentURL ) // should always be the case
imageLabel->setPixmap( pm );
diff --git a/kio/kfile/kimagefilepreview.h b/kio/kfile/kimagefilepreview.h
index cb034265a..849585428 100644
--- a/kio/kfile/kimagefilepreview.h
+++ b/kio/kfile/kimagefilepreview.h
@@ -11,7 +11,7 @@
#ifndef KIMAGEFILEPREVIEW_H
#define KIMAGEFILEPREVIEW_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kurl.h>
#include <kpreviewwidgetbase.h>
@@ -33,10 +33,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
Q_OBJECT
public:
- KImageFilePreview(QWidget *parent);
+ KImageFilePreview(TQWidget *parent);
~KImageFilePreview();
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
public slots:
virtual void showPreview(const KURL &url);
@@ -47,10 +47,10 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
void showPreview( const KURL& url, bool force );
void toggleAuto(bool);
- virtual void gotPreview( const KFileItem*, const QPixmap& );
+ virtual void gotPreview( const KFileItem*, const TQPixmap& );
protected:
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
virtual KIO::PreviewJob * createJob( const KURL& url,
int w, int h );
@@ -61,11 +61,11 @@ class KIO_EXPORT KImageFilePreview : public KPreviewWidgetBase
private:
bool autoMode;
KURL currentURL;
- QTimer *timer;
- QLabel *imageLabel;
- QLabel *infoLabel;
- QCheckBox *autoPreview;
- QPushButton *previewButton;
+ TQTimer *timer;
+ TQLabel *imageLabel;
+ TQLabel *infoLabel;
+ TQCheckBox *autoPreview;
+ TQPushButton *previewButton;
KIO::PreviewJob *m_job;
protected:
virtual void virtual_hook( int id, void* data );
diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp
index b3ff504fc..281fbc622 100644
--- a/kio/kfile/kmetaprops.cpp
+++ b/kio/kfile/kmetaprops.cpp
@@ -28,40 +28,40 @@
#include <klocale.h>
#include <kprotocolinfo.h>
-#include <qvalidator.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
-#include <qdatetime.h>
-#include <qstylesheet.h>
-#include <qvgroupbox.h>
+#include <tqvalidator.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
+#include <tqdatetime.h>
+#include <tqstylesheet.h>
+#include <tqvgroupbox.h>
#undef Bool
class MetaPropsScrollView : public QScrollView
{
public:
- MetaPropsScrollView(QWidget* parent = 0, const char* name = 0)
- : QScrollView(parent, name)
+ MetaPropsScrollView(TQWidget* parent = 0, const char* name = 0)
+ : TQScrollView(parent, name)
{
- setFrameStyle(QFrame::NoFrame);
- m_frame = new QFrame(viewport(), "MetaPropsScrollView::m_frame");
- m_frame->setFrameStyle(QFrame::NoFrame);
+ setFrameStyle(TQFrame::NoFrame);
+ m_frame = new TQFrame(viewport(), "MetaPropsScrollView::m_frame");
+ m_frame->setFrameStyle(TQFrame::NoFrame);
addChild(m_frame, 0, 0);
};
- QFrame* frame() {return m_frame;};
+ TQFrame* frame() {return m_frame;};
protected:
- virtual void viewportResizeEvent(QResizeEvent* ev)
+ virtual void viewportResizeEvent(TQResizeEvent* ev)
{
- QScrollView::viewportResizeEvent(ev);
+ TQScrollView::viewportResizeEvent(ev);
m_frame->resize( kMax(m_frame->sizeHint().width(), ev->size().width()),
kMax(m_frame->sizeHint().height(), ev->size().height()));
};
private:
- QFrame* m_frame;
+ TQFrame* m_frame;
};
class KFileMetaPropsPlugin::KFileMetaPropsPluginPrivate
@@ -70,11 +70,11 @@ public:
KFileMetaPropsPluginPrivate() {}
~KFileMetaPropsPluginPrivate() {}
- QFrame* m_frame;
- QGridLayout* m_framelayout;
+ TQFrame* m_frame;
+ TQGridLayout* m_framelayout;
KFileMetaInfo m_info;
-// QPushButton* m_add;
- QPtrList<KFileMetaInfoWidget> m_editWidgets;
+// TQPushButton* m_add;
+ TQPtrList<KFileMetaInfoWidget> m_editWidgets;
};
KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
@@ -107,7 +107,7 @@ KFileMetaPropsPlugin::KFileMetaPropsPlugin(KPropertiesDialog* props)
void KFileMetaPropsPlugin::createLayout()
{
- QFileInfo file_info(properties->item()->url().path());
+ TQFileInfo file_info(properties->item()->url().path());
kdDebug(250) << "KFileMetaPropsPlugin::createLayout" << endl;
@@ -117,7 +117,7 @@ void KFileMetaPropsPlugin::createLayout()
// now get a list of groups
KFileMetaInfoProvider* prov = KFileMetaInfoProvider::self();
- QStringList groupList = d->m_info.preferredGroups();
+ TQStringList groupList = d->m_info.preferredGroups();
const KFileMimeTypeInfo* mtinfo = prov->mimeTypeInfo(d->m_info.mimeType());
if (!mtinfo)
@@ -127,9 +127,9 @@ void KFileMetaPropsPlugin::createLayout()
}
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("&Meta Info"));
- topframe->setFrameStyle(QFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe);
+ TQFrame* topframe = properties->addPage(i18n("&Meta Info"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe);
// create a scroll view in the page
MetaPropsScrollView* view = new MetaPropsScrollView(topframe);
@@ -138,28 +138,28 @@ void KFileMetaPropsPlugin::createLayout()
d->m_frame = view->frame();
- QVBoxLayout *toplayout = new QVBoxLayout(d->m_frame);
+ TQVBoxLayout *toplayout = new TQVBoxLayout(d->m_frame);
toplayout->setSpacing(KDialog::spacingHint());
- for (QStringList::Iterator git=groupList.begin();
+ for (TQStringList::Iterator git=groupList.begin();
git!=groupList.end(); ++git)
{
kdDebug(7033) << *git << endl;
- QStringList itemList = d->m_info.group(*git).preferredKeys();
+ TQStringList itemList = d->m_info.group(*git).preferredKeys();
if (itemList.isEmpty())
continue;
- QGroupBox *groupBox = new QGroupBox(2, Qt::Horizontal,
- QStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
+ TQGroupBox *groupBox = new TQGroupBox(2, Qt::Horizontal,
+ TQStyleSheet::escape(mtinfo->groupInfo(*git)->translatedName()),
d->m_frame);
toplayout->addWidget(groupBox);
- QValueList<KFileMetaInfoItem> readItems;
- QValueList<KFileMetaInfoItem> editItems;
+ TQValueList<KFileMetaInfoItem> readItems;
+ TQValueList<KFileMetaInfoItem> editItems;
- for (QStringList::Iterator iit = itemList.begin();
+ for (TQStringList::Iterator iit = itemList.begin();
iit!=itemList.end(); ++iit)
{
KFileMetaInfoItem item = d->m_info[*git][*iit];
@@ -175,23 +175,23 @@ void KFileMetaPropsPlugin::createLayout()
KFileMetaInfoWidget* w = 0L;
// then first add the editable items to the layout
- for (QValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= editItems.begin();
iit!=editItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
- QValidator* val = mtinfo->createValidator(*git, (*iit).key());
+ TQValidator* val = mtinfo->createValidator(*git, (*iit).key());
if (!val) kdDebug(7033) << "didn't get a validator for " << *git << "/" << (*iit).key() << endl;
w = new KFileMetaInfoWidget(*iit, val, groupBox);
d->m_editWidgets.append( w );
- connect(w, SIGNAL(valueChanged(const QVariant&)), this, SIGNAL(changed()));
+ connect(w, TQT_SIGNAL(valueChanged(const TQVariant&)), this, TQT_SIGNAL(changed()));
}
// and then the read only items
- for (QValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
+ for (TQValueList<KFileMetaInfoItem>::Iterator iit= readItems.begin();
iit!=readItems.end(); ++iit)
{
- QLabel* l = new QLabel((*iit).translatedKey() + ":", groupBox);
+ TQLabel* l = new TQLabel((*iit).translatedKey() + ":", groupBox);
l->setAlignment( AlignAuto | AlignTop | ExpandTabs );
(new KFileMetaInfoWidget(*iit, KFileMetaInfoWidget::ReadOnly, 0L, groupBox));
}
@@ -200,10 +200,10 @@ void KFileMetaPropsPlugin::createLayout()
toplayout->addStretch(1);
// the add key (disabled until fully implemented)
-/* d->m_add = new QPushButton(i18n("&Add"), topframe);
- d->m_add->setSizePolicy(QSizePolicy(QSizePolicy::Fixed,
- QSizePolicy::Fixed));
- connect(d->m_add, SIGNAL(clicked()), this, SLOT(slotAdd()));
+/* d->m_add = new TQPushButton(i18n("&Add"), topframe);
+ d->m_add->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed,
+ TQSizePolicy::Fixed));
+ connect(d->m_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAdd()));
tmp->addWidget(d->m_add);
// if nothing can be added, deactivate it
@@ -212,9 +212,9 @@ void KFileMetaPropsPlugin::createLayout()
// if supportedKeys() does contain anything not in preferredKeys,
// we have something addable
- QStringList sk = d->m_info.supportedKeys();
+ TQStringList sk = d->m_info.supportedKeys();
d->m_add->setEnabled(false);
- for (QStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
+ for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it)
{
if ( l.find(*it)==l.end() )
{
@@ -259,7 +259,7 @@ void KFileMetaPropsPlugin::applyChanges()
kdDebug(250) << "applying changes" << endl;
// insert the fields that changed into the info object
- QPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
+ TQPtrListIterator<KFileMetaInfoWidget> it( d->m_editWidgets );
KFileMetaInfoWidget* w;
for (; (w = it.current()); ++it) w->apply();
d->m_info.applyChanges(properties->kurl().path());
diff --git a/kio/kfile/kmetaprops.h b/kio/kfile/kmetaprops.h
index dfa9b6e33..8bd83a3b3 100644
--- a/kio/kfile/kmetaprops.h
+++ b/kio/kfile/kmetaprops.h
@@ -48,13 +48,13 @@ public:
private:
void createLayout();
- QWidget* makeBoolWidget(const KFileMetaInfoItem& item, QWidget* parent);
- QWidget* makeIntWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeStringWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
- QWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, QWidget* parent,
- QString& valClass);
+ TQWidget* makeBoolWidget(const KFileMetaInfoItem& item, TQWidget* parent);
+ TQWidget* makeIntWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeStringWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
+ TQWidget* makeDateTimeWidget(const KFileMetaInfoItem& item, TQWidget* parent,
+ TQString& valClass);
private slots:
// Code disabled until the "Add" button is implemented
diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp
index 6543344e2..9e370643f 100644
--- a/kio/kfile/knotifydialog.cpp
+++ b/kio/kfile/knotifydialog.cpp
@@ -37,19 +37,19 @@
#include <kurlrequester.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qlayout.h>
-#include <qptrlist.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
using namespace KNotify;
@@ -115,8 +115,8 @@ namespace KNotify
class KNotifyToolTip : public QToolTip
{
public:
- KNotifyToolTip( QHeader *header )
- : QToolTip( header )
+ KNotifyToolTip( TQHeader *header )
+ : TQToolTip( header )
{
m_tips[COL_EXECUTE] = i18n("Execute a program");
m_tips[COL_STDERR] = i18n("Print to Standard error output");
@@ -128,9 +128,9 @@ namespace KNotify
virtual ~KNotifyToolTip() {}
protected:
- virtual void maybeTip ( const QPoint& p )
+ virtual void maybeTip ( const TQPoint& p )
{
- QHeader *header = static_cast<QHeader*>( parentWidget() );
+ TQHeader *header = static_cast<TQHeader*>( parentWidget() );
int section = 0;
if ( header->orientation() == Horizontal )
@@ -138,40 +138,40 @@ namespace KNotify
else
section= header->sectionAt( p.y() );
- if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(QString)) ) )
+ if ( ( section < 0 ) || ( static_cast<uint>( section ) >= (sizeof(m_tips) / sizeof(TQString)) ) )
return;
tip( header->sectionRect( section ), m_tips[section] );
}
private:
- QString m_tips[6];
+ TQString m_tips[6];
};
}
-int KNotifyDialog::configure( QWidget *parent, const char *name,
+int KNotifyDialog::configure( TQWidget *parent, const char *name,
const KAboutData *aboutData )
{
KNotifyDialog dialog( parent, name, true, aboutData );
return dialog.exec();
}
-KNotifyDialog::KNotifyDialog( QWidget *parent, const char *name, bool modal,
+KNotifyDialog::KNotifyDialog( TQWidget *parent, const char *name, bool modal,
const KAboutData *aboutData )
: KDialogBase(parent, name, modal, i18n("Notification Settings"),
Ok | Apply | Cancel | Default, Ok, true )
{
- QVBox *box = makeVBoxMainWidget();
+ TQVBox *box = makeVBoxMainWidget();
m_notifyWidget = new KNotifyWidget( box, "knotify widget" );
if ( aboutData )
addApplicationEvents( aboutData->appName() );
- connect( this, SIGNAL( okClicked() ), m_notifyWidget, SLOT( save() ));
- connect( this, SIGNAL( applyClicked() ), m_notifyWidget, SLOT( save() ));
+ connect( this, TQT_SIGNAL( okClicked() ), m_notifyWidget, TQT_SLOT( save() ));
+ connect( this, TQT_SIGNAL( applyClicked() ), m_notifyWidget, TQT_SLOT( save() ));
}
KNotifyDialog::~KNotifyDialog()
@@ -180,11 +180,11 @@ KNotifyDialog::~KNotifyDialog()
void KNotifyDialog::addApplicationEvents( const char *appName )
{
- addApplicationEvents( QString::fromUtf8( appName ) +
- QString::fromLatin1( "/eventsrc" ) );
+ addApplicationEvents( TQString::fromUtf8( appName ) +
+ TQString::fromLatin1( "/eventsrc" ) );
}
-void KNotifyDialog::addApplicationEvents( const QString& path )
+void KNotifyDialog::addApplicationEvents( const TQString& path )
{
Application *app = m_notifyWidget->addApplicationEvents( path );
if ( app )
@@ -212,12 +212,12 @@ void KNotifyDialog::slotDefault()
class KNotifyWidget::Private
{
public:
- QPixmap pixmaps[6];
+ TQPixmap pixmaps[6];
KNotifyToolTip *toolTip;
};
// simple access to all knotify-handled applications
-KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
+KNotifyWidget::KNotifyWidget( TQWidget *parent, const char *name,
bool handleAllApps )
: KNotifyWidgetBase( parent, name ? name : "KNotifyWidget" )
{
@@ -237,12 +237,12 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
m_listview->setFullWidth( true );
m_listview->setAllColumnsShowFocus( true );
- QPixmap pexec = SmallIcon("exec");
- QPixmap pstderr = SmallIcon("terminal");
- QPixmap pmessage = SmallIcon("info");
- QPixmap plogfile = SmallIcon("log");
- QPixmap psound = SmallIcon("sound");
- QPixmap ptaskbar = SmallIcon("kicker");
+ TQPixmap pexec = SmallIcon("exec");
+ TQPixmap pstderr = SmallIcon("terminal");
+ TQPixmap pmessage = SmallIcon("info");
+ TQPixmap plogfile = SmallIcon("log");
+ TQPixmap psound = SmallIcon("sound");
+ TQPixmap ptaskbar = SmallIcon("kicker");
d->pixmaps[COL_EXECUTE] = pexec;
d->pixmaps[COL_STDERR] = pstderr;
@@ -253,68 +253,68 @@ KNotifyWidget::KNotifyWidget( QWidget *parent, const char *name,
int w = KIcon::SizeSmall + 6;
- QHeader *header = m_listview->header();
- header->setLabel( COL_EXECUTE, pexec, QString::null, w );
- header->setLabel( COL_STDERR, pstderr, QString::null, w );
- header->setLabel( COL_MESSAGE, pmessage, QString::null, w );
- header->setLabel( COL_LOGFILE, plogfile, QString::null, w );
- header->setLabel( COL_SOUND, psound, QString::null, w );
- header->setLabel( COL_TASKBAR, ptaskbar, QString::null, w );
+ TQHeader *header = m_listview->header();
+ header->setLabel( COL_EXECUTE, pexec, TQString::null, w );
+ header->setLabel( COL_STDERR, pstderr, TQString::null, w );
+ header->setLabel( COL_MESSAGE, pmessage, TQString::null, w );
+ header->setLabel( COL_LOGFILE, plogfile, TQString::null, w );
+ header->setLabel( COL_SOUND, psound, TQString::null, w );
+ header->setLabel( COL_TASKBAR, ptaskbar, TQString::null, w );
d->toolTip = new KNotifyToolTip( header );
m_playButton->setIconSet( SmallIconSet( "player_play" ) );
- connect( m_playButton, SIGNAL( clicked() ), SLOT( playSound() ));
-
- connect( m_listview, SIGNAL( currentChanged( QListViewItem * ) ),
- SLOT( slotEventChanged( QListViewItem * ) ));
- connect( m_listview, SIGNAL(clicked( QListViewItem *, const QPoint&, int)),
- SLOT( slotItemClicked( QListViewItem *, const QPoint&, int )));
-
- connect( m_playSound, SIGNAL( toggled( bool )),
- SLOT( soundToggled( bool )) );
- connect( m_logToFile, SIGNAL( toggled( bool )),
- SLOT( loggingToggled( bool )) );
- connect( m_execute, SIGNAL( toggled( bool )),
- SLOT( executeToggled( bool )) );
- connect( m_messageBox, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_passivePopup, SIGNAL( toggled( bool )),
- SLOT( messageBoxChanged() ) );
- connect( m_stderr, SIGNAL( toggled( bool )),
- SLOT( stderrToggled( bool ) ) );
- connect( m_taskbar, SIGNAL( toggled( bool )),
- SLOT( taskbarToggled( bool ) ) );
-
- connect( m_soundPath, SIGNAL( textChanged( const QString& )),
- SLOT( soundFileChanged( const QString& )));
- connect( m_logfilePath, SIGNAL( textChanged( const QString& )),
- SLOT( logfileChanged( const QString& ) ));
- connect( m_executePath, SIGNAL( textChanged( const QString& )),
- SLOT( commandlineChanged( const QString& ) ));
-
- connect( m_soundPath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openSoundDialog( KURLRequester * )));
- connect( m_logfilePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openLogDialog( KURLRequester * )));
- connect( m_executePath, SIGNAL( openFileDialog( KURLRequester * )),
- SLOT( openExecDialog( KURLRequester * )));
-
- connect( m_extension, SIGNAL( clicked() ),
- SLOT( toggleAdvanced()) );
-
- connect( m_buttonEnable, SIGNAL( clicked() ), SLOT( enableAll() ));
- connect( m_buttonDisable, SIGNAL( clicked() ), SLOT( enableAll() ));
-
- QString whatsThis = i18n("<qt>You may use the following macros<br>"
+ connect( m_playButton, TQT_SIGNAL( clicked() ), TQT_SLOT( playSound() ));
+
+ connect( m_listview, TQT_SIGNAL( currentChanged( TQListViewItem * ) ),
+ TQT_SLOT( slotEventChanged( TQListViewItem * ) ));
+ connect( m_listview, TQT_SIGNAL(clicked( TQListViewItem *, const TQPoint&, int)),
+ TQT_SLOT( slotItemClicked( TQListViewItem *, const TQPoint&, int )));
+
+ connect( m_playSound, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( soundToggled( bool )) );
+ connect( m_logToFile, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( loggingToggled( bool )) );
+ connect( m_execute, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( executeToggled( bool )) );
+ connect( m_messageBox, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_passivePopup, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( messageBoxChanged() ) );
+ connect( m_stderr, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( stderrToggled( bool ) ) );
+ connect( m_taskbar, TQT_SIGNAL( toggled( bool )),
+ TQT_SLOT( taskbarToggled( bool ) ) );
+
+ connect( m_soundPath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( soundFileChanged( const TQString& )));
+ connect( m_logfilePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( logfileChanged( const TQString& ) ));
+ connect( m_executePath, TQT_SIGNAL( textChanged( const TQString& )),
+ TQT_SLOT( commandlineChanged( const TQString& ) ));
+
+ connect( m_soundPath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openSoundDialog( KURLRequester * )));
+ connect( m_logfilePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openLogDialog( KURLRequester * )));
+ connect( m_executePath, TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ TQT_SLOT( openExecDialog( KURLRequester * )));
+
+ connect( m_extension, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( toggleAdvanced()) );
+
+ connect( m_buttonEnable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+ connect( m_buttonDisable, TQT_SIGNAL( clicked() ), TQT_SLOT( enableAll() ));
+
+ TQString whatsThis = i18n("<qt>You may use the following macros<br>"
"in the commandline:<br>"
"<b>%e</b>: for the event name,<br>"
"<b>%a</b>: for the name of the application that sent the event,<br>"
"<b>%s</b>: for the notification message,<br>"
"<b>%w</b>: for the numeric window ID where the event originated,<br>"
"<b>%i</b>: for the numeric event ID.");
- QWhatsThis::add( m_execute, whatsThis );
- QWhatsThis::add( m_executePath, whatsThis );
+ TQWhatsThis::add( m_execute, whatsThis );
+ TQWhatsThis::add( m_executePath, whatsThis );
showAdvanced( false );
@@ -337,7 +337,7 @@ void KNotifyWidget::showAdvanced( bool show )
if ( show )
{
m_extension->setText( i18n("Advanced <<") );
- QToolTip::add( m_extension, i18n("Hide advanced options") );
+ TQToolTip::add( m_extension, i18n("Hide advanced options") );
m_logToFile->show();
m_logfilePath->show();
@@ -354,7 +354,7 @@ void KNotifyWidget::showAdvanced( bool show )
else
{
m_extension->setText( i18n("Advanced >>") );
- QToolTip::add( m_extension, i18n("Show advanced options") );
+ TQToolTip::add( m_extension, i18n("Show advanced options") );
m_logToFile->hide();
m_logfilePath->hide();
@@ -369,10 +369,10 @@ void KNotifyWidget::showAdvanced( bool show )
}
}
-Application * KNotifyWidget::addApplicationEvents( const QString& path )
+Application * KNotifyWidget::addApplicationEvents( const TQString& path )
{
kdDebug() << "**** knotify: adding path: " << path << endl;
- QString relativePath = path;
+ TQString relativePath = path;
if ( path.at(0) == '/' && KStandardDirs::exists( path ) )
relativePath = makeRelative( path );
@@ -400,13 +400,13 @@ void KNotifyWidget::clearVisible()
slotEventChanged( 0L ); // disable widgets
}
-void KNotifyWidget::showEvent( QShowEvent *e )
+void KNotifyWidget::showEvent( TQShowEvent *e )
{
selectItem( m_listview->firstChild() );
KNotifyWidgetBase::showEvent( e );
}
-void KNotifyWidget::slotEventChanged( QListViewItem *item )
+void KNotifyWidget::slotEventChanged( TQListViewItem *item )
{
bool on = (item != 0L);
@@ -484,7 +484,7 @@ void KNotifyWidget::updateWidgets( ListViewItem *item )
void KNotifyWidget::updatePixmaps( ListViewItem *item )
{
- QPixmap emptyPix;
+ TQPixmap emptyPix;
Event &event = item->event();
bool doIt = (event.presentation & KNotifyClient::Execute) &&
@@ -520,7 +520,7 @@ void KNotifyWidget::addVisibleApp( Application *app )
m_visibleApps.append( app );
addToView( app->eventList() );
- QListViewItem *item = m_listview->selectedItem();
+ TQListViewItem *item = m_listview->selectedItem();
if ( !item )
item = m_listview->firstChild();
@@ -556,8 +556,8 @@ void KNotifyWidget::addToView( const EventList& events )
}
}
-void KNotifyWidget::widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy )
+void KNotifyWidget::widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy )
{
if ( signalsBlocked() )
return;
@@ -580,31 +580,31 @@ void KNotifyWidget::widgetChanged( QListViewItem *item,
void KNotifyWidget::soundToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_soundPath->url().isEmpty();
- item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, doIcon ? d->pixmaps[COL_SOUND] : TQPixmap() );
widgetChanged( item, KNotifyClient::Sound, on, m_soundPath );
}
void KNotifyWidget::loggingToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_logfilePath->url().isEmpty();
- item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : QPixmap());
+ item->setPixmap(COL_LOGFILE, doIcon ? d->pixmaps[COL_LOGFILE] : TQPixmap());
widgetChanged( item, KNotifyClient::Logfile, on, m_logfilePath );
}
void KNotifyWidget::executeToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool doIcon = on && !m_executePath->url().isEmpty();
- item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : QPixmap());
+ item->setPixmap(COL_EXECUTE, doIcon ? d->pixmaps[COL_EXECUTE] : TQPixmap());
widgetChanged( item, KNotifyClient::Execute, on, m_executePath );
}
@@ -615,12 +615,12 @@ void KNotifyWidget::messageBoxChanged()
m_passivePopup->setEnabled( m_messageBox->isChecked() );
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
bool on = m_passivePopup->isEnabled();
- item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : QPixmap() );
+ item->setPixmap( COL_MESSAGE, on ? d->pixmaps[COL_MESSAGE] : TQPixmap() );
Event &e = static_cast<ListViewItem*>( item )->event();
@@ -644,28 +644,28 @@ void KNotifyWidget::messageBoxChanged()
void KNotifyWidget::stderrToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : QPixmap() );
+ item->setPixmap( COL_STDERR, on ? d->pixmaps[COL_STDERR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Stderr, on );
}
void KNotifyWidget::taskbarToggled( bool on )
{
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
- item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : QPixmap() );
+ item->setPixmap( COL_TASKBAR, on ? d->pixmaps[COL_TASKBAR] : TQPixmap() );
widgetChanged( item, KNotifyClient::Taskbar, on );
}
-void KNotifyWidget::soundFileChanged( const QString& text )
+void KNotifyWidget::soundFileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
@@ -673,44 +673,44 @@ void KNotifyWidget::soundFileChanged( const QString& text )
currentEvent()->soundfile = text;
bool ok = !text.isEmpty() && m_playSound->isChecked();
- item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : QPixmap() );
+ item->setPixmap( COL_SOUND, ok ? d->pixmaps[COL_SOUND] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::logfileChanged( const QString& text )
+void KNotifyWidget::logfileChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->logfile = text;
bool ok = !text.isEmpty() && m_logToFile->isChecked();
- item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : QPixmap() );
+ item->setPixmap( COL_LOGFILE, ok ? d->pixmaps[COL_LOGFILE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::commandlineChanged( const QString& text )
+void KNotifyWidget::commandlineChanged( const TQString& text )
{
if ( signalsBlocked() )
return;
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
return;
currentEvent()->commandline = text;
bool ok = !text.isEmpty() && m_execute->isChecked();
- item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : QPixmap() );
+ item->setPixmap( COL_EXECUTE, ok ? d->pixmaps[COL_EXECUTE] : TQPixmap() );
emit changed( true );
}
-void KNotifyWidget::slotItemClicked( QListViewItem *item, const QPoint&,
+void KNotifyWidget::slotItemClicked( TQListViewItem *item, const TQPoint&,
int col )
{
if ( !item || !item->isSelected() )
@@ -764,7 +764,7 @@ void KNotifyWidget::sort( bool ascending )
m_listview->sort();
}
-void KNotifyWidget::selectItem( QListViewItem *item )
+void KNotifyWidget::selectItem( TQListViewItem *item )
{
if ( item )
{
@@ -828,20 +828,20 @@ void KNotifyWidget::save()
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
-QString KNotifyWidget::makeRelative( const QString& fullPath )
+TQString KNotifyWidget::makeRelative( const TQString& fullPath )
{
int slash = fullPath.findRev( '/' ) - 1;
slash = fullPath.findRev( '/', slash );
if ( slash < 0 )
- return QString::null;
+ return TQString::null;
return fullPath.mid( slash+1 );
}
Event * KNotifyWidget::currentEvent()
{
- QListViewItem *current = m_listview->currentItem();
+ TQListViewItem *current = m_listview->currentItem();
if ( !current )
return 0L;
@@ -851,27 +851,27 @@ Event * KNotifyWidget::currentEvent()
void KNotifyWidget::openSoundDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openSoundDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openSoundDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select Sound File") );
- QStringList filters;
+ TQStringList filters;
filters << "audio/x-wav" << "audio/x-mp3" << "application/ogg"
<< "audio/x-adpcm";
fileDialog->setMimeFilter( filters );
// find the first "sound"-resource that contains files
const Application *app = currentEvent()->application();
- QStringList soundDirs =
+ TQStringList soundDirs =
KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
KURL soundURL;
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 ) {
@@ -887,12 +887,12 @@ void KNotifyWidget::openSoundDialog( KURLRequester *requester )
void KNotifyWidget::openLogDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openLogDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openLogDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select Log File") );
- QStringList filters;
+ TQStringList filters;
filters << "text/x-log" << "text/plain";
fileDialog->setMimeFilter( filters );
}
@@ -900,13 +900,13 @@ void KNotifyWidget::openLogDialog( KURLRequester *requester )
void KNotifyWidget::openExecDialog( KURLRequester *requester )
{
// only need to init this once
- requester->disconnect( SIGNAL( openFileDialog( KURLRequester * )),
- this, SLOT( openExecDialog( KURLRequester * )));
+ requester->disconnect( TQT_SIGNAL( openFileDialog( KURLRequester * )),
+ this, TQT_SLOT( openExecDialog( KURLRequester * )));
KFileDialog *fileDialog = requester->fileDialog();
fileDialog->setCaption( i18n("Select File to Execute") );
- QStringList filters;
+ TQStringList filters;
filters << "application/x-executable" << "application/x-shellscript"
<< "application/x-perl" << "application/x-python";
fileDialog->setMimeFilter( filters );
@@ -914,19 +914,19 @@ void KNotifyWidget::openExecDialog( KURLRequester *requester )
void KNotifyWidget::playSound()
{
- QString soundPath = m_soundPath->url();
+ TQString soundPath = m_soundPath->url();
if (!KIO::NetAccess::exists( m_soundPath->url(), true, 0 )) {
bool foundSound=false;
// find the first "sound"-resource that contains files
const Application *app = currentEvent()->application();
- QStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
+ TQStringList soundDirs = KGlobal::dirs()->findDirs("data", app->appName() + "/sounds");
soundDirs += KGlobal::dirs()->resourceDirs( "sound" );
if ( !soundDirs.isEmpty() ) {
- QDir dir;
- dir.setFilter( QDir::Files | QDir::Readable );
- QStringList::ConstIterator it = soundDirs.begin();
+ TQDir dir;
+ dir.setFilter( TQDir::Files | TQDir::Readable );
+ TQStringList::ConstIterator it = soundDirs.begin();
while ( it != soundDirs.end() ) {
dir = *it;
if ( dir.isReadable() && dir.count() > 2 &&
@@ -975,14 +975,14 @@ void KNotifyWidget::enableAll( int what, bool enable )
}
// now make the listview reflect the changes
- QListViewItemIterator it( m_listview->firstChild() );
+ TQListViewItemIterator it( m_listview->firstChild() );
for ( ; it.current(); ++it )
{
ListViewItem *item = static_cast<ListViewItem*>( it.current() );
updatePixmaps( item );
}
- QListViewItem *item = m_listview->currentItem();
+ TQListViewItem *item = m_listview->currentItem();
if ( !item )
item = m_listview->firstChild();
selectItem( item );
@@ -998,17 +998,17 @@ void KNotifyWidget::enableAll( int what, bool enable )
//
// path must be "appname/eventsrc", i.e. a relative path
//
-Application::Application( const QString &path )
+Application::Application( const TQString &path )
{
- QString config_file = path;
+ TQString config_file = path;
config_file[config_file.find('/')] = '.';
m_events = 0L;
config = new KConfig(config_file, false, false);
kc = new KConfig(path, true, false, "data");
- kc->setGroup( QString::fromLatin1("!Global!") );
- m_icon = kc->readEntry(QString::fromLatin1("IconName"),
- QString::fromLatin1("misc"));
- m_description = kc->readEntry( QString::fromLatin1("Comment"),
+ kc->setGroup( TQString::fromLatin1("!Global!") );
+ m_icon = kc->readEntry(TQString::fromLatin1("IconName"),
+ TQString::fromLatin1("misc"));
+ m_description = kc->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
int index = path.find( '/' );
@@ -1070,13 +1070,13 @@ void Application::reloadEvents( bool revertToDefaults )
Event *e = 0L;
- QString global = QString::fromLatin1("!Global!");
- QString default_group = QString::fromLatin1("<default>");
- QString name = QString::fromLatin1("Name");
- QString comment = QString::fromLatin1("Comment");
+ TQString global = TQString::fromLatin1("!Global!");
+ TQString default_group = TQString::fromLatin1("<default>");
+ TQString name = TQString::fromLatin1("Name");
+ TQString comment = TQString::fromLatin1("Comment");
- QStringList conflist = kc->groupList();
- QStringList::ConstIterator it = conflist.begin();
+ TQStringList conflist = kc->groupList();
+ TQStringList::ConstIterator it = conflist.begin();
while ( it != conflist.end() ) {
if ( (*it) != global && (*it) != default_group ) { // event group
@@ -1095,9 +1095,9 @@ void Application::reloadEvents( bool revertToDefaults )
// default to passive popups over plain messageboxes
int default_rep = kc->readNumEntry("default_presentation",
0 | KNotifyClient::PassivePopup);
- QString default_logfile = kc->readPathEntry("default_logfile");
- QString default_soundfile = kc->readPathEntry("default_sound");
- QString default_commandline = kc->readPathEntry("default_commandline");
+ TQString default_logfile = kc->readPathEntry("default_logfile");
+ TQString default_soundfile = kc->readPathEntry("default_sound");
+ TQString default_commandline = kc->readPathEntry("default_commandline");
config->setGroup(*it);
@@ -1134,14 +1134,14 @@ void Application::reloadEvents( bool revertToDefaults )
///////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////
-ListViewItem::ListViewItem( QListView *view, Event *event )
- : QListViewItem( view ),
+ListViewItem::ListViewItem( TQListView *view, Event *event )
+ : TQListViewItem( view ),
m_event( event )
{
setText( COL_EVENT, event->text() );
}
-int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
+int ListViewItem::compare ( TQListViewItem * i, int col, bool ascending ) const
{
ListViewItem *item = static_cast<ListViewItem*>( i );
int myPres = m_event->presentation;
@@ -1152,7 +1152,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
switch ( col )
{
case COL_EVENT: // use default sorting
- return QListViewItem::compare( i, col, ascending );
+ return TQListViewItem::compare( i, col, ascending );
case COL_EXECUTE:
action = KNotifyClient::Execute;
@@ -1177,7 +1177,7 @@ int ListViewItem::compare ( QListViewItem * i, int col, bool ascending ) const
if ( (myPres & action) == (otherPres & action) )
{
// default sorting by event
- return QListViewItem::compare( i, COL_EVENT, true );
+ return TQListViewItem::compare( i, COL_EVENT, true );
}
if ( myPres & action )
diff --git a/kio/kfile/knotifydialog.h b/kio/kfile/knotifydialog.h
index 3d4074fd0..a1c4ef52f 100644
--- a/kio/kfile/knotifydialog.h
+++ b/kio/kfile/knotifydialog.h
@@ -68,7 +68,7 @@ public:
* Set this to 0L if you want to add all events yourself with
* addApplicationEvents().
*/
- KNotifyDialog( QWidget *parent = 0, const char *name = 0,
+ KNotifyDialog( TQWidget *parent = 0, const char *name = 0,
bool modal = true,
const KAboutData *aboutData =
KGlobal::instance()->aboutData() );
@@ -85,9 +85,9 @@ public:
* @param aboutData A pointer to a KAboutData object. KAboutData::appName()
* will be used to find the KNotify events (in the eventsrc file).
* @see exec for the return values.
- * @return The value of QDialog::exec()
+ * @return The value of TQDialog::exec()
*/
- static int configure( QWidget *parent = 0, const char *name = 0,
+ static int configure( TQWidget *parent = 0, const char *name = 0,
const KAboutData *aboutData = KGlobal::instance()->aboutData() );
/**
@@ -110,7 +110,7 @@ public:
* A relative path would be e.g. "kwin/eventsrc".
* @see clearApplicationEvents()
*/
- virtual void addApplicationEvents( const QString& path );
+ virtual void addApplicationEvents( const TQString& path );
/**
* Removes all the events added with addApplicationEvents()
@@ -141,9 +141,9 @@ namespace KNotify
class Application;
class Event;
class ListViewItem;
- typedef QPtrList<Event> EventList;
- typedef QPtrListIterator<Application> ApplicationListIterator;
- typedef QPtrListIterator<Event> EventListIterator;
+ typedef TQPtrList<Event> EventList;
+ typedef TQPtrListIterator<Application> ApplicationListIterator;
+ typedef TQPtrListIterator<Event> EventListIterator;
/**
* @internal
@@ -151,21 +151,21 @@ namespace KNotify
class KIO_EXPORT Application
{
public:
- Application( const QString &path );
+ Application( const TQString &path );
~Application();
- QString text() const { return m_description; }
- QString icon() const { return m_icon; }
+ TQString text() const { return m_description; }
+ TQString icon() const { return m_icon; }
const EventList& eventList();
void reloadEvents( bool revertToDefaults = false );
void save();
- QString appName() const { return m_appname; }
+ TQString appName() const { return m_appname; }
private:
- QString m_icon;
- QString m_description;
- QString m_appname;
+ TQString m_icon;
+ TQString m_description;
+ TQString m_appname;
EventList *m_events;
KConfig *kc; // The file that defines the events.
@@ -173,10 +173,10 @@ namespace KNotify
};
- class KIO_EXPORT ApplicationList : public QPtrList<Application>
+ class KIO_EXPORT ApplicationList : public TQPtrList<Application>
{
- virtual int compareItems ( QPtrCollection::Item item1,
- QPtrCollection::Item item2 )
+ virtual int compareItems ( TQPtrCollection::Item item1,
+ TQPtrCollection::Item item2 )
{
return (static_cast<Application*>( item1 )->text() >=
static_cast<Application*>( item2 )->text()) ? 1 : -1;
@@ -191,7 +191,7 @@ namespace KNotify
Q_OBJECT
public:
- KNotifyWidget( QWidget* parent = 0, const char* name = 0,
+ KNotifyWidget( TQWidget* parent = 0, const char* name = 0,
bool handleAllApps = false );
~KNotifyWidget();
@@ -208,7 +208,7 @@ namespace KNotify
* The returned pointer must be freed by the caller (easiest done
* by putting it into an ApplicationList with setAutoDelete( true )).
*/
- Application * addApplicationEvents( const QString& path );
+ Application * addApplicationEvents( const TQString& path );
void resetDefaults( bool ask );
void sort( bool ascending = true );
@@ -237,7 +237,7 @@ namespace KNotify
* May return 0L, if there is no current event selected.
*/
Event * currentEvent();
- virtual void showEvent( QShowEvent * );
+ virtual void showEvent( TQShowEvent * );
virtual void enableAll( int what, bool enable );
void reload( bool revertToDefaults = false );
@@ -246,9 +246,9 @@ namespace KNotify
void playSound();
private slots:
- void slotItemClicked( QListViewItem *item, const QPoint& point,
+ void slotItemClicked( TQListViewItem *item, const TQPoint& point,
int col );
- void slotEventChanged( QListViewItem * );
+ void slotEventChanged( TQListViewItem * );
void soundToggled( bool on );
void loggingToggled( bool on );
void executeToggled( bool on );
@@ -256,9 +256,9 @@ namespace KNotify
void stderrToggled( bool on );
void taskbarToggled( bool on );
- void soundFileChanged( const QString& text );
- void logfileChanged( const QString& text );
- void commandlineChanged( const QString& text );
+ void soundFileChanged( const TQString& text );
+ void logfileChanged( const TQString& text );
+ void commandlineChanged( const TQString& text );
void openSoundDialog( KURLRequester * );
void openLogDialog( KURLRequester * );
@@ -270,11 +270,11 @@ namespace KNotify
void updateWidgets( ListViewItem *item );
void updatePixmaps( ListViewItem *item );
- static QString makeRelative( const QString& );
+ static TQString makeRelative( const TQString& );
void addToView( const EventList& events );
- void widgetChanged( QListViewItem *item,
- int what, bool on, QWidget *buddy = 0L );
- void selectItem( QListViewItem *item );
+ void widgetChanged( TQListViewItem *item,
+ int what, bool on, TQWidget *buddy = 0L );
+ void selectItem( TQListViewItem *item );
ApplicationList m_visibleApps;
ApplicationList m_allApps;
@@ -297,13 +297,13 @@ namespace KNotify
friend class Application;
public:
- QString text() const { return description; }
+ TQString text() const { return description; }
int presentation;
int dontShow;
- QString logfile;
- QString soundfile;
- QString commandline;
+ TQString logfile;
+ TQString soundfile;
+ TQString commandline;
const Application *application() const { return m_app; }
@@ -313,9 +313,9 @@ namespace KNotify
dontShow = 0;
m_app = app;
}
- QString name;
- QString description;
- QString configGroup;
+ TQString name;
+ TQString description;
+ TQString configGroup;
const Application *m_app;
};
@@ -326,10 +326,10 @@ namespace KNotify
class ListViewItem : public QListViewItem
{
public:
- ListViewItem( QListView *view, Event *event );
+ ListViewItem( TQListView *view, Event *event );
Event& event() { return *m_event; }
- virtual int compare (QListViewItem * i, int col, bool ascending) const;
+ virtual int compare (TQListViewItem * i, int col, bool ascending) const;
private:
Event * m_event;
diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp
index f1a71341b..2a3e7e690 100644
--- a/kio/kfile/kopenwith.cpp
+++ b/kio/kfile/kopenwith.cpp
@@ -20,19 +20,19 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
-#include <qdialog.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdialog.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -64,14 +64,14 @@
#include <assert.h>
#include <stdlib.h>
-#define SORT_SPEC (QDir::DirsFirst | QDir::Name | QDir::IgnoreCase)
+#define SORT_SPEC (TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase)
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( KListView* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -79,9 +79,9 @@ KAppTreeListItem::KAppTreeListItem( KListView* parent, const QString & name,
// ----------------------------------------------------------------------
-KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString &p, const QString &c )
- : QListViewItem( parent, name )
+KAppTreeListItem::KAppTreeListItem( TQListViewItem* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString &p, const TQString &c )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c);
}
@@ -89,7 +89,7 @@ KAppTreeListItem::KAppTreeListItem( QListViewItem* parent, const QString & name,
// ----------------------------------------------------------------------
-void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &_exec)
+void KAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &_exec)
{
setPixmap(0, pixmap);
parsed = parse;
@@ -100,7 +100,7 @@ void KAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const Q
/* Ensures that directories sort before non-directories */
-int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
+int KAppTreeListItem::compare(TQListViewItem *i, int col, bool ascending) const
{
KAppTreeListItem *other = dynamic_cast<KAppTreeListItem *>(i);
@@ -112,12 +112,12 @@ int KAppTreeListItem::compare(QListViewItem *i, int col, bool ascending) const
return 1;
else // both directories or both not
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
// ----------------------------------------------------------------------
// Ensure that case is ignored
-QString KAppTreeListItem::key(int column, bool /*ascending*/) const
+TQString KAppTreeListItem::key(int column, bool /*ascending*/) const
{
return text(column).upper();
}
@@ -134,7 +134,7 @@ void KAppTreeListItem::setOpen( bool o )
((KApplicationTree *) parent())->addDesktopGroup( path, this );
parsed = true;
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
bool KAppTreeListItem::isDirectory()
@@ -144,19 +144,19 @@ bool KAppTreeListItem::isDirectory()
// ----------------------------------------------------------------------
-KApplicationTree::KApplicationTree( QWidget *parent )
+KApplicationTree::KApplicationTree( TQWidget *parent )
: KListView( parent ), currentitem(0)
{
addColumn( i18n("Known Applications") );
setRootIsDecorated( true );
- addDesktopGroup( QString::null );
+ addDesktopGroup( TQString::null );
cleanupTree();
- connect( this, SIGNAL( currentChanged(QListViewItem*) ),
- SLOT( slotItemHighlighted(QListViewItem*) ) );
- connect( this, SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( slotSelectionChanged(QListViewItem*) ) );
+ connect( this, TQT_SIGNAL( currentChanged(TQListViewItem*) ),
+ TQT_SLOT( slotItemHighlighted(TQListViewItem*) ) );
+ connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( slotSelectionChanged(TQListViewItem*) ) );
}
// ----------------------------------------------------------------------
@@ -169,20 +169,20 @@ bool KApplicationTree::isDirSel()
// ----------------------------------------------------------------------
-static QPixmap appIcon(const QString &iconName)
+static TQPixmap appIcon(const TQString &iconName)
{
- QPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
+ TQPixmap normal = KGlobal::iconLoader()->loadIcon(iconName, KIcon::Small, 0, KIcon::DefaultState, 0L, true);
// make sure they are not larger than 20x20
if (normal.width() > 20 || normal.height() > 20)
{
- QImage tmp = normal.convertToImage();
+ TQImage tmp = normal.convertToImage();
tmp = tmp.smoothScale(20, 20);
normal.convertFromImage(tmp);
}
return normal;
}
-void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem *item)
+void KApplicationTree::addDesktopGroup( const TQString &relPath, KAppTreeListItem *item)
{
KServiceGroup::Ptr root = KServiceGroup::group(relPath);
if (!root || !root->isValid()) return;
@@ -193,10 +193,10 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
- QString icon;
- QString text;
- QString relPath;
- QString exec;
+ TQString icon;
+ TQString text;
+ TQString relPath;
+ TQString exec;
bool isDir = false;
KSycocaEntry *p = (*it);
if (p->isType(KST_KService))
@@ -228,7 +228,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
continue;
}
- QPixmap pixmap = appIcon( icon );
+ TQPixmap pixmap = appIcon( icon );
if (item)
newItem = new KAppTreeListItem( item, text, pixmap, false, isDir,
@@ -244,7 +244,7 @@ void KApplicationTree::addDesktopGroup( const QString &relPath, KAppTreeListItem
// ----------------------------------------------------------------------
-void KApplicationTree::slotItemHighlighted(QListViewItem* i)
+void KApplicationTree::slotItemHighlighted(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -261,7 +261,7 @@ void KApplicationTree::slotItemHighlighted(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::slotSelectionChanged(QListViewItem* i)
+void KApplicationTree::slotSelectionChanged(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -277,22 +277,22 @@ void KApplicationTree::slotSelectionChanged(QListViewItem* i)
// ----------------------------------------------------------------------
-void KApplicationTree::resizeEvent( QResizeEvent * e)
+void KApplicationTree::resizeEvent( TQResizeEvent * e)
{
- setColumnWidth(0, width()-QApplication::style().pixelMetric(QStyle::PM_ScrollBarExtent)
- -2*QApplication::style().pixelMetric(QStyle::PM_DefaultFrameWidth));
+ setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)
+ -2*TQApplication::style().pixelMetric(TQStyle::PM_DefaultFrameWidth));
KListView::resizeEvent(e);
}
// Prune empty directories from the tree
void KApplicationTree::cleanupTree()
{
- QListViewItem *item=firstChild();
+ TQListViewItem *item=firstChild();
while(item!=0)
{
if(item->isExpandable())
{
- QListViewItem *temp=item->itemBelow();
+ TQListViewItem *temp=item->itemBelow();
if(item->text(0)!=i18n("Applications"))
item->setOpen(false);
item=temp;
@@ -311,16 +311,16 @@ class KOpenWithDlgPrivate
{
public:
KOpenWithDlgPrivate() : saveNewApps(false) { };
- QPushButton* ok;
+ TQPushButton* ok;
bool saveNewApps;
KService::Ptr curService;
};
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, TQWidget* parent )
+ :TQDialog( parent, "openwith", true )
{
setCaption( i18n( "Open With" ) );
- QString text;
+ TQString text;
if( _urls.count() == 1 )
{
text = i18n("<qt>Select the program that should be used to open <b>%1</b>. "
@@ -331,27 +331,27 @@ KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, QWidget* parent )
// Should never happen ??
text = i18n( "Choose the name of the program with which to open the selected files." );
setServiceType( _urls );
- init( text, QString() );
+ init( text, TQString() );
}
-KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const QString&_text,
- const QString& _value, QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const KURL::List& _urls, const TQString&_text,
+ const TQString& _value, TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
- QString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
+ TQString caption = KStringHandler::csqueeze( _urls.first().prettyURL() );
if (_urls.count() > 1)
- caption += QString::fromLatin1("...");
+ caption += TQString::fromLatin1("...");
setCaption(caption);
setServiceType( _urls );
init( _text, _value );
}
-KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
- QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( const TQString &serviceType, const TQString& value,
+ TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application for %1").arg(serviceType));
- QString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
+ TQString text = i18n("<qt>Select the program for the file type: <b>%1</b>. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>").arg(serviceType);
qServiceType = serviceType;
@@ -360,15 +360,15 @@ KOpenWithDlg::KOpenWithDlg( const QString &serviceType, const QString& value,
remember->hide();
}
-KOpenWithDlg::KOpenWithDlg( QWidget *parent)
- :QDialog( parent, "openwith", true )
+KOpenWithDlg::KOpenWithDlg( TQWidget *parent)
+ :TQDialog( parent, "openwith", true )
{
setCaption(i18n("Choose Application"));
- QString text = i18n("<qt>Select a program. "
+ TQString text = i18n("<qt>Select a program. "
"If the program is not listed, enter the name or click "
"the browse button.</qt>");
- qServiceType = QString::null;
- init( text, QString::null );
+ qServiceType = TQString::null;
+ init( text, TQString::null );
}
void KOpenWithDlg::setServiceType( const KURL::List& _urls )
@@ -376,14 +376,14 @@ void KOpenWithDlg::setServiceType( const KURL::List& _urls )
if ( _urls.count() == 1 )
{
qServiceType = KMimeType::findByURL( _urls.first())->name();
- if (qServiceType == QString::fromLatin1("application/octet-stream"))
- qServiceType = QString::null;
+ if (qServiceType == TQString::fromLatin1("application/octet-stream"))
+ qServiceType = TQString::null;
}
else
- qServiceType = QString::null;
+ qServiceType = TQString::null;
}
-void KOpenWithDlg::init( const QString& _text, const QString& _value )
+void KOpenWithDlg::init( const TQString& _text, const TQString& _value )
{
d = new KOpenWithDlgPrivate;
bool bReadOnly = kapp && !kapp->authorize("shell_access");
@@ -392,18 +392,18 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
m_pService = 0L;
d->curService = 0L;
- QBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- label = new QLabel( _text, this );
+ label = new TQLabel( _text, this );
topLayout->addWidget(label);
- QHBoxLayout* hbox = new QHBoxLayout(topLayout);
+ TQHBoxLayout* hbox = new TQHBoxLayout(topLayout);
- QToolButton *clearButton = new QToolButton( this );
+ TQToolButton *clearButton = new TQToolButton( this );
clearButton->setIconSet( BarIcon( "locationbar_erase" ) );
clearButton->setFixedSize( clearButton->sizeHint() );
- connect( clearButton, SIGNAL( clicked() ), SLOT( slotClear() ) );
- QToolTip::add( clearButton, i18n( "Clear input field" ) );
+ connect( clearButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotClear() ) );
+ TQToolTip::add( clearButton, i18n( "Clear input field" ) );
hbox->addWidget( clearButton );
@@ -413,13 +413,13 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
KHistoryCombo *combo = new KHistoryCombo();
combo->setDuplicatesEnabled( false );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- int max = kc->readNumEntry( QString::fromLatin1("Maximum history"), 15 );
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ int max = kc->readNumEntry( TQString::fromLatin1("Maximum history"), 15 );
combo->setMaxCount( max );
- int mode = kc->readNumEntry(QString::fromLatin1("CompletionMode"),
+ int mode = kc->readNumEntry(TQString::fromLatin1("CompletionMode"),
KGlobalSettings::completionMode());
combo->setCompletionMode((KGlobalSettings::Completion)mode);
- QStringList list = kc->readListEntry( QString::fromLatin1("History") );
+ TQStringList list = kc->readListEntry( TQString::fromLatin1("History") );
combo->setHistoryItems( list, true );
edit = new KURLRequester( combo, this );
}
@@ -432,7 +432,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
}
edit->setURL( _value );
- QWhatsThis::add(edit,i18n(
+ TQWhatsThis::add(edit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -453,38 +453,38 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
edit->comboBox()->setAutoDeleteCompletionObject( true );
}
- connect ( edit, SIGNAL(returnPressed()), SLOT(slotOK()) );
- connect ( edit, SIGNAL(textChanged(const QString&)), SLOT(slotTextChanged()) );
+ connect ( edit, TQT_SIGNAL(returnPressed()), TQT_SLOT(slotOK()) );
+ connect ( edit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(slotTextChanged()) );
m_pTree = new KApplicationTree( this );
topLayout->addWidget(m_pTree);
- connect( m_pTree, SIGNAL( selected( const QString&, const QString& ) ),
- SLOT( slotSelected( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( highlighted( const QString&, const QString& ) ),
- SLOT( slotHighlighted( const QString&, const QString& ) ) );
- connect( m_pTree, SIGNAL( doubleClicked(QListViewItem*) ),
- SLOT( slotDbClick() ) );
+ connect( m_pTree, TQT_SIGNAL( selected( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotSelected( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( highlighted( const TQString&, const TQString& ) ),
+ TQT_SLOT( slotHighlighted( const TQString&, const TQString& ) ) );
+ connect( m_pTree, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ TQT_SLOT( slotDbClick() ) );
- terminal = new QCheckBox( i18n("Run in &terminal"), this );
+ terminal = new TQCheckBox( i18n("Run in &terminal"), this );
if (bReadOnly)
terminal->hide();
- connect(terminal, SIGNAL(toggled(bool)), SLOT(slotTerminalToggled(bool)));
+ connect(terminal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotTerminalToggled(bool)));
topLayout->addWidget(terminal);
- QBoxLayout* nocloseonexitLayout = new QHBoxLayout( 0, 0, KDialog::spacingHint() );
- QSpacerItem* spacer = new QSpacerItem( 20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ TQBoxLayout* nocloseonexitLayout = new TQHBoxLayout( 0, 0, KDialog::spacingHint() );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
nocloseonexitLayout->addItem( spacer );
- nocloseonexit = new QCheckBox( i18n("&Do not close when command exits"), this );
+ nocloseonexit = new TQCheckBox( i18n("&Do not close when command exits"), this );
nocloseonexit->setChecked( false );
nocloseonexit->setDisabled( true );
// check to see if we use konsole if not disable the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
if (bReadOnly || preferredTerminal != "konsole")
nocloseonexit->hide();
@@ -494,7 +494,7 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
if (!qServiceType.isNull())
{
- remember = new QCheckBox(i18n("&Remember application association for this type of file"), this);
+ remember = new TQCheckBox(i18n("&Remember application association for this type of file"), this);
// remember->setChecked(true);
topLayout->addWidget(remember);
}
@@ -507,10 +507,10 @@ void KOpenWithDlg::init( const QString& _text, const QString& _value )
d->ok = b->addButton( KStdGuiItem::ok() );
d->ok->setDefault( true );
- connect( d->ok, SIGNAL( clicked() ), SLOT( slotOK() ) );
+ connect( d->ok, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOK() ) );
- QPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
- connect( cancel, SIGNAL( clicked() ), SLOT( reject() ) );
+ TQPushButton* cancel = b->addButton( KStdGuiItem::cancel() );
+ connect( cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( reject() ) );
b->layout();
topLayout->addWidget( b );
@@ -536,14 +536,14 @@ KOpenWithDlg::~KOpenWithDlg()
void KOpenWithDlg::slotClear()
{
- edit->setURL(QString::null);
+ edit->setURL(TQString::null);
edit->setFocus();
}
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec )
+void KOpenWithDlg::slotSelected( const TQString& /*_name*/, const TQString& _exec )
{
kdDebug(250)<<"KOpenWithDlg::slotSelected"<<endl;
KService::Ptr pService = d->curService;
@@ -554,7 +554,7 @@ void KOpenWithDlg::slotSelected( const QString& /*_name*/, const QString& _exec
// ----------------------------------------------------------------------
-void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
+void KOpenWithDlg::slotHighlighted( const TQString& _name, const TQString& )
{
kdDebug(250)<<"KOpenWithDlg::slotHighlighted"<<endl;
qName = _name;
@@ -563,7 +563,7 @@ void KOpenWithDlg::slotHighlighted( const QString& _name, const QString& )
{
// ### indicate that default value was restored
terminal->setChecked(d->curService->terminal());
- QString terminalOptions = d->curService->terminalOptions();
+ TQString terminalOptions = d->curService->terminalOptions();
nocloseonexit->setChecked( (terminalOptions.contains( "--noclose" ) > 0) );
m_terminaldirty = false; // slotTerminalToggled changed it
}
@@ -603,12 +603,12 @@ void KOpenWithDlg::setSaveNewApplications(bool b)
void KOpenWithDlg::slotOK()
{
- QString typedExec(edit->url());
- QString fullExec(typedExec);
+ TQString typedExec(edit->url());
+ TQString fullExec(typedExec);
- QString serviceName;
- QString initialServiceName;
- QString preferredTerminal;
+ TQString serviceName;
+ TQString initialServiceName;
+ TQString preferredTerminal;
m_pService = d->curService;
if (!m_pService) {
// No service selected - check the command line
@@ -632,7 +632,7 @@ void KOpenWithDlg::slotOK()
// also ok if we find the exact same service (well, "kwrite" == "kwrite %U"
if ( serv && serv->type() == "Application")
{
- QString exec = serv->exec();
+ TQString exec = serv->exec();
fullExec = exec;
exec.replace("%u", "", false);
exec.replace("%f", "", false);
@@ -651,7 +651,7 @@ void KOpenWithDlg::slotOK()
if (!ok) // service was found, but it was different -> keep looking
{
++i;
- serviceName = initialServiceName + "-" + QString::number(i);
+ serviceName = initialServiceName + "-" + TQString::number(i);
}
}
while (!ok);
@@ -666,13 +666,13 @@ void KOpenWithDlg::slotOK()
if (terminal->isChecked())
{
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- preferredTerminal = confGroup.readPathEntry("TerminalApplication", QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ preferredTerminal = confGroup.readPathEntry("TerminalApplication", TQString::fromLatin1("konsole"));
m_command = preferredTerminal;
// only add --noclose when we are sure it is konsole we're using
if (preferredTerminal == "konsole" && nocloseonexit->isChecked())
- m_command += QString::fromLatin1(" --noclose");
- m_command += QString::fromLatin1(" -e ");
+ m_command += TQString::fromLatin1(" --noclose");
+ m_command += TQString::fromLatin1(" -e ");
m_command += edit->url();
kdDebug(250) << "Setting m_command to " << m_command << endl;
}
@@ -690,7 +690,7 @@ void KOpenWithDlg::slotOK()
if (!bRemember && !d->saveNewApps)
{
// Create temp service
- m_pService = new KService(initialServiceName, fullExec, QString::null);
+ m_pService = new KService(initialServiceName, fullExec, TQString::null);
if (terminal->isChecked())
{
m_pService->setTerminal(true);
@@ -706,9 +706,9 @@ void KOpenWithDlg::slotOK()
// wanted. The other possibility is that they have asked for the
// association to be remembered. Create/update service.
- QString newPath;
- QString oldPath;
- QString menuId;
+ TQString newPath;
+ TQString oldPath;
+ TQString menuId;
if (m_pService)
{
oldPath = m_pService->desktopEntryPath();
@@ -740,7 +740,7 @@ void KOpenWithDlg::slotOK()
{
desktop = new KDesktopFile(newPath);
}
- desktop->writeEntry("Type", QString::fromLatin1("Application"));
+ desktop->writeEntry("Type", TQString::fromLatin1("Application"));
desktop->writeEntry("Name", initialServiceName);
desktop->writePathEntry("Exec", fullExec);
if (terminal->isChecked())
@@ -759,7 +759,7 @@ void KOpenWithDlg::slotOK()
if (bRemember || d->saveNewApps)
{
- QStringList mimeList = desktop->readListEntry("MimeType", ';');
+ TQStringList mimeList = desktop->readListEntry("MimeType", ';');
if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType))
mimeList.append(qServiceType);
desktop->writeEntry("MimeType", mimeList, ';');
@@ -786,7 +786,7 @@ void KOpenWithDlg::slotOK()
accept();
}
-QString KOpenWithDlg::text() const
+TQString KOpenWithDlg::text() const
{
if (!m_command.isEmpty())
return m_command;
@@ -814,16 +814,16 @@ void KOpenWithDlg::accept()
combo->addToHistory( edit->url() );
KConfig *kc = KGlobal::config();
- KConfigGroupSaver ks( kc, QString::fromLatin1("Open-with settings") );
- kc->writeEntry( QString::fromLatin1("History"), combo->historyItems() );
- kc->writeEntry(QString::fromLatin1("CompletionMode"),
+ KConfigGroupSaver ks( kc, TQString::fromLatin1("Open-with settings") );
+ kc->writeEntry( TQString::fromLatin1("History"), combo->historyItems() );
+ kc->writeEntry(TQString::fromLatin1("CompletionMode"),
combo->completionMode());
// don't store the completion-list, as it contains all of KURLCompletion's
// executables
kc->sync();
}
- QDialog::accept();
+ TQDialog::accept();
}
@@ -832,7 +832,7 @@ void KOpenWithDlg::accept()
#ifndef KDE_NO_COMPAT
bool KFileOpenWithHandler::displayOpenWithDialog( const KURL::List& urls )
{
- KOpenWithDlg l( urls, i18n("Open with:"), QString::null, 0L );
+ KOpenWithDlg l( urls, i18n("Open with:"), TQString::null, 0L );
if ( l.exec() )
{
KService::Ptr service = l.service();
diff --git a/kio/kfile/kopenwith.h b/kio/kfile/kopenwith.h
index c343816aa..8d34e22b7 100644
--- a/kio/kfile/kopenwith.h
+++ b/kio/kfile/kopenwith.h
@@ -20,7 +20,7 @@
#ifndef __open_with_h__
#define __open_with_h__
-#include <qdialog.h>
+#include <tqdialog.h>
#include <kurl.h>
#include <krun.h>
@@ -43,7 +43,7 @@ class KOpenWithDlgPrivate;
*
* @author David Faure <faure@kde.org>
*/
-class KIO_EXPORT KOpenWithDlg : public QDialog //#TODO: Use KDialogBase for KDE4
+class KIO_EXPORT KOpenWithDlg : public TQDialog //#TODO: Use KDialogBase for KDE4
{
Q_OBJECT
public:
@@ -56,7 +56,7 @@ public:
* if the dialog is used to choose an application but not for some particular URLs.
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, TQWidget *parent = 0L );
/**
* Create a dialog that asks for a application to open a given
@@ -67,8 +67,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const KURL::List& urls, const QString& text, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const KURL::List& urls, const TQString& text, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select a service for a given service type.
@@ -78,8 +78,8 @@ public:
* @param value is the initial value of the line
* @param parent parent widget
*/
- KOpenWithDlg( const QString& serviceType, const QString& value,
- QWidget *parent = 0L );
+ KOpenWithDlg( const TQString& serviceType, const TQString& value,
+ TQWidget *parent = 0L );
/**
* Create a dialog to select an application
@@ -88,7 +88,7 @@ public:
* @param parent parent widget
* @since 3.1
*/
- KOpenWithDlg( QWidget *parent = 0L );
+ KOpenWithDlg( TQWidget *parent = 0L );
/**
* Destructor
@@ -98,7 +98,7 @@ public:
/**
* @return the text the user entered
*/
- QString text() const;
+ TQString text() const;
/**
* Hide the "Do not &close when command exits" Checkbox
*/
@@ -129,8 +129,8 @@ public slots:
* The slot for clearing the edit widget
*/
void slotClear();
- void slotSelected( const QString&_name, const QString& _exec );
- void slotHighlighted( const QString& _name, const QString& _exec );
+ void slotSelected( const TQString&_name, const TQString& _exec );
+ void slotHighlighted( const TQString& _name, const TQString& _exec );
void slotTextChanged();
void slotTerminalToggled(bool);
void slotDbClick();
@@ -138,7 +138,7 @@ public slots:
protected slots:
/**
- * Reimplemented from QDialog::accept() to save history of the combobox
+ * Reimplemented from TQDialog::accept() to save history of the combobox
*/
virtual void accept();
@@ -156,19 +156,19 @@ protected:
* @param text appears as a label on top of the entry box.
* @param value is the initial value of the line
*/
- void init( const QString& text, const QString& value );
+ void init( const TQString& text, const TQString& value );
KURLRequester * edit;
- QString m_command;
+ TQString m_command;
KApplicationTree* m_pTree;
- QLabel *label;
+ TQLabel *label;
- QString qName, qServiceType;
+ TQString qName, qServiceType;
bool m_terminaldirty;
- QCheckBox *terminal, *remember, *nocloseonexit;
- QPushButton *UNUSED;
- QPushButton *UNUSED2;
+ TQCheckBox *terminal, *remember, *nocloseonexit;
+ TQPushButton *UNUSED;
+ TQPushButton *UNUSED2;
KService::Ptr m_pService;
diff --git a/kio/kfile/kopenwith_p.h b/kio/kfile/kopenwith_p.h
index ccee6bd22..1b73cdaa0 100644
--- a/kio/kfile/kopenwith_p.h
+++ b/kio/kfile/kopenwith_p.h
@@ -41,20 +41,20 @@ class KAppTreeListItem : public QListViewItem
{
bool parsed;
bool directory;
- QString path;
- QString exec;
+ TQString path;
+ TQString exec;
protected:
- int compare(QListViewItem *i, int col, bool ascending ) const;
- QString key(int column, bool ascending) const;
+ int compare(TQListViewItem *i, int col, bool ascending ) const;
+ TQString key(int column, bool ascending) const;
- void init(const QPixmap& pixmap, bool parse, bool dir, const QString &_path, const QString &exec);
+ void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString &_path, const TQString &exec);
public:
- KAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
- KAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString &p, const QString &c );
+ KAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
+ KAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString &p, const TQString &c );
bool isDirectory();
protected:
@@ -73,27 +73,27 @@ class KApplicationTree : public KListView
{
Q_OBJECT
public:
- KApplicationTree( QWidget *parent );
+ KApplicationTree( TQWidget *parent );
/**
* Add a group of .desktop/.kdelnk entries
*/
- void addDesktopGroup( const QString &relPath, KAppTreeListItem *item = 0 );
+ void addDesktopGroup( const TQString &relPath, KAppTreeListItem *item = 0 );
bool isDirSel();
protected:
- void resizeEvent( QResizeEvent *_ev );
+ void resizeEvent( TQResizeEvent *_ev );
KAppTreeListItem* currentitem;
void cleanupTree();
public slots:
- void slotItemHighlighted(QListViewItem* i);
- void slotSelectionChanged(QListViewItem* i);
+ void slotItemHighlighted(TQListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
signals:
- void selected( const QString& _name, const QString& _exec );
- void highlighted( const QString& _name, const QString& _exec );
+ void selected( const TQString& _name, const TQString& _exec );
+ void highlighted( const TQString& _name, const TQString& _exec );
};
/* ------------------------------------------------------------------------- */
diff --git a/kio/kfile/kpreviewprops.cpp b/kio/kfile/kpreviewprops.cpp
index 986e46597..7458fb244 100644
--- a/kio/kfile/kpreviewprops.cpp
+++ b/kio/kfile/kpreviewprops.cpp
@@ -19,7 +19,7 @@
#include "kpreviewprops.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kfilemetapreview.h>
#include <kglobalsettings.h>
@@ -46,15 +46,15 @@ KPreviewPropsPlugin::KPreviewPropsPlugin(KPropertiesDialog* props)
void KPreviewPropsPlugin::createLayout()
{
// let the dialog create the page frame
- QFrame* topframe = properties->addPage(i18n("P&review"));
- topframe->setFrameStyle(QFrame::NoFrame);
+ TQFrame* topframe = properties->addPage(i18n("P&review"));
+ topframe->setFrameStyle(TQFrame::NoFrame);
- QVBoxLayout* tmp = new QVBoxLayout(topframe, 0, 0);
+ TQVBoxLayout* tmp = new TQVBoxLayout(topframe, 0, 0);
preview = new KFileMetaPreview(topframe);
tmp->addWidget(preview) ;
- connect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), SLOT( aboutToShowPage( QWidget* ) ) );
+ connect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
}
KPreviewPropsPlugin::~KPreviewPropsPlugin()
@@ -77,12 +77,12 @@ bool KPreviewPropsPlugin::supports( KFileItemList _items )
return true;
}
-void KPreviewPropsPlugin::aboutToShowPage( QWidget* widget )
+void KPreviewPropsPlugin::aboutToShowPage( TQWidget* widget )
{
if ( widget != preview->parent() )
return;
- disconnect( properties, SIGNAL( aboutToShowPage( QWidget * ) ), this, SLOT( aboutToShowPage( QWidget* ) ) );
+ disconnect( properties, TQT_SIGNAL( aboutToShowPage( TQWidget * ) ), this, TQT_SLOT( aboutToShowPage( TQWidget* ) ) );
preview->showPreview(properties->item()->url());
}
diff --git a/kio/kfile/kpreviewprops.h b/kio/kfile/kpreviewprops.h
index be3019083..c34e70763 100644
--- a/kio/kfile/kpreviewprops.h
+++ b/kio/kfile/kpreviewprops.h
@@ -44,7 +44,7 @@ public:
static bool supports( KFileItemList _items );
private slots:
- void aboutToShowPage( QWidget* );
+ void aboutToShowPage( TQWidget* );
private:
KFileMetaPreview* preview;
diff --git a/kio/kfile/kpreviewwidgetbase.cpp b/kio/kfile/kpreviewwidgetbase.cpp
index 43b2b5fdc..979da919e 100644
--- a/kio/kfile/kpreviewwidgetbase.cpp
+++ b/kio/kfile/kpreviewwidgetbase.cpp
@@ -7,21 +7,21 @@
*/
#include "kpreviewwidgetbase.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
class KPreviewWidgetBase::KPreviewWidgetBasePrivate
{
public:
- QStringList supportedMimeTypes;
+ TQStringList supportedMimeTypes;
};
-QPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
+TQPtrDict<KPreviewWidgetBase::KPreviewWidgetBasePrivate> * KPreviewWidgetBase::s_private;
-KPreviewWidgetBase::KPreviewWidgetBase( QWidget *parent, const char *name )
- : QWidget( parent, name )
+KPreviewWidgetBase::KPreviewWidgetBase( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
if ( !s_private )
- s_private = new QPtrDict<KPreviewWidgetBasePrivate>();
+ s_private = new TQPtrDict<KPreviewWidgetBasePrivate>();
s_private->insert( this, new KPreviewWidgetBasePrivate() );
}
@@ -36,12 +36,12 @@ KPreviewWidgetBase::~KPreviewWidgetBase()
}
}
-void KPreviewWidgetBase::setSupportedMimeTypes( const QStringList& mimeTypes )
+void KPreviewWidgetBase::setSupportedMimeTypes( const TQStringList& mimeTypes )
{
d()->supportedMimeTypes = mimeTypes;
}
-QStringList KPreviewWidgetBase::supportedMimeTypes() const
+TQStringList KPreviewWidgetBase::supportedMimeTypes() const
{
return d()->supportedMimeTypes;
}
diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h
index 80f3f4ff4..3a2a49b31 100644
--- a/kio/kfile/kpreviewwidgetbase.h
+++ b/kio/kfile/kpreviewwidgetbase.h
@@ -21,8 +21,8 @@
#ifndef __KPREVIEWWIDGETBASE_H__
#define __KPREVIEWWIDGETBASE_H__
-#include <qptrdict.h>
-#include <qwidget.h>
+#include <tqptrdict.h>
+#include <tqwidget.h>
#include <kdelibs_export.h>
@@ -54,7 +54,7 @@ public:
* @param parent The KFileDialog this preview widget is going to be used in
* @param name The internal name of this object
*/
- KPreviewWidgetBase(QWidget *parent, const char *name=0);
+ KPreviewWidgetBase(TQWidget *parent, const char *name=0);
~KPreviewWidgetBase();
public slots:
@@ -73,10 +73,10 @@ public slots:
*/
virtual void clearPreview() = 0;
- QStringList supportedMimeTypes() const;
+ TQStringList supportedMimeTypes() const;
protected:
- void setSupportedMimeTypes( const QStringList& mimeTypes );
+ void setSupportedMimeTypes( const TQStringList& mimeTypes );
protected:
virtual void virtual_hook( int, void* ) {};
@@ -86,7 +86,7 @@ private:
KPreviewWidgetBasePrivate * d() const {
return s_private->find( const_cast<KPreviewWidgetBase*>( this ) );
}
- static QPtrDict<KPreviewWidgetBasePrivate> * s_private;
+ static TQPtrDict<KPreviewWidgetBasePrivate> * s_private;
};
#endif
diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp
index f02e80eaf..9e26f12bb 100644
--- a/kio/kfile/kpropertiesdialog.cpp
+++ b/kio/kfile/kpropertiesdialog.cpp
@@ -54,24 +54,24 @@ extern "C" {
#include <algorithm>
#include <functional>
-#include <qfile.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qstrlist.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qstyle.h>
-#include <qprogressbar.h>
-#include <qvbox.h>
-#include <qvaluevector.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqstrlist.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
+#include <tqprogressbar.h>
+#include <tqvbox.h>
+#include <tqvaluevector.h>
#ifdef USE_POSIX_ACL
extern "C" {
@@ -139,7 +139,7 @@ extern "C" {
# include <win32_utils.h>
#endif
-static QString nameFromFileName(QString nameStr)
+static TQString nameFromFileName(TQString nameStr)
{
if ( nameStr.endsWith(".desktop") )
nameStr.truncate( nameStr.length() - 8 );
@@ -168,11 +168,11 @@ public:
{
}
bool m_aborted:1;
- QWidget* fileSharePage;
+ TQWidget* fileSharePage;
};
KPropertiesDialog::KPropertiesDialog (KFileItem* item,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed, i18n( "Properties for %1" ).arg(KIO::decodeFileName(item->url().fileName())),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
@@ -188,8 +188,8 @@ KPropertiesDialog::KPropertiesDialog (KFileItem* item,
init (modal, autoShow);
}
-KPropertiesDialog::KPropertiesDialog (const QString& title,
- QWidget* parent, const char* name, bool modal)
+KPropertiesDialog::KPropertiesDialog (const TQString& title,
+ TQWidget* parent, const char* name, bool modal)
: KDialogBase (KDialogBase::Tabbed, i18n ("Properties for %1").arg(title),
KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok,
parent, name, modal)
@@ -200,7 +200,7 @@ KPropertiesDialog::KPropertiesDialog (const QString& title,
}
KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
// TODO: replace <never used> with "Properties for 1 item". It's very confusing how it has to be translated otherwise
@@ -226,7 +226,7 @@ KPropertiesDialog::KPropertiesDialog (KFileItemList _items,
#ifndef KDE_NO_COMPAT
KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now unused */,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -246,7 +246,7 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url, mode_t /* _mode is now u
#endif
KPropertiesDialog::KPropertiesDialog (const KURL& _url,
- QWidget* parent, const char* name,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_url.fileName())),
@@ -265,8 +265,8 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _url,
}
KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent, const char* name,
+ const TQString& _defaultName,
+ TQWidget* parent, const char* name,
bool modal, bool autoShow)
: KDialogBase (KDialogBase::Tabbed,
i18n( "Properties for %1" ).arg(KIO::decodeFileName(_tempUrl.fileName())),
@@ -286,11 +286,11 @@ KPropertiesDialog::KPropertiesDialog (const KURL& _tempUrl, const KURL& _current
init (modal, autoShow);
}
-bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
+bool KPropertiesDialog::showDialog(KFileItem* item, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
- QString localPath = item->localPath();
+ TQString localPath = item->localPath();
if (!localPath.isEmpty())
return showWin32FilePropertyDialog(localPath);
#endif
@@ -298,7 +298,7 @@ bool KPropertiesDialog::showDialog(KFileItem* item, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KURL& _url, TQWidget* parent,
const char* name, bool modal)
{
#ifdef Q_WS_WIN
@@ -309,7 +309,7 @@ bool KPropertiesDialog::showDialog(const KURL& _url, QWidget* parent,
return true;
}
-bool KPropertiesDialog::showDialog(const KFileItemList& _items, QWidget* parent,
+bool KPropertiesDialog::showDialog(const KFileItemList& _items, TQWidget* parent,
const char* name, bool modal)
{
if (_items.count()==1)
@@ -341,7 +341,7 @@ void KPropertiesDialog::showFileSharingPage()
}
}
-void KPropertiesDialog::setFileSharingPage(QWidget* page) {
+void KPropertiesDialog::setFileSharingPage(TQWidget* page) {
d->fileSharePage = page;
}
@@ -372,8 +372,8 @@ KPropertiesDialog::~KPropertiesDialog()
void KPropertiesDialog::insertPlugin (KPropsDlgPlugin* plugin)
{
- connect (plugin, SIGNAL (changed ()),
- plugin, SLOT (setDirty ()));
+ connect (plugin, TQT_SIGNAL (changed ()),
+ plugin, TQT_SLOT (setDirty ()));
m_pageList.append (plugin);
}
@@ -511,12 +511,12 @@ void KPropertiesDialog::insertPages()
return;
KFileItem *item = m_items.first();
- QString mimetype = item->mimetype();
+ TQString mimetype = item->mimetype();
if ( mimetype.isEmpty() )
return;
- QString query = QString::fromLatin1(
+ TQString query = TQString::fromLatin1(
"('KPropsDlg/Plugin' in ServiceTypes) and "
"((not exist [X-KDE-Protocol]) or "
" ([X-KDE-Protocol] == '%1' ) )" ).arg(item->url().protocol());
@@ -551,7 +551,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
assert(!m_singleUrl.isEmpty());
// If we have an Desktop page, set it dirty, so that a full file is saved locally
// Same for a URL page (because of the Name= hack)
- for ( QPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
+ for ( TQPtrListIterator<KPropsDlgPlugin> it(m_pageList); it.current(); ++it )
if ( it.current()->isA("KExecPropsPlugin") || // KDE4 remove me
it.current()->isA("KURLPropsPlugin") ||
it.current()->isA("KDesktopPropsPlugin"))
@@ -562,7 +562,7 @@ void KPropertiesDialog::updateUrl( const KURL& _newUrl )
}
}
-void KPropertiesDialog::rename( const QString& _name )
+void KPropertiesDialog::rename( const TQString& _name )
{
Q_ASSERT( m_items.count() == 1 );
kdDebug(250) << "KPropertiesDialog::rename " << _name << endl;
@@ -575,7 +575,7 @@ void KPropertiesDialog::rename( const QString& _name )
}
else
{
- QString tmpurl = m_singleUrl.url();
+ TQString tmpurl = m_singleUrl.url();
if ( tmpurl.at(tmpurl.length() - 1) == '/')
// It's a directory, so strip the trailing slash first
tmpurl.truncate( tmpurl.length() - 1);
@@ -604,7 +604,7 @@ public:
};
KPropsDlgPlugin::KPropsDlgPlugin( KPropertiesDialog *_props )
-: QObject( _props, 0L )
+: TQObject( _props, 0L )
{
d = new KPropsDlgPluginPrivate;
properties = _props;
@@ -629,10 +629,10 @@ bool KPropsDlgPlugin::isDesktopFile( KFileItem * _item )
if ( !S_ISREG( _item->mode() ) )
return false;
- QString t( url.path() );
+ TQString t( url.path() );
// only if readable
- FILE *f = fopen( QFile::encodeName(t), "r" );
+ FILE *f = fopen( TQFile::encodeName(t), "r" );
if ( f == 0L )
return false;
fclose(f);
@@ -680,15 +680,15 @@ public:
}
KDirSize * dirSizeJob;
- QTimer *dirSizeUpdateTimer;
- QFrame *m_frame;
+ TQTimer *dirSizeUpdateTimer;
+ TQFrame *m_frame;
bool bMultiple;
bool bIconChanged;
bool bKDesktopMode;
bool bDesktopFile;
- QLabel *m_freeSpaceLabel;
- QString mimeType;
- QString oldFileName;
+ TQLabel *m_freeSpaceLabel;
+ TQString mimeType;
+ TQString oldFileName;
KLineEdit* m_lined;
};
@@ -698,7 +698,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d = new KFilePropsPluginPrivate;
d->bMultiple = (properties->items().count() > 1);
d->bIconChanged = false;
- d->bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ d->bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
d->bDesktopFile = KDesktopPropsPlugin::supports(properties->items());
kdDebug(250) << "KFilePropsPlugin::KFilePropsPlugin bMultiple=" << d->bMultiple << endl;
@@ -712,15 +712,15 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
kdDebug() << "url=" << url << " bDesktopFile=" << bDesktopFile << " isLocal=" << isLocal << " isReallyLocal=" << isReallyLocal << endl;
mode_t mode = item->mode();
bool hasDirs = item->isDir() && !item->isLink();
- bool hasRoot = url.path() == QString::fromLatin1("/");
- QString iconStr = KMimeType::iconForURL(url, mode);
- QString directory = properties->kurl().directory();
- QString protocol = properties->kurl().protocol();
- QString mimeComment = item->mimeComment();
+ bool hasRoot = url.path() == TQString::fromLatin1("/");
+ TQString iconStr = KMimeType::iconForURL(url, mode);
+ TQString directory = properties->kurl().directory();
+ TQString protocol = properties->kurl().protocol();
+ TQString mimeComment = item->mimeComment();
d->mimeType = item->mimetype();
bool hasTotalSize;
KIO::filesize_t totalSize = item->size(hasTotalSize);
- QString magicMimeComment;
+ TQString magicMimeComment;
if ( isLocal ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->name() != KMimeType::defaultMimeType() )
@@ -728,7 +728,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
// Those things only apply to 'single file' mode
- QString filename = QString::null;
+ TQString filename = TQString::null;
bool isTrash = false;
bool isDevice = false;
m_bFromTemplate = false;
@@ -739,9 +739,9 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_frame = properties->addPage (i18n("&General"));
- QVBoxLayout *vbl = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout *vbl = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint(), "vbl");
- QGridLayout *grid = new QGridLayout(0, 3); // unknown rows
+ TQGridLayout *grid = new TQGridLayout(0, 3); // unknown rows
grid->setColStretch(0, 0);
grid->setColStretch(1, 0);
grid->setColStretch(2, 1);
@@ -751,7 +751,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !d->bMultiple )
{
- QString path;
+ TQString path;
if ( !m_bFromTemplate ) {
isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 );
if ( properties->kurl().protocol().find("device", 0, false)==0)
@@ -814,18 +814,18 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( KMimeType::iconForURL(url, mode) != iconStr )
iconStr = "kmultiple";
if ( url.directory() != directory )
- directory = QString::null;
+ directory = TQString::null;
if ( url.protocol() != protocol )
- protocol = QString::null;
+ protocol = TQString::null;
if ( !mimeComment.isNull() && (*it)->mimeComment() != mimeComment )
- mimeComment = QString::null;
+ mimeComment = TQString::null;
if ( isLocal && !magicMimeComment.isNull() ) {
KMimeType::Ptr magicMimeType = KMimeType::findByFileContent( url.path() );
if ( magicMimeType->comment() != magicMimeComment )
- magicMimeComment = QString::null;
+ magicMimeComment = TQString::null;
}
- if ( url.path() == QString::fromLatin1("/") )
+ if ( url.path() == TQString::fromLatin1("/") )
hasRoot = true;
if ( (*it)->isDir() && !(*it)->isLink() )
{
@@ -853,13 +853,13 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !isDevice && !isTrash && (bDesktopFile || S_ISDIR(mode)) && !d->bMultiple /*not implemented for multiple*/ )
{
KIconButton *iconButton = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * iconButton->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * iconButton->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconButton->setFixedSize(bsize, bsize);
iconButton->setIconSize(48);
iconButton->setStrictIconSize(false);
// This works for everything except Device icons on unmounted devices
// So we have to really open .desktop files
- QString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
+ TQString iconStr = KMimeType::findByURL( url, mode )->icon( url, isLocal );
if ( bDesktopFile && isLocal )
{
KDesktopFile config( url.path(), true );
@@ -873,11 +873,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
iconButton->setIconType( KIcon::Desktop, KIcon::FileSystem );
iconButton->setIcon(iconStr);
iconArea = iconButton;
- connect( iconButton, SIGNAL( iconChanged(QString) ),
- this, SLOT( slotIconChanged() ) );
+ connect( iconButton, TQT_SIGNAL( iconChanged(TQString) ),
+ this, TQT_SLOT( slotIconChanged() ) );
} else {
- QLabel *iconLabel = new QLabel( d->m_frame );
- int bsize = 66 + 2 * iconLabel->style().pixelMetric(QStyle::PM_ButtonMargin);
+ TQLabel *iconLabel = new TQLabel( d->m_frame );
+ int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap( KGlobal::iconLoader()->loadIcon( iconStr, KIcon::Desktop, 48) );
iconArea = iconLabel;
@@ -886,7 +886,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (d->bMultiple || isTrash || isDevice || hasRoot)
{
- QLabel *lab = new QLabel(d->m_frame );
+ TQLabel *lab = new TQLabel(d->m_frame );
if ( d->bMultiple )
lab->setText( KIO::itemsSummaryString( iFileCount + iDirCount, iFileCount, iDirCount, 0, false ) );
else
@@ -900,7 +900,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setFocus();
// Enhanced rename: Don't highlight the file extension.
- QString pattern;
+ TQString pattern;
KServiceTypeFactory::self()->findFromPattern( filename, &pattern );
if (!pattern.isEmpty() && pattern.at(0)=='*' && pattern.find('*',1)==-1)
d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1);
@@ -911,8 +911,8 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
d->m_lined->setSelection(0, lastDot);
}
- connect( d->m_lined, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( nameFileChanged(const QString & ) ) );
+ connect( d->m_lined, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( nameFileChanged(const TQString & ) ) );
}
grid->addWidget(nameArea, curRow++, 2);
@@ -921,31 +921,31 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QLabel *l;
+ TQLabel *l;
if ( !mimeComment.isEmpty() && !isDevice && !isTrash)
{
- l = new QLabel(i18n("Type:"), d->m_frame );
+ l = new TQLabel(i18n("Type:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- QHBox *box = new QHBox(d->m_frame);
+ TQHBox *box = new TQHBox(d->m_frame);
box->setSpacing(20);
- l = new QLabel(mimeComment, box );
+ l = new TQLabel(mimeComment, box );
#ifdef Q_WS_X11
//TODO: wrap for win32 or mac?
- QPushButton *button = new QPushButton(box);
+ TQPushButton *button = new TQPushButton(box);
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("configure"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("configure"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
button->setIconSet( iconSet );
button->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
if ( d->mimeType == KMimeType::defaultMimeType() )
- QToolTip::add(button, i18n("Create new file type"));
+ TQToolTip::add(button, i18n("Create new file type"));
else
- QToolTip::add(button, i18n("Edit file type"));
+ TQToolTip::add(button, i18n("Edit file type"));
- connect( button, SIGNAL( clicked() ), SLOT( slotEditFileType() ));
+ connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEditFileType() ));
if (!kapp->authorizeKAction("editfiletype"))
button->hide();
@@ -956,16 +956,16 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if ( !magicMimeComment.isEmpty() && magicMimeComment != mimeComment )
{
- l = new QLabel(i18n("Contents:"), d->m_frame );
+ l = new TQLabel(i18n("Contents:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- l = new QLabel(magicMimeComment, d->m_frame );
+ l = new TQLabel(magicMimeComment, d->m_frame );
grid->addWidget(l, curRow++, 2);
}
if ( !directory.isEmpty() )
{
- l = new QLabel( i18n("Location:"), d->m_frame );
+ l = new TQLabel( i18n("Location:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( d->m_frame );
@@ -974,10 +974,10 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if( hasDirs || hasTotalSize ) {
- l = new QLabel(i18n("Size:"), d->m_frame );
+ l = new TQLabel(i18n("Size:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- m_sizeLabel = new QLabel( d->m_frame );
+ m_sizeLabel = new TQLabel( d->m_frame );
grid->addWidget( m_sizeLabel, curRow++, 2 );
} else {
m_sizeLabel = 0;
@@ -994,14 +994,14 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
else // Directory
{
- QHBoxLayout * sizelay = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * sizelay = new TQHBoxLayout(KDialog::spacingHint());
grid->addLayout( sizelay, curRow++, 2 );
// buttons
- m_sizeDetermineButton = new QPushButton( i18n("Calculate"), d->m_frame );
- m_sizeStopButton = new QPushButton( i18n("Stop"), d->m_frame );
- connect( m_sizeDetermineButton, SIGNAL( clicked() ), this, SLOT( slotSizeDetermine() ) );
- connect( m_sizeStopButton, SIGNAL( clicked() ), this, SLOT( slotSizeStop() ) );
+ m_sizeDetermineButton = new TQPushButton( i18n("Calculate"), d->m_frame );
+ m_sizeStopButton = new TQPushButton( i18n("Stop"), d->m_frame );
+ connect( m_sizeDetermineButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeDetermine() ) );
+ connect( m_sizeStopButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSizeStop() ) );
sizelay->addWidget(m_sizeDetermineButton, 0);
sizelay->addWidget(m_sizeStopButton, 0);
sizelay->addStretch(10); // so that the buttons don't grow horizontally
@@ -1017,7 +1017,7 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
}
if (!d->bMultiple && item->isLink()) {
- l = new QLabel(i18n("Points to:"), d->m_frame );
+ l = new TQLabel(i18n("Points to:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel(item->linkDest(), d->m_frame );
@@ -1026,38 +1026,38 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
if (!d->bMultiple) // Dates for multiple don't make much sense...
{
- QDateTime dt;
+ TQDateTime dt;
bool hasTime;
time_t tim = item->time(KIO::UDS_CREATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Created:"), d->m_frame );
+ l = new TQLabel(i18n("Created:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_MODIFICATION_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Modified:"), d->m_frame );
+ l = new TQLabel(i18n("Modified:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
tim = item->time(KIO::UDS_ACCESS_TIME, hasTime);
if ( hasTime )
{
- l = new QLabel(i18n("Accessed:"), d->m_frame );
+ l = new TQLabel(i18n("Accessed:"), d->m_frame );
grid->addWidget(l, curRow, 0);
dt.setTime_t( tim );
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
+ l = new TQLabel(KGlobal::locale()->formatDateTime(dt), d->m_frame );
grid->addWidget(l, curRow++, 2);
}
}
@@ -1068,35 +1068,35 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props )
grid->addMultiCellWidget(sep, curRow, curRow, 0, 2);
++curRow;
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
if (mountPoint != "/")
{
- l = new QLabel(i18n("Mounted on:"), d->m_frame );
+ l = new TQLabel(i18n("Mounted on:"), d->m_frame );
grid->addWidget(l, curRow, 0);
l = new KSqueezedTextLabel( mountPoint, d->m_frame );
grid->addWidget( l, curRow++, 2 );
}
- l = new QLabel(i18n("Free disk space:"), d->m_frame );
+ l = new TQLabel(i18n("Free disk space:"), d->m_frame );
grid->addWidget(l, curRow, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
grid->addWidget( d->m_freeSpaceLabel, curRow++, 2 );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
vbl->addStretch(1);
}
-// QString KFilePropsPlugin::tabName () const
+// TQString KFilePropsPlugin::tabName () const
// {
// return i18n ("&General");
// }
@@ -1109,7 +1109,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
if (ro)
{
// Don't put the initial focus on the line edit when it is ro
- QPushButton *button = properties->actionButton(KDialogBase::Ok);
+ TQPushButton *button = properties->actionButton(KDialogBase::Ok);
if (button)
button->setFocus();
}
@@ -1119,7 +1119,7 @@ void KFilePropsPlugin::setFileNameReadOnly( bool ro )
void KFilePropsPlugin::slotEditFileType()
{
#ifdef Q_WS_X11
- QString mime;
+ TQString mime;
if ( d->mimeType == KMimeType::defaultMimeType() ) {
int pos = d->oldFileName.findRev( '.' );
if ( pos != -1 )
@@ -1130,9 +1130,9 @@ void KFilePropsPlugin::slotEditFileType()
else
mime = d->mimeType;
//TODO: wrap for win32 or mac?
- QString keditfiletype = QString::fromLatin1("keditfiletype");
+ TQString keditfiletype = TQString::fromLatin1("keditfiletype");
KRun::runCommand( keditfiletype
- + " --parent " + QString::number( (ulong)properties->topLevelWidget()->winId())
+ + " --parent " + TQString::number( (ulong)properties->topLevelWidget()->winId())
+ " " + KProcess::quote(mime),
keditfiletype, keditfiletype /*unused*/);
#endif
@@ -1144,21 +1144,21 @@ void KFilePropsPlugin::slotIconChanged()
emit changed();
}
-void KFilePropsPlugin::nameFileChanged(const QString &text )
+void KFilePropsPlugin::nameFileChanged(const TQString &text )
{
properties->enableButtonOK(!text.isEmpty());
emit changed();
}
-void KFilePropsPlugin::determineRelativePath( const QString & path )
+void KFilePropsPlugin::determineRelativePath( const TQString & path )
{
// now let's make it relative
- QStringList dirs;
+ TQStringList dirs;
if (KBindingPropsPlugin::supports(properties->items()))
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("mime", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
}
else
{
@@ -1167,7 +1167,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
{
m_sRelativePath =KGlobal::dirs()->relativeLocation("xdgdata-apps", path);
if (m_sRelativePath.startsWith("/"))
- m_sRelativePath = QString::null;
+ m_sRelativePath = TQString::null;
else
m_sRelativePath = path;
}
@@ -1179,7 +1179,7 @@ void KFilePropsPlugin::determineRelativePath( const QString & path )
}
}
-void KFilePropsPlugin::slotFoundMountPoint( const QString&,
+void KFilePropsPlugin::slotFoundMountPoint( const TQString&,
unsigned long kBSize,
unsigned long /*kBUsed*/,
unsigned long kBAvail )
@@ -1197,7 +1197,7 @@ void KFilePropsPlugin::slotFoundMountPoint( const QString&,
void KFilePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceLabel->setText(
// xgettext:no-c-format -- Don't warn about translating the %1 out of %2 part.
@@ -1228,7 +1228,7 @@ void KFilePropsPlugin::slotDirSizeFinished( KIO::Job * job )
KIO::filesize_t totalSize = static_cast<KDirSize*>(job)->totalSize();
KIO::filesize_t totalFiles = static_cast<KDirSize*>(job)->totalFiles();
KIO::filesize_t totalSubdirs = static_cast<KDirSize*>(job)->totalSubdirs();
- m_sizeLabel->setText( QString::fromLatin1("%1 (%2)\n%3, %4")
+ m_sizeLabel->setText( TQString::fromLatin1("%1 (%2)\n%3, %4")
.arg(KIO::convertSize(totalSize))
.arg(KGlobal::locale()->formatNumber(totalSize, 0))
.arg(i18n("1 file","%n files",totalFiles))
@@ -1249,12 +1249,12 @@ void KFilePropsPlugin::slotSizeDetermine()
kdDebug(250) << " KFilePropsPlugin::slotSizeDetermine() properties->item()=" << properties->item() << endl;
kdDebug(250) << " URL=" << properties->item()->url().url() << endl;
d->dirSizeJob = KDirSize::dirSizeJob( properties->items() );
- d->dirSizeUpdateTimer = new QTimer(this);
- connect( d->dirSizeUpdateTimer, SIGNAL( timeout() ),
- SLOT( slotDirSizeUpdate() ) );
+ d->dirSizeUpdateTimer = new TQTimer(this);
+ connect( d->dirSizeUpdateTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( slotDirSizeUpdate() ) );
d->dirSizeUpdateTimer->start(500);
- connect( d->dirSizeJob, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotDirSizeFinished( KIO::Job * ) ) );
+ connect( d->dirSizeJob, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotDirSizeFinished( KIO::Job * ) ) );
m_sizeStopButton->setEnabled(true);
m_sizeDetermineButton->setEnabled(false);
@@ -1264,13 +1264,13 @@ void KFilePropsPlugin::slotSizeDetermine()
bool isLocal;
KFileItem * item = properties->item();
KURL url = item->mostLocalURL( isLocal );
- QString mountPoint = KIO::findPathMountPoint( url.path() );
+ TQString mountPoint = KIO::findPathMountPoint( url.path() );
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountPoint );
}
}
@@ -1301,8 +1301,8 @@ bool KFilePropsPlugin::supports( KFileItemList /*_items*/ )
}
// Don't do this at home
-void qt_enter_modal( QWidget *widget );
-void qt_leave_modal( QWidget *widget );
+void qt_enter_modal( TQWidget *widget );
+void qt_leave_modal( TQWidget *widget );
void KFilePropsPlugin::applyChanges()
{
@@ -1311,9 +1311,9 @@ void KFilePropsPlugin::applyChanges()
kdDebug(250) << "KFilePropsPlugin::applyChanges" << endl;
- if (nameArea->inherits("QLineEdit"))
+ if (nameArea->inherits("TQLineEdit"))
{
- QString n = ((QLineEdit *) nameArea)->text();
+ TQString n = ((TQLineEdit *) nameArea)->text();
// Remove trailing spaces (#4345)
while ( n[n.length()-1].isSpace() )
n.truncate( n.length() - 1 );
@@ -1331,7 +1331,7 @@ void KFilePropsPlugin::applyChanges()
KIO::Job * job = 0L;
KURL oldurl = properties->kurl();
- QString newFileName = KIO::encodeFileName(n);
+ TQString newFileName = KIO::encodeFileName(n);
if (d->bDesktopFile && !newFileName.endsWith(".desktop") && !newFileName.endsWith(".kdelnk"))
newFileName += ".desktop";
@@ -1351,12 +1351,12 @@ void KFilePropsPlugin::applyChanges()
else // Copying a template
job = KIO::copy( oldurl, properties->kurl() );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotCopyFinished( KIO::Job * ) ) );
- connect( job, SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
- SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotCopyFinished( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( renamed( KIO::Job *, const KURL &, const KURL & ) ),
+ TQT_SLOT( slotFileRenamed( KIO::Job *, const KURL &, const KURL & ) ) );
// wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -1412,7 +1412,7 @@ void KFilePropsPlugin::slotCopyFinished( KIO::Job * job )
// Renamed? Update Name field
if ( d->oldFileName != properties->kurl().fileName() || m_bFromTemplate ) {
KDesktopFile config( properties->kurl().path() );
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -1429,11 +1429,11 @@ void KFilePropsPlugin::applyIconChanges()
KURL url = properties->kurl();
url = KIO::NetAccess::mostLocalURL( url, properties );
if (url.isLocalFile()) {
- QString path;
+ TQString path;
if (S_ISDIR(properties->item()->mode()))
{
- path = url.path(1) + QString::fromLatin1(".directory");
+ path = url.path(1) + TQString::fromLatin1(".directory");
// don't call updateUrl because the other tabs (i.e. permissions)
// apply to the directory, not the .directory file.
}
@@ -1441,17 +1441,17 @@ void KFilePropsPlugin::applyIconChanges()
path = url.path();
// Get the default image
- QString str = KMimeType::findByURL( url,
+ TQString str = KMimeType::findByURL( url,
properties->item()->mode(),
true )->KServiceType::icon();
// Is it another one than the default ?
- QString sIcon;
+ TQString sIcon;
if ( str != iconButton->icon() )
sIcon = iconButton->icon();
// (otherwise write empty value)
kdDebug(250) << "**" << path << "**" << endl;
- QFile f( path );
+ TQFile f( path );
// If default icon and no .directory file -> don't create one
if ( !sIcon.isEmpty() || f.exists() )
@@ -1502,11 +1502,11 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *cbRecursive;
- QLabel *explanationLabel;
- QComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
- QCheckBox *extraCheckbox;
+ TQFrame *m_frame;
+ TQCheckBox *cbRecursive;
+ TQLabel *explanationLabel;
+ TQComboBox *ownerPermCombo, *groupPermCombo, *othersPermCombo;
+ TQCheckBox *extraCheckbox;
mode_t partialPermissions;
KFilePermissionsPropsPlugin::PermissionsMode pmode;
bool canChangePermissions;
@@ -1554,8 +1554,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->cbRecursive = 0L;
grpCombo = 0L; grpEdit = 0;
usrEdit = 0L;
- QString path = properties->kurl().path(-1);
- QString fname = properties->kurl().fileName();
+ TQString path = properties->kurl().path(-1);
+ TQString fname = properties->kurl().fileName();
bool isLocal = properties->kurl().isLocalFile();
bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 );
bool IamRoot = (geteuid() == 0);
@@ -1597,9 +1597,9 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->partialPermissions |= (*it)->permissions();
}
if ( (*it)->user() != strOwner )
- strOwner = QString::null;
+ strOwner = TQString::null;
if ( (*it)->group() != strGroup )
- strGroup = QString::null;
+ strGroup = TQString::null;
}
}
@@ -1621,7 +1621,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct passwd *myself = getpwuid( geteuid() );
if ( myself != 0L )
{
- isMyFile = (strOwner == QString::fromLocal8Bit(myself->pw_name));
+ isMyFile = (strOwner == TQString::fromLocal8Bit(myself->pw_name));
} else
kdWarning() << "I don't exist ?! geteuid=" << geteuid() << endl;
} else {
@@ -1638,24 +1638,24 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->m_frame = properties->addPage(i18n("&Permissions"));
- QBoxLayout *box = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
+ TQBoxLayout *box = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint() );
- QWidget *l;
- QLabel *lbl;
- QGroupBox *gb;
- QGridLayout *gl;
- QPushButton* pbAdvancedPerm = 0;
+ TQWidget *l;
+ TQLabel *lbl;
+ TQGroupBox *gb;
+ TQGridLayout *gl;
+ TQPushButton* pbAdvancedPerm = 0;
/* Group: Access Permissions */
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 7, 2);
+ gl = new TQGridLayout (gb->layout(), 7, 2);
gl->setColStretch(1, 1);
- l = d->explanationLabel = new QLabel( "", gb );
+ l = d->explanationLabel = new TQLabel( "", gb );
if (isLink)
d->explanationLabel->setText(i18n("This file is a link and does not have permissions.",
"All files are links and do not have permissions.",
@@ -1664,39 +1664,39 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
d->explanationLabel->setText(i18n("Only the owner can change permissions."));
gl->addMultiCellWidget(l, 0, 0, 0, 1);
- lbl = new QLabel( i18n("O&wner:"), gb);
+ lbl = new TQLabel( i18n("O&wner:"), gb);
gl->addWidget(lbl, 1, 0);
- l = d->ownerPermCombo = new QComboBox(gb);
+ l = d->ownerPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 1, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the owner is allowed to do."));
- lbl = new QLabel( i18n("Gro&up:"), gb);
+ lbl = new TQLabel( i18n("Gro&up:"), gb);
gl->addWidget(lbl, 2, 0);
- l = d->groupPermCombo = new QComboBox(gb);
+ l = d->groupPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 2, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that the members of the group are allowed to do."));
- lbl = new QLabel( i18n("O&thers:"), gb);
+ lbl = new TQLabel( i18n("O&thers:"), gb);
gl->addWidget(lbl, 3, 0);
- l = d->othersPermCombo = new QComboBox(gb);
+ l = d->othersPermCombo = new TQComboBox(gb);
lbl->setBuddy(l);
gl->addWidget(l, 3, 1);
- connect(l, SIGNAL( highlighted(int) ), this, SIGNAL( changed() ));
- QWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
+ connect(l, TQT_SIGNAL( highlighted(int) ), this, TQT_SIGNAL( changed() ));
+ TQWhatsThis::add(l, i18n("Specifies the actions that all users, who are neither "
"owner nor in the group, are allowed to do."));
if (!isLink) {
- l = d->extraCheckbox = new QCheckBox(hasDir ?
+ l = d->extraCheckbox = new TQCheckBox(hasDir ?
i18n("Only own&er can rename and delete folder content") :
i18n("Is &executable"),
gb );
- connect( d->extraCheckbox, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ connect( d->extraCheckbox, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
gl->addWidget(l, 4, 1);
- QWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
+ TQWhatsThis::add(l, hasDir ? i18n("Enable this option to allow only the folder's owner to "
"delete or rename the contained files and folders. Other "
"users can only add new files, which requires the 'Modify "
"Content' permission.")
@@ -1704,28 +1704,28 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
"sense for programs and scripts. It is required when you want to "
"execute them."));
- QLayoutItem *spacer = new QSpacerItem(0, 20, QSizePolicy::Minimum, QSizePolicy::Expanding);
+ TQLayoutItem *spacer = new TQSpacerItem(0, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding);
gl->addMultiCell(spacer, 5, 5, 0, 1);
- pbAdvancedPerm = new QPushButton(i18n("A&dvanced Permissions"), gb);
+ pbAdvancedPerm = new TQPushButton(i18n("A&dvanced Permissions"), gb);
gl->addMultiCellWidget(pbAdvancedPerm, 6, 6, 0, 1, AlignRight);
- connect(pbAdvancedPerm, SIGNAL( clicked() ), this, SLOT( slotShowAdvancedPermissions() ));
+ connect(pbAdvancedPerm, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotShowAdvancedPermissions() ));
}
else
d->extraCheckbox = 0;
/**** Group: Ownership ****/
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Ownership"), d->m_frame );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget (gb);
- gl = new QGridLayout (gb->layout(), 4, 3);
+ gl = new TQGridLayout (gb->layout(), 4, 3);
gl->addRowSpacing(0, 10);
/*** Set Owner ***/
- l = new QLabel( i18n("User:"), gb );
+ l = new TQLabel( i18n("User:"), gb );
gl->addWidget (l, 1, 0);
/* GJ: Don't autocomplete more than 1000 users. This is a kind of random
@@ -1738,7 +1738,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
struct group *ge;
/* File owner: For root, offer a KLineEdit with autocompletion.
- * For a user, who can never chown() a file, offer a QLabel.
+ * For a user, who can never chown() a file, offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1747,25 +1747,25 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
kcom->setOrder(KCompletion::Sorted);
setpwent();
for (i=0; ((user = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(user->pw_name));
+ kcom->addItem(TQString::fromLatin1(user->pw_name));
endpwent();
usrEdit->setCompletionMode((i < maxEntries) ? KGlobalSettings::CompletionAuto :
KGlobalSettings::CompletionNone);
usrEdit->setText(strOwner);
gl->addWidget(usrEdit, 1, 1);
- connect( usrEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( usrEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strOwner, gb);
+ l = new TQLabel(strOwner, gb);
gl->addWidget(l, 1, 1);
}
/*** Set Group ***/
- QStringList groupList;
- QCString strUser;
+ TQStringList groupList;
+ TQCString strUser;
user = getpwuid(geteuid());
if (user != 0L)
strUser = user->pw_name;
@@ -1775,7 +1775,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
for (i=0; ((ge = getgrent()) != 0L) && (i < maxEntries); i++)
{
if (IamRoot)
- groupList += QString::fromLatin1(ge->gr_name);
+ groupList += TQString::fromLatin1(ge->gr_name);
else
{
/* pick the groups to which the user belongs */
@@ -1783,7 +1783,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
char * member;
while ((member = *members) != 0L) {
if (strUser == member) {
- groupList += QString::fromLocal8Bit(ge->gr_name);
+ groupList += TQString::fromLocal8Bit(ge->gr_name);
break;
}
++members;
@@ -1796,7 +1796,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
/* add the effective Group to the list .. */
ge = getgrgid (getegid());
if (ge) {
- QString name = QString::fromLatin1(ge->gr_name);
+ TQString name = TQString::fromLatin1(ge->gr_name);
if (name.isEmpty())
name.setNum(ge->gr_gid);
if (groupList.find(name) == groupList.end())
@@ -1811,14 +1811,14 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
if (!isMyGroup)
groupList += strGroup;
- l = new QLabel( i18n("Group:"), gb );
+ l = new TQLabel( i18n("Group:"), gb );
gl->addWidget (l, 2, 0);
/* Set group: if possible to change:
* - Offer a KLineEdit for root, since he can change to any group.
- * - Offer a QComboBox for a normal user, since he can change to a fixed
+ * - Offer a TQComboBox for a normal user, since he can change to a fixed
* (small) set of groups only.
- * If not changeable: offer a QLabel.
+ * If not changeable: offer a TQLabel.
*/
if (IamRoot && isLocal)
{
@@ -1830,21 +1830,21 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
grpEdit->setCompletionMode(KGlobalSettings::CompletionAuto);
grpEdit->setText(strGroup);
gl->addWidget(grpEdit, 2, 1);
- connect( grpEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( grpEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else if ((groupList.count() > 1) && isMyFile && isLocal)
{
- grpCombo = new QComboBox(gb, "combogrouplist");
+ grpCombo = new TQComboBox(gb, "combogrouplist");
grpCombo->insertStringList(groupList);
grpCombo->setCurrentItem(groupList.findIndex(strGroup));
gl->addWidget(grpCombo, 2, 1);
- connect( grpCombo, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
+ connect( grpCombo, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
else
{
- l = new QLabel(strGroup, gb);
+ l = new TQLabel(strGroup, gb);
gl->addWidget(l, 2, 1);
}
@@ -1853,8 +1853,8 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
// "Apply recursive" checkbox
if ( hasDir && !isLink && !isTrash )
{
- d->cbRecursive = new QCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
- connect( d->cbRecursive, SIGNAL( clicked() ), this, SIGNAL( changed() ) );
+ d->cbRecursive = new TQCheckBox( i18n("Apply changes to all subfolders and their contents"), d->m_frame );
+ connect( d->cbRecursive, TQT_SIGNAL( clicked() ), this, TQT_SIGNAL( changed() ) );
box->addWidget( d->cbRecursive );
}
@@ -1873,7 +1873,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr
}
#ifdef USE_POSIX_ACL
-static bool fileSystemSupportsACL( const QCString& pathCString )
+static bool fileSystemSupportsACL( const TQCString& pathCString )
{
bool fileSystemSupportsACLs = false;
#ifdef Q_OS_FREEBSD
@@ -1901,118 +1901,118 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
KDialogBase dlg(properties, 0, true, i18n("Advanced Permissions"),
KDialogBase::Ok|KDialogBase::Cancel);
- QLabel *l, *cl[3];
- QGroupBox *gb;
- QGridLayout *gl;
+ TQLabel *l, *cl[3];
+ TQGroupBox *gb;
+ TQGridLayout *gl;
- QVBox *mainVBox = dlg.makeVBoxMainWidget();
+ TQVBox *mainVBox = dlg.makeVBoxMainWidget();
// Group: Access Permissions
- gb = new QGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
+ gb = new TQGroupBox ( 0, Qt::Vertical, i18n("Access Permissions"), mainVBox );
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
- gl = new QGridLayout (gb->layout(), 6, 6);
+ gl = new TQGridLayout (gb->layout(), 6, 6);
gl->addRowSpacing(0, 10);
- QValueVector<QWidget*> theNotSpecials;
+ TQValueVector<TQWidget*> theNotSpecials;
- l = new QLabel(i18n("Class"), gb );
+ l = new TQLabel(i18n("Class"), gb );
gl->addWidget(l, 1, 0);
theNotSpecials.append( l );
if (isDir)
- l = new QLabel( i18n("Show\nEntries"), gb );
+ l = new TQLabel( i18n("Show\nEntries"), gb );
else
- l = new QLabel( i18n("Read"), gb );
+ l = new TQLabel( i18n("Read"), gb );
gl->addWidget (l, 1, 1);
theNotSpecials.append( l );
- QString readWhatsThis;
+ TQString readWhatsThis;
if (isDir)
readWhatsThis = i18n("This flag allows viewing the content of the folder.");
else
readWhatsThis = i18n("The Read flag allows viewing the content of the file.");
- QWhatsThis::add(l, readWhatsThis);
+ TQWhatsThis::add(l, readWhatsThis);
if (isDir)
- l = new QLabel( i18n("Write\nEntries"), gb );
+ l = new TQLabel( i18n("Write\nEntries"), gb );
else
- l = new QLabel( i18n("Write"), gb );
+ l = new TQLabel( i18n("Write"), gb );
gl->addWidget (l, 1, 2);
theNotSpecials.append( l );
- QString writeWhatsThis;
+ TQString writeWhatsThis;
if (isDir)
writeWhatsThis = i18n("This flag allows adding, renaming and deleting of files. "
"Note that deleting and renaming can be limited using the Sticky flag.");
else
writeWhatsThis = i18n("The Write flag allows modifying the content of the file.");
- QWhatsThis::add(l, writeWhatsThis);
+ TQWhatsThis::add(l, writeWhatsThis);
- QString execWhatsThis;
+ TQString execWhatsThis;
if (isDir) {
- l = new QLabel( i18n("Enter folder", "Enter"), gb );
+ l = new TQLabel( i18n("Enter folder", "Enter"), gb );
execWhatsThis = i18n("Enable this flag to allow entering the folder.");
}
else {
- l = new QLabel( i18n("Exec"), gb );
+ l = new TQLabel( i18n("Exec"), gb );
execWhatsThis = i18n("Enable this flag to allow executing the file as a program.");
}
- QWhatsThis::add(l, execWhatsThis);
+ TQWhatsThis::add(l, execWhatsThis);
theNotSpecials.append( l );
// GJ: Add space between normal and special modes
- QSize size = l->sizeHint();
+ TQSize size = l->sizeHint();
size.setWidth(size.width() + 15);
l->setFixedSize(size);
gl->addWidget (l, 1, 3);
- l = new QLabel( i18n("Special"), gb );
+ l = new TQLabel( i18n("Special"), gb );
gl->addMultiCellWidget(l, 1, 1, 4, 5);
- QString specialWhatsThis;
+ TQString specialWhatsThis;
if (isDir)
specialWhatsThis = i18n("Special flag. Valid for the whole folder, the exact "
"meaning of the flag can be seen in the right hand column.");
else
specialWhatsThis = i18n("Special flag. The exact meaning of the flag can be seen "
"in the right hand column.");
- QWhatsThis::add(l, specialWhatsThis);
+ TQWhatsThis::add(l, specialWhatsThis);
- cl[0] = new QLabel( i18n("User"), gb );
+ cl[0] = new TQLabel( i18n("User"), gb );
gl->addWidget (cl[0], 2, 0);
theNotSpecials.append( cl[0] );
- cl[1] = new QLabel( i18n("Group"), gb );
+ cl[1] = new TQLabel( i18n("Group"), gb );
gl->addWidget (cl[1], 3, 0);
theNotSpecials.append( cl[1] );
- cl[2] = new QLabel( i18n("Others"), gb );
+ cl[2] = new TQLabel( i18n("Others"), gb );
gl->addWidget (cl[2], 4, 0);
theNotSpecials.append( cl[2] );
- l = new QLabel(i18n("Set UID"), gb);
+ l = new TQLabel(i18n("Set UID"), gb);
gl->addWidget(l, 2, 5);
- QString setUidWhatsThis;
+ TQString setUidWhatsThis;
if (isDir)
setUidWhatsThis = i18n("If this flag is set, the owner of this folder will be "
"the owner of all new files.");
else
setUidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the owner.");
- QWhatsThis::add(l, setUidWhatsThis);
+ TQWhatsThis::add(l, setUidWhatsThis);
- l = new QLabel(i18n("Set GID"), gb);
+ l = new TQLabel(i18n("Set GID"), gb);
gl->addWidget(l, 3, 5);
- QString setGidWhatsThis;
+ TQString setGidWhatsThis;
if (isDir)
setGidWhatsThis = i18n("If this flag is set, the group of this folder will be "
"set for all new files.");
else
setGidWhatsThis = i18n("If this file is an executable and the flag is set, it will "
"be executed with the permissions of the group.");
- QWhatsThis::add(l, setGidWhatsThis);
+ TQWhatsThis::add(l, setGidWhatsThis);
- l = new QLabel(i18n("File permission", "Sticky"), gb);
+ l = new TQLabel(i18n("File permission", "Sticky"), gb);
gl->addWidget(l, 4, 5);
- QString stickyWhatsThis;
+ TQString stickyWhatsThis;
if (isDir)
stickyWhatsThis = i18n("If the Sticky flag is set on a folder, only the owner "
"and root can delete or rename files. Otherwise everybody "
@@ -2020,7 +2020,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
else
stickyWhatsThis = i18n("The Sticky flag on a file is ignored on Linux, but may "
"be used on some systems");
- QWhatsThis::add(l, stickyWhatsThis);
+ TQWhatsThis::add(l, stickyWhatsThis);
mode_t aPermissions, aPartialPermissions;
mode_t dummy1, dummy2;
@@ -2052,10 +2052,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
}
// Draw Checkboxes
- QCheckBox *cba[3][4];
+ TQCheckBox *cba[3][4];
for (int row = 0; row < 3 ; ++row) {
for (int col = 0; col < 4; ++col) {
- QCheckBox *cb = new QCheckBox( gb );
+ TQCheckBox *cb = new TQCheckBox( gb );
if ( col != 3 ) theNotSpecials.append( cb );
cba[row][col] = cb;
cb->setChecked(aPermissions & fperm[row][col]);
@@ -2071,24 +2071,24 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
gl->addWidget (cb, row+2, col+1);
switch(col) {
case 0:
- QWhatsThis::add(cb, readWhatsThis);
+ TQWhatsThis::add(cb, readWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, writeWhatsThis);
+ TQWhatsThis::add(cb, writeWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, execWhatsThis);
+ TQWhatsThis::add(cb, execWhatsThis);
break;
case 3:
switch(row) {
case 0:
- QWhatsThis::add(cb, setUidWhatsThis);
+ TQWhatsThis::add(cb, setUidWhatsThis);
break;
case 1:
- QWhatsThis::add(cb, setGidWhatsThis);
+ TQWhatsThis::add(cb, setGidWhatsThis);
break;
case 2:
- QWhatsThis::add(cb, stickyWhatsThis);
+ TQWhatsThis::add(cb, stickyWhatsThis);
break;
}
break;
@@ -2102,11 +2102,11 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
// FIXME make it work with partial entries
if ( properties->items().count() == 1 ) {
- QCString pathCString = QFile::encodeName( properties->item()->url().path() );
+ TQCString pathCString = TQFile::encodeName( properties->item()->url().path() );
d->fileSystemSupportsACLs = fileSystemSupportsACL( pathCString );
}
if ( d->fileSystemSupportsACLs ) {
- std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &QWidget::hide ) );
+ std::for_each( theNotSpecials.begin(), theNotSpecials.end(), std::mem_fun( &TQWidget::hide ) );
extendedACLs = new KACLEditWidget( mainVBox );
if ( d->extendedACL.isValid() && d->extendedACL.isExtended() )
extendedACLs->setACL( d->extendedACL );
@@ -2132,10 +2132,10 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
for (int col = 0; col < 4; ++col) {
switch (cba[row][col]->state())
{
- case QCheckBox::On:
+ case TQCheckBox::On:
orPermissions |= fperm[row][col];
//fall through
- case QCheckBox::Off:
+ case TQCheckBox::Off:
andPermissions &= ~fperm[row][col];
break;
default: // NoChange
@@ -2171,7 +2171,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions() {
emit changed();
}
-// QString KFilePermissionsPropsPlugin::tabName () const
+// TQString KFilePermissionsPropsPlugin::tabName () const
// {
// return i18n ("&Permissions");
// }
@@ -2193,7 +2193,7 @@ bool KFilePermissionsPropsPlugin::supports( KFileItemList _items )
}
// sets a combo box in the Access Control frame
-void KFilePermissionsPropsPlugin::setComboContent(QComboBox *combo, PermissionsTarget target,
+void KFilePermissionsPropsPlugin::setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial) {
combo->clear();
if (d->pmode == PermissionsOnlyLinks) {
@@ -2379,11 +2379,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOwner;
if ((m & UniOwner) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRUSR | S_IWUSR);
else {
andFilePermissions &= ~(S_IRUSR | S_IWUSR | S_IXUSR);
- if ((m & S_IRUSR) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRUSR) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXUSR;
}
@@ -2398,11 +2398,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniGroup;
if ((m & UniGroup) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IRGRP | S_IWGRP);
else {
andFilePermissions &= ~(S_IRGRP | S_IWGRP | S_IXGRP);
- if ((m & S_IRGRP) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IRGRP) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXGRP;
}
@@ -2417,11 +2417,11 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
orFilePermissions |= m & UniOthers;
if ((m & UniOthers) &&
((d->pmode == PermissionsMixed) ||
- ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == QButton::NoChange))))
+ ((d->pmode == PermissionsOnlyFiles) && (d->extraCheckbox->state() == TQButton::NoChange))))
andFilePermissions &= ~(S_IROTH | S_IWOTH);
else {
andFilePermissions &= ~(S_IROTH | S_IWOTH | S_IXOTH);
- if ((m & S_IROTH) && (d->extraCheckbox->state() == QButton::On))
+ if ((m & S_IROTH) && (d->extraCheckbox->state() == TQButton::On))
orFilePermissions |= S_IXOTH;
}
@@ -2432,9 +2432,9 @@ void KFilePermissionsPropsPlugin::getPermissionMasks(mode_t &andFilePermissions,
}
if (((d->pmode == PermissionsMixed) || (d->pmode == PermissionsOnlyDirs)) &&
- (d->extraCheckbox->state() != QButton::NoChange)) {
+ (d->extraCheckbox->state() != TQButton::NoChange)) {
andDirPermissions &= ~S_ISVTX;
- if (d->extraCheckbox->state() == QButton::On)
+ if (d->extraCheckbox->state() == TQButton::On)
orDirPermissions |= S_ISVTX;
}
}
@@ -2461,7 +2461,7 @@ void KFilePermissionsPropsPlugin::applyChanges()
andDirPermissions = d->partialPermissions;
}
- QString owner, group;
+ TQString owner, group;
if (usrEdit)
owner = usrEdit->text();
if (grpEdit)
@@ -2470,10 +2470,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
group = grpCombo->currentText();
if (owner == strOwner)
- owner = QString::null; // no change
+ owner = TQString::null; // no change
if (group == strGroup)
- group = QString::null;
+ group = TQString::null;
bool recursive = d->cbRecursive && d->cbRecursive->isChecked();
bool permissionChange = false;
@@ -2509,10 +2509,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2525,10 +2525,10 @@ void KFilePermissionsPropsPlugin::applyChanges()
if ( defaultACLChange && d->fileSystemSupportsACLs )
job->addMetaData( "DEFAULT_ACL_STRING", d->defaultACL.isValid()?d->defaultACL.asString():"ACL_DELETE" );
- connect( job, SIGNAL( result( KIO::Job * ) ),
- SLOT( slotChmodResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
+ TQT_SLOT( slotChmodResult( KIO::Job * ) ) );
// Wait for job
- QWidget dummy(0,0,WType_Dialog|WShowModal);
+ TQWidget dummy(0,0,WType_Dialog|WShowModal);
qt_enter_modal(&dummy);
qApp->enter_loop();
qt_leave_modal(&dummy);
@@ -2557,7 +2557,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
@@ -2565,19 +2565,19 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
{
d = new KURLPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("U&RL"));
- QVBoxLayout *layout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel *l;
- l = new QLabel( d->m_frame, "Label_1" );
+ TQLabel *l;
+ l = new TQLabel( d->m_frame, "Label_1" );
l->setText( i18n("URL:") );
layout->addWidget(l);
URLEdit = new KURLRequester( d->m_frame, "URL Requester" );
layout->addWidget(URLEdit);
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -2589,8 +2589,8 @@ KURLPropsPlugin::KURLPropsPlugin( KPropertiesDialog *_props )
if ( !URLStr.isNull() )
URLEdit->setURL( URLStr );
- connect( URLEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( URLEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
layout->addStretch (1);
}
@@ -2600,7 +2600,7 @@ KURLPropsPlugin::~KURLPropsPlugin()
delete d;
}
-// QString KURLPropsPlugin::tabName () const
+// TQString KURLPropsPlugin::tabName () const
// {
// return i18n ("U&RL");
// }
@@ -2621,9 +2621,9 @@ bool KURLPropsPlugin::supports( KFileItemList _items )
void KURLPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
"sufficient access to write to <b>%1</b>.</qt>").arg(path));
@@ -2633,13 +2633,13 @@ void KURLPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Link"));
+ config.writeEntry( "Type", TQString::fromLatin1("Link"));
config.writePathEntry( "URL", URLEdit->url() );
// Users can't create a Link .desktop file with a Name field,
// but distributions can. Update the Name field in that case.
if ( config.hasKey("Name") )
{
- QString nameStr = nameFromFileName(properties->kurl().fileName());
+ TQString nameStr = nameFromFileName(properties->kurl().fileName());
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
@@ -2663,7 +2663,7 @@ public:
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
};
KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2674,10 +2674,10 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
mimeEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
- QBoxLayout *mainlayout = new QVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
- QLabel* tmpQLabel;
+ TQBoxLayout *mainlayout = new TQVBoxLayout(d->m_frame, 0, KDialog::spacingHint());
+ TQLabel* tmpQLabel;
- tmpQLabel = new QLabel( d->m_frame, "Label_1" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_1" );
tmpQLabel->setText( i18n("Pattern ( example: *.html;*.htm )") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2689,7 +2689,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
patternEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(patternEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_2" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_2" );
tmpQLabel->setText( i18n("Mime Type") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2700,7 +2700,7 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
mimeEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(mimeEdit, 1);
- tmpQLabel = new QLabel( d->m_frame, "Label_3" );
+ tmpQLabel = new TQLabel( d->m_frame, "Label_3" );
tmpQLabel->setText( i18n("Comment") );
tmpQLabel->setMinimumSize(tmpQLabel->sizeHint());
mainlayout->addWidget(tmpQLabel, 1);
@@ -2711,22 +2711,22 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
commentEdit->setFixedHeight( fontHeight );
mainlayout->addWidget(commentEdit, 1);
- cbAutoEmbed = new QCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
+ cbAutoEmbed = new TQCheckBox( i18n("Left click previews"), d->m_frame, "cbAutoEmbed" );
mainlayout->addWidget(cbAutoEmbed, 1);
mainlayout->addStretch (10);
mainlayout->activate();
- QFile f( _props->kurl().path() );
+ TQFile f( _props->kurl().path() );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( _props->kurl().path() );
config.setDesktopGroup();
- QString patternStr = config.readEntry( "Patterns" );
- QString iconStr = config.readEntry( "Icon" );
- QString commentStr = config.readEntry( "Comment" );
+ TQString patternStr = config.readEntry( "Patterns" );
+ TQString iconStr = config.readEntry( "Icon" );
+ TQString commentStr = config.readEntry( "Comment" );
m_sMimeStr = config.readEntry( "MimeType" );
if ( !patternStr.isEmpty() )
@@ -2741,14 +2741,14 @@ KBindingPropsPlugin::KBindingPropsPlugin( KPropertiesDialog *_props ) : KPropsDl
else
cbAutoEmbed->setNoChange();
- connect( patternEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( mimeEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( cbAutoEmbed, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
+ connect( patternEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( mimeEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( cbAutoEmbed, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KBindingPropsPlugin::~KBindingPropsPlugin()
@@ -2756,7 +2756,7 @@ KBindingPropsPlugin::~KBindingPropsPlugin()
delete d;
}
-// QString KBindingPropsPlugin::tabName () const
+// TQString KBindingPropsPlugin::tabName () const
// {
// return i18n ("A&ssociation");
// }
@@ -2777,8 +2777,8 @@ bool KBindingPropsPlugin::supports( KFileItemList _items )
void KBindingPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
@@ -2790,14 +2790,14 @@ void KBindingPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("MimeType") );
+ config.writeEntry( "Type", TQString::fromLatin1("MimeType") );
config.writeEntry( "Patterns", patternEdit->text() );
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment",
commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "MimeType", mimeEdit->text() );
- if ( cbAutoEmbed->state() == QButton::NoChange )
+ if ( cbAutoEmbed->state() == TQButton::NoChange )
config.deleteEntry( "X-KDE-AutoEmbed", false );
else
config.writeEntry( "X-KDE-AutoEmbed", cbAutoEmbed->isChecked() );
@@ -2820,11 +2820,11 @@ public:
{
}
- QFrame *m_frame;
- QStringList mountpointlist;
- QLabel *m_freeSpaceText;
- QLabel *m_freeSpaceLabel;
- QProgressBar *m_freeSpaceBar;
+ TQFrame *m_frame;
+ TQStringList mountpointlist;
+ TQLabel *m_freeSpaceText;
+ TQLabel *m_freeSpaceLabel;
+ TQProgressBar *m_freeSpaceBar;
};
KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgPlugin( _props )
@@ -2832,73 +2832,73 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
d = new KDevicePropsPluginPrivate;
d->m_frame = properties->addPage(i18n("De&vice"));
- QStringList devices;
+ TQStringList devices;
KMountPoint::List mountPoints = KMountPoint::possibleMountPoints();
for(KMountPoint::List::ConstIterator it = mountPoints.begin();
it != mountPoints.end(); ++it)
{
KMountPoint *mp = *it;
- QString mountPoint = mp->mountPoint();
- QString device = mp->mountedFrom();
+ TQString mountPoint = mp->mountPoint();
+ TQString device = mp->mountedFrom();
kdDebug()<<"mountPoint :"<<mountPoint<<" device :"<<device<<" mp->mountType() :"<<mp->mountType()<<endl;
if ((mountPoint != "-") && (mountPoint != "none") && !mountPoint.isEmpty()
&& device != "none")
{
- devices.append( device + QString::fromLatin1(" (")
- + mountPoint + QString::fromLatin1(")") );
+ devices.append( device + TQString::fromLatin1(" (")
+ + mountPoint + TQString::fromLatin1(")") );
m_devicelist.append(device);
d->mountpointlist.append(mountPoint);
}
}
- QGridLayout *layout = new QGridLayout( d->m_frame, 0, 2, 0,
+ TQGridLayout *layout = new TQGridLayout( d->m_frame, 0, 2, 0,
KDialog::spacingHint());
layout->setColStretch(1, 1);
- QLabel* label;
- label = new QLabel( d->m_frame );
+ TQLabel* label;
+ label = new TQLabel( d->m_frame );
label->setText( devices.count() == 0 ?
i18n("Device (/dev/fd0):") : // old style
i18n("Device:") ); // new style (combobox)
layout->addWidget(label, 0, 0);
- device = new QComboBox( true, d->m_frame, "ComboBox_device" );
+ device = new TQComboBox( true, d->m_frame, "ComboBox_device" );
device->insertStringList( devices );
layout->addWidget(device, 0, 1);
- connect( device, SIGNAL( activated( int ) ),
- this, SLOT( slotActivated( int ) ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotActivated( int ) ) );
- readonly = new QCheckBox( d->m_frame, "CheckBox_readonly" );
+ readonly = new TQCheckBox( d->m_frame, "CheckBox_readonly" );
readonly->setText( i18n("Read only") );
layout->addWidget(readonly, 1, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( i18n("File system:") );
layout->addWidget(label, 2, 0);
- QLabel *fileSystem = new QLabel( d->m_frame );
+ TQLabel *fileSystem = new TQLabel( d->m_frame );
layout->addWidget(fileSystem, 2, 1);
- label = new QLabel( d->m_frame );
+ label = new TQLabel( d->m_frame );
label->setText( devices.count()==0 ?
i18n("Mount point (/mnt/floppy):") : // old style
i18n("Mount point:")); // new style (combobox)
layout->addWidget(label, 3, 0);
- mountpoint = new QLabel( d->m_frame, "LineEdit_mountpoint" );
+ mountpoint = new TQLabel( d->m_frame, "LineEdit_mountpoint" );
layout->addWidget(mountpoint, 3, 1);
// show disk free
- d->m_freeSpaceText = new QLabel(i18n("Free disk space:"), d->m_frame );
+ d->m_freeSpaceText = new TQLabel(i18n("Free disk space:"), d->m_frame );
layout->addWidget(d->m_freeSpaceText, 4, 0);
- d->m_freeSpaceLabel = new QLabel( d->m_frame );
+ d->m_freeSpaceLabel = new TQLabel( d->m_frame );
layout->addWidget( d->m_freeSpaceLabel, 4, 1 );
- d->m_freeSpaceBar = new QProgressBar( d->m_frame, "freeSpaceBar" );
+ d->m_freeSpaceBar = new TQProgressBar( d->m_frame, "freeSpaceBar" );
layout->addMultiCellWidget(d->m_freeSpaceBar, 5, 5, 0, 1);
// we show it in the slot when we know the values
@@ -2910,29 +2910,29 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
layout->addMultiCellWidget(sep, 6, 6, 0, 1);
unmounted = new KIconButton( d->m_frame );
- int bsize = 66 + 2 * unmounted->style().pixelMetric(QStyle::PM_ButtonMargin);
+ int bsize = 66 + 2 * unmounted->style().pixelMetric(TQStyle::PM_ButtonMargin);
unmounted->setFixedSize(bsize, bsize);
unmounted->setIconType(KIcon::Desktop, KIcon::Device);
layout->addWidget(unmounted, 7, 0);
- label = new QLabel( i18n("Unmounted Icon"), d->m_frame );
+ label = new TQLabel( i18n("Unmounted Icon"), d->m_frame );
layout->addWidget(label, 7, 1);
layout->setRowStretch(8, 1);
- QString path( _props->kurl().path() );
+ TQString path( _props->kurl().path() );
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KSimpleConfig config( path );
config.setDesktopGroup();
- QString deviceStr = config.readEntry( "Dev" );
- QString mountPointStr = config.readEntry( "MountPoint" );
+ TQString deviceStr = config.readEntry( "Dev" );
+ TQString mountPointStr = config.readEntry( "MountPoint" );
bool ro = config.readBoolEntry( "ReadOnly", false );
- QString unmountedStr = config.readEntry( "UnmountIcon" );
+ TQString unmountedStr = config.readEntry( "UnmountIcon" );
fileSystem->setText( i18n(config.readEntry("FSType").local8Bit()) );
@@ -2960,17 +2960,17 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP
unmounted->setIcon( unmountedStr );
- connect( device, SIGNAL( activated( int ) ),
- this, SIGNAL( changed() ) );
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( readonly, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( unmounted, SIGNAL( iconChanged( QString ) ),
- this, SIGNAL( changed() ) );
-
- connect( device, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotDeviceChanged() ) );
+ connect( device, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( readonly, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( unmounted, TQT_SIGNAL( iconChanged( TQString ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( device, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotDeviceChanged() ) );
}
KDevicePropsPlugin::~KDevicePropsPlugin()
@@ -2978,7 +2978,7 @@ KDevicePropsPlugin::~KDevicePropsPlugin()
delete d;
}
-// QString KDevicePropsPlugin::tabName () const
+// TQString KDevicePropsPlugin::tabName () const
// {
// return i18n ("De&vice");
// }
@@ -2993,10 +2993,10 @@ void KDevicePropsPlugin::updateInfo()
if ( !mountpoint->text().isEmpty() )
{
KDiskFreeSp * job = new KDiskFreeSp;
- connect( job, SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ),
- this, SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
- const unsigned long&, const QString& ) ) );
+ connect( job, TQT_SIGNAL( foundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ),
+ this, TQT_SLOT( slotFoundMountPoint( const unsigned long&, const unsigned long&,
+ const unsigned long&, const TQString& ) ) );
job->readDF( mountpoint->text() );
}
@@ -3018,7 +3018,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
if ( index != -1 )
mountpoint->setText( d->mountpointlist[index] );
else
- mountpoint->setText( QString::null );
+ mountpoint->setText( TQString::null );
updateInfo();
}
@@ -3026,7 +3026,7 @@ void KDevicePropsPlugin::slotDeviceChanged()
void KDevicePropsPlugin::slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& )
+ const TQString& )
{
d->m_freeSpaceText->show();
d->m_freeSpaceLabel->show();
@@ -3059,8 +3059,8 @@ bool KDevicePropsPlugin::supports( KFileItemList _items )
void KDevicePropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
- QFile f( path );
+ TQString path = properties->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) )
{
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have sufficient "
@@ -3071,7 +3071,7 @@ void KDevicePropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("FSDevice") );
+ config.writeEntry( "Type", TQString::fromLatin1("FSDevice") );
config.writeEntry( "Dev", device->currentText() );
config.writeEntry( "MountPoint", mountpoint->text() );
@@ -3095,13 +3095,13 @@ void KDevicePropsPlugin::applyChanges()
KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
: KPropsDlgPlugin( _props )
{
- QFrame *frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *mainlayout = new QVBoxLayout( frame, 0, KDialog::spacingHint() );
+ TQFrame *frame = properties->addPage(i18n("&Application"));
+ TQVBoxLayout *mainlayout = new TQVBoxLayout( frame, 0, KDialog::spacingHint() );
w = new KPropertiesDesktopBase(frame);
mainlayout->addWidget(w);
- bool bKDesktopMode = (QCString(qApp->name()) == "kdesktop"); // nasty heh?
+ bool bKDesktopMode = (TQCString(qApp->name()) == "kdesktop"); // nasty heh?
if (bKDesktopMode)
{
@@ -3113,29 +3113,29 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->pathEdit->setMode(KFile::Directory | KFile::LocalOnly);
w->pathEdit->lineEdit()->setAcceptDrops(false);
- connect( w->nameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->genNameEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commentEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->commandEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
- connect( w->pathEdit, SIGNAL( textChanged( const QString & ) ), this, SIGNAL( changed() ) );
+ connect( w->nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->commandEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
+ connect( w->pathEdit, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SIGNAL( changed() ) );
- connect( w->browseButton, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( w->addFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotAddFiletype() ) );
- connect( w->delFiletypeButton, SIGNAL( clicked() ), this, SLOT( slotDelFiletype() ) );
- connect( w->advancedButton, SIGNAL( clicked() ), this, SLOT( slotAdvanced() ) );
+ connect( w->browseButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( w->addFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAddFiletype() ) );
+ connect( w->delFiletypeButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDelFiletype() ) );
+ connect( w->advancedButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdvanced() ) );
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString nameStr = config.readName();
- QString genNameStr = config.readGenericName();
- QString commentStr = config.readComment();
- QString commandStr = config.readPathEntry( "Exec" );
+ TQString nameStr = config.readName();
+ TQString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString commandStr = config.readPathEntry( "Exec" );
if (commandStr.left(12) == "ksystraycmd ")
{
commandStr.remove(0, 12);
@@ -3145,7 +3145,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_systrayBool = false;
m_origCommandStr = commandStr;
- QString pathStr = config.readPathEntry( "Path" );
+ TQString pathStr = config.readPathEntry( "Path" );
m_terminalBool = config.readBoolEntry( "Terminal" );
m_terminalOptionStr = config.readEntry( "TerminalOptions" );
m_suidBool = config.readBoolEntry( "X-KDE-SubstituteUID" );
@@ -3156,7 +3156,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
m_startupBool = config.readBoolEntry( "X-KDE-StartupNotify", true );
m_dcopServiceType = config.readEntry("X-DCOP-ServiceType").lower();
- QStringList mimeTypes = config.readListEntry( "MimeType", ';' );
+ TQStringList mimeTypes = config.readListEntry( "MimeType", ';' );
if ( nameStr.isEmpty() || bKDesktopMode ) {
// We'll use the file name if no name is specified
@@ -3174,12 +3174,12 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
w->filetypeList->setAllColumnsShowFocus(true);
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- for(QStringList::ConstIterator it = mimeTypes.begin();
+ for(TQStringList::ConstIterator it = mimeTypes.begin();
it != mimeTypes.end(); )
{
KMimeType::Ptr p = KMimeType::mimeType(*it);
++it;
- QString preference;
+ TQString preference;
if (it != mimeTypes.end())
{
bool numeric;
@@ -3192,7 +3192,7 @@ KDesktopPropsPlugin::KDesktopPropsPlugin( KPropertiesDialog *_props )
}
if (p && (p != defaultMimetype))
{
- new QListViewItem(w->filetypeList, p->name(), p->comment(), preference);
+ new TQListViewItem(w->filetypeList, p->name(), p->comment(), preference);
}
}
@@ -3204,8 +3204,8 @@ KDesktopPropsPlugin::~KDesktopPropsPlugin()
void KDesktopPropsPlugin::slotSelectMimetype()
{
- QListView *w = (QListView*)sender();
- QListViewItem *item = w->firstChild();
+ TQListView *w = (TQListView*)sender();
+ TQListViewItem *item = w->firstChild();
while(item)
{
if (item->isSelected())
@@ -3220,7 +3220,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
i18n("Add File Type for %1").arg(properties->kurl().fileName()),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok);
- KGuiItem okItem(i18n("&Add"), QString::null /* no icon */,
+ KGuiItem okItem(i18n("&Add"), TQString::null /* no icon */,
i18n("Add the selected file types to\nthe list of supported file types."),
i18n("Add the selected file types to\nthe list of supported file types."));
dlg.setButtonOK(okItem);
@@ -3231,31 +3231,31 @@ void KDesktopPropsPlugin::slotAddFiletype()
{
mw->listView->setRootIsDecorated(true);
- mw->listView->setSelectionMode(QListView::Extended);
+ mw->listView->setSelectionMode(TQListView::Extended);
mw->listView->setAllColumnsShowFocus(true);
mw->listView->setFullWidth(true);
mw->listView->setMinimumSize(500,400);
- connect(mw->listView, SIGNAL(selectionChanged()),
- this, SLOT(slotSelectMimetype()));
- connect(mw->listView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )),
- &dlg, SLOT( slotOk()));
+ connect(mw->listView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotSelectMimetype()));
+ connect(mw->listView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )),
+ &dlg, TQT_SLOT( slotOk()));
- QMap<QString,QListViewItem*> majorMap;
- QListViewItem *majorGroup;
+ TQMap<TQString,TQListViewItem*> majorMap;
+ TQListViewItem *majorGroup;
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
for (; it != mimetypes.end(); ++it) {
- QString mimetype = (*it)->name();
+ TQString mimetype = (*it)->name();
if (mimetype == KMimeType::defaultMimeType())
continue;
int index = mimetype.find("/");
- QString maj = mimetype.left(index);
- QString min = mimetype.mid(index+1);
+ TQString maj = mimetype.left(index);
+ TQString min = mimetype.mid(index+1);
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( maj );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( maj );
if ( mit == majorMap.end() ) {
- majorGroup = new QListViewItem( mw->listView, maj );
+ majorGroup = new TQListViewItem( mw->listView, maj );
majorGroup->setExpandable(true);
mw->listView->setOpen(majorGroup, true);
majorMap.insert( maj, majorGroup );
@@ -3265,10 +3265,10 @@ void KDesktopPropsPlugin::slotAddFiletype()
majorGroup = mit.data();
}
- QListViewItem *item = new QListViewItem(majorGroup, min, (*it)->comment());
+ TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment());
item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small)));
}
- QMapIterator<QString,QListViewItem*> mit = majorMap.find( "all" );
+ TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" );
if ( mit != majorMap.end())
{
mw->listView->setCurrentItem(mit.data());
@@ -3279,23 +3279,23 @@ void KDesktopPropsPlugin::slotAddFiletype()
if (dlg.exec() == KDialogBase::Accepted)
{
KMimeType::Ptr defaultMimetype = KMimeType::defaultMimeTypePtr();
- QListViewItem *majorItem = mw->listView->firstChild();
+ TQListViewItem *majorItem = mw->listView->firstChild();
while(majorItem)
{
- QString major = majorItem->text(0);
+ TQString major = majorItem->text(0);
- QListViewItem *minorItem = majorItem->firstChild();
+ TQListViewItem *minorItem = majorItem->firstChild();
while(minorItem)
{
if (minorItem->isSelected())
{
- QString mimetype = major + "/" + minorItem->text(0);
+ TQString mimetype = major + "/" + minorItem->text(0);
KMimeType::Ptr p = KMimeType::mimeType(mimetype);
if (p && (p != defaultMimetype))
{
mimetype = p->name();
bool found = false;
- QListViewItem *item = w->filetypeList->firstChild();
+ TQListViewItem *item = w->filetypeList->firstChild();
while (item)
{
if (mimetype == item->text(0))
@@ -3306,7 +3306,7 @@ void KDesktopPropsPlugin::slotAddFiletype()
item = item->nextSibling();
}
if (!found) {
- new QListViewItem(w->filetypeList, p->name(), p->comment());
+ new TQListViewItem(w->filetypeList, p->name(), p->comment());
emit changed();
}
}
@@ -3331,17 +3331,17 @@ void KDesktopPropsPlugin::checkCommandChanged()
if (KRun::binaryName(w->commandEdit->text(), true) !=
KRun::binaryName(m_origCommandStr, true))
{
- QString m_origCommandStr = w->commandEdit->text();
- m_dcopServiceType= QString::null; // Reset
+ TQString m_origCommandStr = w->commandEdit->text();
+ m_dcopServiceType= TQString::null; // Reset
}
}
void KDesktopPropsPlugin::applyChanges()
{
kdDebug(250) << "KDesktopPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3356,7 +3356,7 @@ void KDesktopPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", w->commentEdit->text() );
config.writeEntry( "Comment", w->commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", w->genNameEdit->text() );
@@ -3369,11 +3369,11 @@ void KDesktopPropsPlugin::applyChanges()
config.writePathEntry( "Path", w->pathEdit->lineEdit()->text() );
// Write mimeTypes
- QStringList mimeTypes;
- for( QListViewItem *item = w->filetypeList->firstChild();
+ TQStringList mimeTypes;
+ for( TQListViewItem *item = w->filetypeList->firstChild();
item; item = item->nextSibling() )
{
- QString preference = item->text(2);
+ TQString preference = item->text(2);
mimeTypes.append(item->text(0));
if (!preference.isEmpty())
mimeTypes.append(preference);
@@ -3382,7 +3382,7 @@ void KDesktopPropsPlugin::applyChanges()
config.writeEntry( "MimeType", mimeTypes, ';' );
if ( !w->nameEdit->isHidden() ) {
- QString nameStr = w->nameEdit->text();
+ TQString nameStr = w->nameEdit->text();
config.writeEntry( "Name", nameStr );
config.writeEntry( "Name", nameStr, true, false, true );
}
@@ -3396,7 +3396,7 @@ void KDesktopPropsPlugin::applyChanges()
config.sync();
// KSycoca update needed?
- QString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
+ TQString sycocaPath = KGlobal::dirs()->relativeLocation("apps", path);
bool updateNeeded = !sycocaPath.startsWith("/");
if (!updateNeeded)
{
@@ -3410,8 +3410,8 @@ void KDesktopPropsPlugin::applyChanges()
void KDesktopPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, w );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, w );
if ( f.isEmpty() )
return;
@@ -3420,7 +3420,7 @@ void KDesktopPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
w->commandEdit->setText( path );
}
@@ -3440,9 +3440,9 @@ void KDesktopPropsPlugin::slotAdvanced()
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
bool terminalCloseBool = false;
@@ -3487,7 +3487,7 @@ void KDesktopPropsPlugin::slotAdvanced()
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3500,24 +3500,24 @@ void KDesktopPropsPlugin::slotAdvanced()
delete kcom;
}
- connect( w->terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCloseCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( w->startupInfoCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->systrayCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( w->dcopCombo, SIGNAL( highlighted( int ) ),
- this, SIGNAL( changed() ) );
-
- if ( dlg.exec() == QDialog::Accepted )
+ connect( w->terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCloseCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->startupInfoCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->systrayCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( w->dcopCombo, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ if ( dlg.exec() == TQDialog::Accepted )
{
m_terminalOptionStr = w->terminalEdit->text().stripWhiteSpace();
m_terminalBool = w->terminalCheck->isChecked();
@@ -3579,8 +3579,8 @@ public:
{
}
- QFrame *m_frame;
- QCheckBox *nocloseonexitCheck;
+ TQFrame *m_frame;
+ TQCheckBox *nocloseonexitCheck;
};
KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
@@ -3588,21 +3588,21 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
{
d = new KExecPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("E&xecute"));
- QVBoxLayout * mainlayout = new QVBoxLayout( d->m_frame, 0,
+ TQVBoxLayout * mainlayout = new TQVBoxLayout( d->m_frame, 0,
KDialog::spacingHint());
// Now the widgets in the top layout
- QLabel* l;
- l = new QLabel( i18n( "Comman&d:" ), d->m_frame );
+ TQLabel* l;
+ l = new TQLabel( i18n( "Comman&d:" ), d->m_frame );
mainlayout->addWidget(l);
- QHBoxLayout * hlayout;
- hlayout = new QHBoxLayout(KDialog::spacingHint());
+ TQHBoxLayout * hlayout;
+ hlayout = new TQHBoxLayout(KDialog::spacingHint());
mainlayout->addLayout(hlayout);
execEdit = new KLineEdit( d->m_frame );
- QWhatsThis::add(execEdit,i18n(
+ TQWhatsThis::add(execEdit,i18n(
"Following the command, you can have several place holders which will be replaced "
"with the actual values when the actual program is run:\n"
"%f - a single file name\n"
@@ -3618,22 +3618,22 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( execEdit );
- execBrowse = new QPushButton( d->m_frame );
+ execBrowse = new TQPushButton( d->m_frame );
execBrowse->setText( i18n("&Browse...") );
hlayout->addWidget(execBrowse);
// The groupbox about swallowing
- QGroupBox* tmpQGroupBox;
- tmpQGroupBox = new QGroupBox( i18n("Panel Embedding"), d->m_frame );
+ TQGroupBox* tmpQGroupBox;
+ tmpQGroupBox = new TQGroupBox( i18n("Panel Embedding"), d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- QGridLayout *grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ TQGridLayout *grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- l = new QLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Execute on click:" ), tmpQGroupBox );
grid->addWidget(l, 0, 0);
swallowExecEdit = new KLineEdit( tmpQGroupBox );
@@ -3641,7 +3641,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
l->setBuddy( swallowExecEdit );
- l = new QLabel( i18n( "&Window title:" ), tmpQGroupBox );
+ l = new TQLabel( i18n( "&Window title:" ), tmpQGroupBox );
grid->addWidget(l, 1, 0);
swallowTitleEdit = new KLineEdit( tmpQGroupBox );
@@ -3651,36 +3651,36 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run in terminal
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 3, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 3, 2);
grid->setSpacing( KDialog::spacingHint() );
grid->setColStretch(1, 1);
- terminalCheck = new QCheckBox( tmpQGroupBox );
+ terminalCheck = new TQCheckBox( tmpQGroupBox );
terminalCheck->setText( i18n("&Run in terminal") );
grid->addMultiCellWidget(terminalCheck, 0, 0, 0, 1);
// check to see if we use konsole if not do not add the nocloseonexit
// because we don't know how to do this on other terminal applications
- KConfigGroup confGroup( KGlobal::config(), QString::fromLatin1("General") );
- QString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
- QString::fromLatin1("konsole"));
+ KConfigGroup confGroup( KGlobal::config(), TQString::fromLatin1("General") );
+ TQString preferredTerminal = confGroup.readPathEntry("TerminalApplication",
+ TQString::fromLatin1("konsole"));
int posOptions = 1;
d->nocloseonexitCheck = 0L;
if (preferredTerminal == "konsole")
{
posOptions = 2;
- d->nocloseonexitCheck = new QCheckBox( tmpQGroupBox );
+ d->nocloseonexitCheck = new TQCheckBox( tmpQGroupBox );
d->nocloseonexitCheck->setText( i18n("Do not &close when command exits") );
grid->addMultiCellWidget(d->nocloseonexitCheck, 1, 1, 0, 1);
}
- terminalLabel = new QLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
+ terminalLabel = new TQLabel( i18n( "&Terminal options:" ), tmpQGroupBox );
grid->addWidget(terminalLabel, posOptions, 0);
terminalEdit = new KLineEdit( tmpQGroupBox );
@@ -3690,20 +3690,20 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
// The groupbox about run with substituted uid.
- tmpQGroupBox = new QGroupBox( d->m_frame );
+ tmpQGroupBox = new TQGroupBox( d->m_frame );
tmpQGroupBox->setColumnLayout( 0, Qt::Horizontal );
mainlayout->addWidget(tmpQGroupBox);
- grid = new QGridLayout(tmpQGroupBox->layout(), 2, 2);
+ grid = new TQGridLayout(tmpQGroupBox->layout(), 2, 2);
grid->setSpacing(KDialog::spacingHint());
grid->setColStretch(1, 1);
- suidCheck = new QCheckBox(tmpQGroupBox);
+ suidCheck = new TQCheckBox(tmpQGroupBox);
suidCheck->setText(i18n("Ru&n as a different user"));
grid->addMultiCellWidget(suidCheck, 0, 0, 0, 1);
- suidLabel = new QLabel(i18n( "&Username:" ), tmpQGroupBox);
+ suidLabel = new TQLabel(i18n( "&Username:" ), tmpQGroupBox);
grid->addWidget(suidLabel, 1, 0);
suidEdit = new KLineEdit(tmpQGroupBox);
@@ -3714,8 +3714,8 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
mainlayout->addStretch(1);
// now populate the page
- QString path = _props->kurl().path();
- QFile f( path );
+ TQString path = _props->kurl().path();
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
@@ -3761,7 +3761,7 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
int i, maxEntries = 1000;
setpwent();
for (i=0; ((pw = getpwent()) != 0L) && (i < maxEntries); i++)
- kcom->addItem(QString::fromLatin1(pw->pw_name));
+ kcom->addItem(TQString::fromLatin1(pw->pw_name));
endpwent();
if (i < maxEntries)
{
@@ -3774,27 +3774,27 @@ KExecPropsPlugin::KExecPropsPlugin( KPropertiesDialog *_props )
delete kcom;
}
- connect( swallowExecEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( swallowTitleEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( execEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( terminalEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
+ connect( swallowExecEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( swallowTitleEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( execEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
if (d->nocloseonexitCheck)
- connect( d->nocloseonexitCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( terminalCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidCheck, SIGNAL( toggled( bool ) ),
- this, SIGNAL( changed() ) );
- connect( suidEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
-
- connect( execBrowse, SIGNAL( clicked() ), this, SLOT( slotBrowseExec() ) );
- connect( terminalCheck, SIGNAL( clicked() ), this, SLOT( enableCheckedEdit() ) );
- connect( suidCheck, SIGNAL( clicked() ), this, SLOT( enableSuidEdit() ) );
+ connect( d->nocloseonexitCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( terminalCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidCheck, TQT_SIGNAL( toggled( bool ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( suidEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+
+ connect( execBrowse, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotBrowseExec() ) );
+ connect( terminalCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableCheckedEdit() ) );
+ connect( suidCheck, TQT_SIGNAL( clicked() ), this, TQT_SLOT( enableSuidEdit() ) );
}
@@ -3835,9 +3835,9 @@ bool KExecPropsPlugin::supports( KFileItemList _items )
void KExecPropsPlugin::applyChanges()
{
kdDebug(250) << "KExecPropsPlugin::applyChanges" << endl;
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not have "
@@ -3848,15 +3848,15 @@ void KExecPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writePathEntry( "Exec", execEdit->text() );
config.writePathEntry( "SwallowExec", swallowExecEdit->text() );
config.writeEntry( "SwallowTitle", swallowTitleEdit->text() );
config.writeEntry( "Terminal", terminalCheck->isChecked() );
- QString temp = terminalEdit->text();
+ TQString temp = terminalEdit->text();
if (d->nocloseonexitCheck )
if ( d->nocloseonexitCheck->isChecked() )
- temp += QString::fromLatin1("--noclose ");
+ temp += TQString::fromLatin1("--noclose ");
temp = temp.stripWhiteSpace();
config.writeEntry( "TerminalOptions", temp );
config.writeEntry( "X-KDE-SubstituteUID", suidCheck->isChecked() );
@@ -3866,8 +3866,8 @@ void KExecPropsPlugin::applyChanges()
void KExecPropsPlugin::slotBrowseExec()
{
- KURL f = KFileDialog::getOpenURL( QString::null,
- QString::null, d->m_frame );
+ KURL f = KFileDialog::getOpenURL( TQString::null,
+ TQString::null, d->m_frame );
if ( f.isEmpty() )
return;
@@ -3876,7 +3876,7 @@ void KExecPropsPlugin::slotBrowseExec()
return;
}
- QString path = f.path();
+ TQString path = f.path();
KRun::shellQuote( path );
execEdit->setText( path );
}
@@ -3886,13 +3886,13 @@ class KApplicationPropsPlugin::KApplicationPropsPluginPrivate
public:
KApplicationPropsPluginPrivate()
{
- m_kdesktopMode = QCString(qApp->name()) == "kdesktop"; // nasty heh?
+ m_kdesktopMode = TQCString(qApp->name()) == "kdesktop"; // nasty heh?
}
~KApplicationPropsPluginPrivate()
{
}
- QFrame *m_frame;
+ TQFrame *m_frame;
bool m_kdesktopMode;
};
@@ -3901,29 +3901,29 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
{
d = new KApplicationPropsPluginPrivate;
d->m_frame = properties->addPage(i18n("&Application"));
- QVBoxLayout *toplayout = new QVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
+ TQVBoxLayout *toplayout = new TQVBoxLayout( d->m_frame, 0, KDialog::spacingHint());
- QIconSet iconSet;
- QPixmap pixMap;
+ TQIconSet iconSet;
+ TQPixmap pixMap;
- addExtensionButton = new QPushButton( QString::null, d->m_frame );
+ addExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "back" );
addExtensionButton->setIconSet( iconSet );
- pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
addExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( addExtensionButton, SIGNAL( clicked() ),
- SLOT( slotAddExtension() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotAddExtension() ) );
- delExtensionButton = new QPushButton( QString::null, d->m_frame );
+ delExtensionButton = new TQPushButton( TQString::null, d->m_frame );
iconSet = SmallIconSet( "forward" );
delExtensionButton->setIconSet( iconSet );
delExtensionButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- connect( delExtensionButton, SIGNAL( clicked() ),
- SLOT( slotDelExtension() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( slotDelExtension() ) );
- QLabel *l;
+ TQLabel *l;
- QGridLayout *grid = new QGridLayout(2, 2);
+ TQGridLayout *grid = new TQGridLayout(2, 2);
grid->setColStretch(1, 1);
toplayout->addLayout(grid);
@@ -3934,61 +3934,61 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
}
else
{
- l = new QLabel(i18n("Name:"), d->m_frame, "Label_4" );
+ l = new TQLabel(i18n("Name:"), d->m_frame, "Label_4" );
grid->addWidget(l, 0, 0);
nameEdit = new KLineEdit( d->m_frame, "LineEdit_3" );
grid->addWidget(nameEdit, 0, 1);
}
- l = new QLabel(i18n("Description:"), d->m_frame, "Label_5" );
+ l = new TQLabel(i18n("Description:"), d->m_frame, "Label_5" );
grid->addWidget(l, 1, 0);
genNameEdit = new KLineEdit( d->m_frame, "LineEdit_4" );
grid->addWidget(genNameEdit, 1, 1);
- l = new QLabel(i18n("Comment:"), d->m_frame, "Label_3" );
+ l = new TQLabel(i18n("Comment:"), d->m_frame, "Label_3" );
grid->addWidget(l, 2, 0);
commentEdit = new KLineEdit( d->m_frame, "LineEdit_2" );
grid->addWidget(commentEdit, 2, 1);
- l = new QLabel(i18n("File types:"), d->m_frame);
+ l = new TQLabel(i18n("File types:"), d->m_frame);
toplayout->addWidget(l, 0, AlignLeft);
- grid = new QGridLayout(4, 3);
+ grid = new TQGridLayout(4, 3);
grid->setColStretch(0, 1);
grid->setColStretch(2, 1);
grid->setRowStretch( 0, 1 );
grid->setRowStretch( 3, 1 );
toplayout->addLayout(grid, 2);
- extensionsList = new QListBox( d->m_frame );
- extensionsList->setSelectionMode( QListBox::Extended );
+ extensionsList = new TQListBox( d->m_frame );
+ extensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(extensionsList, 0, 3, 0, 0);
grid->addWidget(addExtensionButton, 1, 1);
grid->addWidget(delExtensionButton, 2, 1);
- availableExtensionsList = new QListBox( d->m_frame );
- availableExtensionsList->setSelectionMode( QListBox::Extended );
+ availableExtensionsList = new TQListBox( d->m_frame );
+ availableExtensionsList->setSelectionMode( TQListBox::Extended );
grid->addMultiCellWidget(availableExtensionsList, 0, 3, 2, 2);
- QString path = properties->kurl().path() ;
- QFile f( path );
+ TQString path = properties->kurl().path() ;
+ TQFile f( path );
if ( !f.open( IO_ReadOnly ) )
return;
f.close();
KDesktopFile config( path );
- QString commentStr = config.readComment();
- QString genNameStr = config.readGenericName();
+ TQString commentStr = config.readComment();
+ TQString genNameStr = config.readGenericName();
- QStringList selectedTypes = config.readListEntry( "ServiceTypes" );
+ TQStringList selectedTypes = config.readListEntry( "ServiceTypes" );
// For compatibility with KDE 1.x
selectedTypes += config.readListEntry( "MimeType", ';' );
- QString nameStr = config.readName();
+ TQString nameStr = config.readName();
if ( nameStr.isEmpty() || d->m_kdesktopMode ) {
// We'll use the file name if no name is specified
// because we _need_ a Name for a valid file.
@@ -4002,39 +4002,39 @@ KApplicationPropsPlugin::KApplicationPropsPlugin( KPropertiesDialog *_props )
nameEdit->setText( nameStr );
selectedTypes.sort();
- QStringList::Iterator sit = selectedTypes.begin();
+ TQStringList::Iterator sit = selectedTypes.begin();
for( ; sit != selectedTypes.end(); ++sit ) {
if ( !((*sit).isEmpty()) )
extensionsList->insertItem( *sit );
}
KMimeType::List mimeTypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
+ TQValueListIterator<KMimeType::Ptr> it2 = mimeTypes.begin();
for ( ; it2 != mimeTypes.end(); ++it2 )
addMimeType ( (*it2)->name() );
updateButton();
- connect( extensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
- connect( availableExtensionsList, SIGNAL( highlighted( int ) ),
- this, SLOT( updateButton() ) );
+ connect( extensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( highlighted( int ) ),
+ this, TQT_SLOT( updateButton() ) );
- connect( addExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
- connect( delExtensionButton, SIGNAL( clicked() ),
- this, SIGNAL( changed() ) );
+ connect( addExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( delExtensionButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( changed() ) );
if ( nameEdit )
- connect( nameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( commentEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( genNameEdit, SIGNAL( textChanged( const QString & ) ),
- this, SIGNAL( changed() ) );
- connect( availableExtensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
- connect( extensionsList, SIGNAL( selected( int ) ),
- this, SIGNAL( changed() ) );
+ connect( nameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( commentEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( genNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( availableExtensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
+ connect( extensionsList, TQT_SIGNAL( selected( int ) ),
+ this, TQT_SIGNAL( changed() ) );
}
KApplicationPropsPlugin::~KApplicationPropsPlugin()
@@ -4042,7 +4042,7 @@ KApplicationPropsPlugin::~KApplicationPropsPlugin()
delete d;
}
-// QString KApplicationPropsPlugin::tabName () const
+// TQString KApplicationPropsPlugin::tabName () const
// {
// return i18n ("&Application");
// }
@@ -4053,7 +4053,7 @@ void KApplicationPropsPlugin::updateButton()
delExtensionButton->setEnabled(extensionsList->currentItem()>-1);
}
-void KApplicationPropsPlugin::addMimeType( const QString & name )
+void KApplicationPropsPlugin::addMimeType( const TQString & name )
{
// Add a mimetype to the list of available mime types if not in the extensionsList
@@ -4078,9 +4078,9 @@ bool KApplicationPropsPlugin::supports( KFileItemList _items )
void KApplicationPropsPlugin::applyChanges()
{
- QString path = properties->kurl().path();
+ TQString path = properties->kurl().path();
- QFile f( path );
+ TQFile f( path );
if ( !f.open( IO_ReadWrite ) ) {
KMessageBox::sorry( 0, i18n("<qt>Could not save properties. You do not "
@@ -4091,13 +4091,13 @@ void KApplicationPropsPlugin::applyChanges()
KSimpleConfig config( path );
config.setDesktopGroup();
- config.writeEntry( "Type", QString::fromLatin1("Application"));
+ config.writeEntry( "Type", TQString::fromLatin1("Application"));
config.writeEntry( "Comment", commentEdit->text() );
config.writeEntry( "Comment", commentEdit->text(), true, false, true ); // for compat
config.writeEntry( "GenericName", genNameEdit->text() );
config.writeEntry( "GenericName", genNameEdit->text(), true, false, true ); // for compat
- QStringList selectedTypes;
+ TQStringList selectedTypes;
for ( uint i = 0; i < extensionsList->count(); i++ )
selectedTypes.append( extensionsList->text( i ) );
@@ -4105,7 +4105,7 @@ void KApplicationPropsPlugin::applyChanges()
config.writeEntry( "ServiceTypes", "" );
// hmm, actually it should probably be the contrary (but see also typeslistitem.cpp)
- QString nameStr = nameEdit ? nameEdit->text() : QString::null;
+ TQString nameStr = nameEdit ? nameEdit->text() : TQString::null;
if ( nameStr.isEmpty() ) // nothing entered, or widget not existing at all (kdesktop mode)
nameStr = nameFromFileName(properties->kurl().fileName());
@@ -4117,8 +4117,8 @@ void KApplicationPropsPlugin::applyChanges()
void KApplicationPropsPlugin::slotAddExtension()
{
- QListBoxItem *item = availableExtensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = availableExtensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
@@ -4139,8 +4139,8 @@ void KApplicationPropsPlugin::slotAddExtension()
void KApplicationPropsPlugin::slotDelExtension()
{
- QListBoxItem *item = extensionsList->firstItem();
- QListBoxItem *nextItem;
+ TQListBoxItem *item = extensionsList->firstItem();
+ TQListBoxItem *nextItem;
while ( item )
{
diff --git a/kio/kfile/kpropertiesdialog.h b/kio/kfile/kpropertiesdialog.h
index b71ad7948..a83480c1c 100644
--- a/kio/kfile/kpropertiesdialog.h
+++ b/kio/kfile/kpropertiesdialog.h
@@ -28,8 +28,8 @@
#ifndef __propsdlg_h
#define __propsdlg_h
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
#include <kurl.h>
@@ -95,7 +95,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItem * item,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -113,7 +113,7 @@ public:
* @param autoShow tells the dialog whether it should show itself automatically.
*/
KPropertiesDialog( KFileItemList _items,
- QWidget *parent = 0L, const char* name = 0L,
+ TQWidget *parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
#ifndef KDE_NO_COMPAT
@@ -128,7 +128,7 @@ public:
* @param modal tells the dialog whether it should be modal.
* @param autoShow tells the dialog whether it should show itself automatically. */
KPropertiesDialog( const KURL& _url, mode_t _mode,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true) KDE_DEPRECATED;
#endif
@@ -150,7 +150,7 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _url,
- QWidget* parent = 0L, const char* name = 0L,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -168,8 +168,8 @@ public:
* @param autoShow tells the dialog whethr it should show itself automatically.
*/
KPropertiesDialog( const KURL& _tempUrl, const KURL& _currentDir,
- const QString& _defaultName,
- QWidget* parent = 0L, const char* name = 0L,
+ const TQString& _defaultName,
+ TQWidget* parent = 0L, const char* name = 0L,
bool modal = false, bool autoShow = true);
/**
@@ -181,8 +181,8 @@ public:
* @param name is the internal name.
* @param modal tells the dialog whether it should be modal.
*/
- KPropertiesDialog (const QString& title,
- QWidget* parent = 0L, const char* name = 0L, bool modal = false);
+ KPropertiesDialog (const TQString& title,
+ TQWidget* parent = 0L, const char* name = 0L, bool modal = false);
/**
* Cleans up the properties dialog and frees any associated resources,
@@ -200,7 +200,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(KFileItem* item, QWidget* parent = 0,
+ static bool showDialog(KFileItem* item, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -212,7 +212,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KURL& _url, QWidget* parent = 0,
+ static bool showDialog(const KURL& _url, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -225,7 +225,7 @@ public:
* @return true on succesfull dialog displaying (can be false on win32).
* @since 3.4
*/
- static bool showDialog(const KFileItemList& _items, QWidget* parent = 0,
+ static bool showDialog(const KFileItemList& _items, TQWidget* parent = 0,
const char* name = 0, bool modal = false);
/**
@@ -279,20 +279,20 @@ public:
/**
* If the dialog is being built from a template, this method
- * returns the current directory. If no template, it returns QString::null.
+ * returns the current directory. If no template, it returns TQString::null.
* See the template form of the constructor.
*
- * @return the current directory or QString::null
+ * @return the current directory or TQString::null
*/
const KURL& currentDir() const { return m_currentDir; }
/**
* If the dialog is being built from a template, this method
- * returns the default name. If no template, it returns QString::null.
+ * returns the default name. If no template, it returns TQString::null.
* See the template form of the constructor.
- * @return the default name or QString::null
+ * @return the default name or TQString::null
*/
- const QString& defaultName() const { return m_defaultName; }
+ const TQString& defaultName() const { return m_defaultName; }
/**
* Updates the item URL (either called by rename or because
@@ -308,7 +308,7 @@ public:
* @param _name new filename, encoded.
* \see FilePropsDlgPlugin::applyChanges
*/
- void rename( const QString& _name );
+ void rename( const TQString& _name );
/**
* To abort applying changes.
@@ -332,7 +332,7 @@ public:
* \see showFileSharingPage
* @since 3.3
*/
- void setFileSharingPage(QWidget* page);
+ void setFileSharingPage(TQWidget* page);
/**
* Call this to make the filename lineedit readonly, to prevent the user
@@ -403,13 +403,13 @@ private:
/**
* For templates
*/
- QString m_defaultName;
+ TQString m_defaultName;
KURL m_currentDir;
/**
* List of all plugins inserted ( first one first )
*/
- QPtrList<KPropsDlgPlugin> m_pageList;
+ TQPtrList<KPropsDlgPlugin> m_pageList;
private slots:
void slotStatResult( KIO::Job * ); // No longer used
@@ -527,7 +527,7 @@ protected slots:
void slotFileRenamed( KIO::Job *, const KURL &, const KURL & );
void slotDirSizeUpdate();
void slotDirSizeFinished( KIO::Job * );
- void slotFoundMountPoint( const QString& mp, unsigned long kBSize,
+ void slotFoundMountPoint( const TQString& mp, unsigned long kBSize,
unsigned long kBUsed, unsigned long kBAvail );
void slotSizeStop();
void slotSizeDetermine();
@@ -535,28 +535,28 @@ protected slots:
private slots:
// workaround for compiler bug
void slotFoundMountPoint( const unsigned long& kBSize, const unsigned long&
- kBUsed, const unsigned long& kBAvail, const QString& mp );
- void nameFileChanged(const QString &text );
+ kBUsed, const unsigned long& kBAvail, const TQString& mp );
+ void nameFileChanged(const TQString &text );
void slotIconChanged();
private:
- void determineRelativePath( const QString & path );
+ void determineRelativePath( const TQString & path );
void applyIconChanges();
- QWidget *iconArea;
- QWidget *nameArea;
+ TQWidget *iconArea;
+ TQWidget *nameArea;
- QLabel *m_sizeLabel;
- QPushButton *m_sizeDetermineButton;
- QPushButton *m_sizeStopButton;
+ TQLabel *m_sizeLabel;
+ TQPushButton *m_sizeDetermineButton;
+ TQPushButton *m_sizeStopButton;
- QString m_sRelativePath;
+ TQString m_sRelativePath;
bool m_bFromTemplate;
/**
* The initial filename
*/
- QString oldName;
+ TQString oldName;
class KFilePropsPluginPrivate;
KFilePropsPluginPrivate *d;
@@ -604,7 +604,7 @@ private slots:
void slotShowAdvancedPermissions();
private:
- void setComboContent(QComboBox *combo, PermissionsTarget target,
+ void setComboContent(TQComboBox *combo, PermissionsTarget target,
mode_t permissions, mode_t partial);
bool isIrregular(mode_t permissions, bool isDir, bool isLink);
void enableAccessControls(bool enable);
@@ -619,9 +619,9 @@ private:
static const char *permissionsTexts[4][4];
// unused, for binary compatibility!
- QCheckBox *permBox[3][4];
+ TQCheckBox *permBox[3][4];
- QComboBox *grpCombo;
+ TQComboBox *grpCombo;
KLineEdit *usrEdit, *grpEdit;
@@ -632,11 +632,11 @@ private:
/**
* Old group
*/
- QString strGroup;
+ TQString strGroup;
/**
* Old owner
*/
- QString strOwner;
+ TQString strOwner;
// unused, for compatibility
static mode_t fperm[3][4];
@@ -672,11 +672,11 @@ private:
KURLRequester *URLEdit;
KIconButton *iconBox;
- QString URLStr;
- QString iconStr;
+ TQString URLStr;
+ TQString iconStr;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
private:
class KURLPropsPluginPrivate;
KURLPropsPluginPrivate *d;
@@ -704,12 +704,12 @@ public:
private:
- QLineEdit *commentEdit;
- QLineEdit *patternEdit;
- QLineEdit *mimeEdit;
- QString m_sMimeStr;
+ TQLineEdit *commentEdit;
+ TQLineEdit *patternEdit;
+ TQLineEdit *mimeEdit;
+ TQString m_sMimeStr;
- QCheckBox * cbAutoEmbed;
+ TQCheckBox * cbAutoEmbed;
class KBindingPropsPluginPrivate;
KBindingPropsPluginPrivate *d;
@@ -736,26 +736,26 @@ private slots:
void slotFoundMountPoint( const unsigned long& kBSize,
const unsigned long& /*kBUsed*/,
const unsigned long& kBAvail,
- const QString& );
+ const TQString& );
private:
void updateInfo();
private:
- QComboBox* device;
- QLabel* mountpoint;
- QCheckBox* readonly;
+ TQComboBox* device;
+ TQLabel* mountpoint;
+ TQCheckBox* readonly;
void* unused;
//KIconButton* mounted;
KIconButton* unmounted;
- QStringList m_devicelist;
+ TQStringList m_devicelist;
int indexDevice;
int indexMountPoint;
int indexFSType;
- QPixmap pixmap;
- QString pixmapFile;
+ TQPixmap pixmap;
+ TQString pixmapFile;
class KDevicePropsPluginPrivate;
KDevicePropsPluginPrivate *d;
@@ -798,10 +798,10 @@ private:
private:
KPropertiesDesktopBase* w;
- QString m_origCommandStr;
- QString m_terminalOptionStr;
- QString m_suidUserStr;
- QString m_dcopServiceType;
+ TQString m_origCommandStr;
+ TQString m_terminalOptionStr;
+ TQString m_suidUserStr;
+ TQString m_dcopServiceType;
bool m_terminalBool;
bool m_terminalCloseBool;
bool m_suidBool;
@@ -845,24 +845,24 @@ private slots:
private:
- QLabel *terminalLabel;
- QLabel *suidLabel;
+ TQLabel *terminalLabel;
+ TQLabel *suidLabel;
KLineEdit *execEdit;
- QCheckBox *terminalCheck;
- QCheckBox *suidCheck;
+ TQCheckBox *terminalCheck;
+ TQCheckBox *suidCheck;
KLineEdit *terminalEdit;
KLineEdit *suidEdit;
KLineEdit *swallowExecEdit;
KLineEdit *swallowTitleEdit;
- QButton *execBrowse;
+ TQButton *execBrowse;
- QString execStr;
- QString swallowExecStr;
- QString swallowTitleStr;
- QString termOptionsStr;
+ TQString execStr;
+ TQString swallowExecStr;
+ TQString swallowTitleStr;
+ TQString termOptionsStr;
bool termBool;
bool suidBool;
- QString suidUserStr;
+ TQString suidUserStr;
class KExecPropsPluginPrivate;
KExecPropsPluginPrivate *d;
@@ -900,15 +900,15 @@ private slots:
void updateButton();
private:
- void addMimeType( const QString & name );
-
- QLineEdit *commentEdit;
- QLineEdit *genNameEdit;
- QLineEdit *nameEdit;
- QListBox *extensionsList;
- QListBox *availableExtensionsList;
- QPushButton *addExtensionButton;
- QPushButton *delExtensionButton;
+ void addMimeType( const TQString & name );
+
+ TQLineEdit *commentEdit;
+ TQLineEdit *genNameEdit;
+ TQLineEdit *nameEdit;
+ TQListBox *extensionsList;
+ TQListBox *availableExtensionsList;
+ TQPushButton *addExtensionButton;
+ TQPushButton *delExtensionButton;
class KApplicationPropsPluginPrivate;
KApplicationPropsPluginPrivate *d;
diff --git a/kio/kfile/krecentdirs.cpp b/kio/kfile/krecentdirs.cpp
index b32dd0481..22b4cd477 100644
--- a/kio/kfile/krecentdirs.cpp
+++ b/kio/kfile/krecentdirs.cpp
@@ -44,7 +44,7 @@ static void recentdirs_done(KConfig *config)
}
}
-static KConfig *recentdirs_readList(QString &key, QStringList &result, bool readOnly)
+static KConfig *recentdirs_readList(TQString &key, TQStringList &result, bool readOnly)
{
KConfig *config;
if ((key.length() < 2) || (key[0] != ':'))
@@ -52,13 +52,13 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
if (key[1] == ':')
{
key = key.mid(2);
- config = new KSimpleConfig(QString::fromLatin1("krecentdirsrc"), readOnly);
+ config = new KSimpleConfig(TQString::fromLatin1("krecentdirsrc"), readOnly);
}
else
{
key = key.mid(1);
config = KGlobal::config();
- config->setGroup(QString::fromLatin1("Recent Dirs"));
+ config->setGroup(TQString::fromLatin1("Recent Dirs"));
}
result=config->readPathListEntry(key);
@@ -69,24 +69,24 @@ static KConfig *recentdirs_readList(QString &key, QStringList &result, bool read
return config;
}
-QStringList KRecentDirs::list(const QString &fileClass)
+TQStringList KRecentDirs::list(const TQString &fileClass)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
recentdirs_done(recentdirs_readList(key, result, true));
return result;
}
-QString KRecentDirs::dir(const QString &fileClass)
+TQString KRecentDirs::dir(const TQString &fileClass)
{
- QStringList result = list(fileClass);
+ TQStringList result = list(fileClass);
return result[0];
}
-void KRecentDirs::add(const QString &fileClass, const QString &directory)
+void KRecentDirs::add(const TQString &fileClass, const TQString &directory)
{
- QString key = fileClass;
- QStringList result;
+ TQString key = fileClass;
+ TQStringList result;
KConfig *config = recentdirs_readList(key, result, false);
// make sure the dir is first in history
result.remove(directory);
diff --git a/kio/kfile/krecentdirs.h b/kio/kfile/krecentdirs.h
index 078efcc50..439fb6fe0 100644
--- a/kio/kfile/krecentdirs.h
+++ b/kio/kfile/krecentdirs.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDIRS_H
#define __KRECENTDIRS_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdelibs_export.h>
@@ -54,17 +54,17 @@ public:
* Returns a list of directories associated with this file-class.
* The most recently used directory is at the front of the list.
*/
- static QStringList list(const QString &fileClass);
+ static TQStringList list(const TQString &fileClass);
/**
* Returns the most recently used directory accociated with this file-class.
*/
- static QString dir(const QString &fileClass);
+ static TQString dir(const TQString &fileClass);
/**
* Associates @p directory with @p fileClass
*/
- static void add(const QString &fileClass, const QString &directory);
+ static void add(const TQString &fileClass, const TQString &directory);
};
#endif
diff --git a/kio/kfile/krecentdocument.cpp b/kio/kfile/krecentdocument.cpp
index 9b3d4f75f..69fd63df5 100644
--- a/kio/kfile/krecentdocument.cpp
+++ b/kio/kfile/krecentdocument.cpp
@@ -33,37 +33,37 @@
#include <kdebug.h>
#include <kmimetype.h>
#include <kdesktopfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <sys/types.h>
#include <utime.h>
-QString KRecentDocument::recentDocumentDirectory()
+TQString KRecentDocument::recentDocumentDirectory()
{
// need to change this path, not sure where
- return locateLocal("data", QString::fromLatin1("RecentDocuments/"));
+ return locateLocal("data", TQString::fromLatin1("RecentDocuments/"));
}
-QStringList KRecentDocument::recentDocuments()
+TQStringList KRecentDocument::recentDocuments()
{
- QDir d(recentDocumentDirectory(), "*.desktop", QDir::Time,
- QDir::Files | QDir::Readable | QDir::Hidden);
+ TQDir d(recentDocumentDirectory(), "*.desktop", TQDir::Time,
+ TQDir::Files | TQDir::Readable | TQDir::Hidden);
if (!d.exists())
d.mkdir(recentDocumentDirectory());
- QStringList list = d.entryList();
- QStringList fullList;
+ TQStringList list = d.entryList();
+ TQStringList fullList;
- for (QStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
- QString pathDesktop = d.absFilePath( *it );
+ for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) {
+ TQString pathDesktop = d.absFilePath( *it );
KDesktopFile tmpDesktopFile( pathDesktop, false);
KURL urlDesktopFile(tmpDesktopFile.readURL());
- if( urlDesktopFile.isLocalFile() && !QFile(urlDesktopFile.path()).exists())
+ if( urlDesktopFile.isLocalFile() && !TQFile(urlDesktopFile.path()).exists())
d.remove(pathDesktop);
else
fullList.append( pathDesktop );
@@ -77,59 +77,59 @@ void KRecentDocument::add(const KURL& url)
KRecentDocument::add(url, qApp->argv()[0]); // ### argv[0] might not match the service filename!
}
-void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
+void KRecentDocument::add(const KURL& url, const TQString& desktopEntryName)
{
if ( url.isLocalFile() && !KGlobal::dirs()->relativeLocation("tmp", url.path()).startsWith("/"))
return;
- QString openStr = url.url();
- openStr.replace( QRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
+ TQString openStr = url.url();
+ openStr.replace( TQRegExp("\\$"), "$$" ); // Desktop files with type "Link" are $-variable expanded
kdDebug(250) << "KRecentDocument::add for " << openStr << endl;
KConfig *config = KGlobal::config();
- QString oldGrp = config->group();
- config->setGroup(QString::fromLatin1("RecentDocuments"));
- bool useRecent = config->readBoolEntry(QString::fromLatin1("UseRecent"), true);
- int maxEntries = config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ TQString oldGrp = config->group();
+ config->setGroup(TQString::fromLatin1("RecentDocuments"));
+ bool useRecent = config->readBoolEntry(TQString::fromLatin1("UseRecent"), true);
+ int maxEntries = config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
config->setGroup(oldGrp);
if(!useRecent)
return;
- QString path = recentDocumentDirectory();
+ TQString path = recentDocumentDirectory();
- QString dStr = path + url.fileName();
+ TQString dStr = path + url.fileName();
- QString ddesktop = dStr + QString::fromLatin1(".desktop");
+ TQString ddesktop = dStr + TQString::fromLatin1(".desktop");
int i=1;
// check for duplicates
- while(QFile::exists(ddesktop)){
+ while(TQFile::exists(ddesktop)){
// see if it points to the same file and application
KSimpleConfig tmp(ddesktop);
tmp.setDesktopGroup();
- if(tmp.readEntry(QString::fromLatin1("X-KDE-LastOpenedWith"))
+ if(tmp.readEntry(TQString::fromLatin1("X-KDE-LastOpenedWith"))
== desktopEntryName)
{
- utime(QFile::encodeName(ddesktop), NULL);
+ utime(TQFile::encodeName(ddesktop), NULL);
return;
}
// if not append a (num) to it
++i;
if ( i > maxEntries )
break;
- ddesktop = dStr + QString::fromLatin1("[%1].desktop").arg(i);
+ ddesktop = dStr + TQString::fromLatin1("[%1].desktop").arg(i);
}
- QDir dir(path);
+ TQDir dir(path);
// check for max entries, delete oldest files if exceeded
- QStringList list = dir.entryList(QDir::Files | QDir::Hidden, QDir::Time | QDir::Reversed);
+ TQStringList list = dir.entryList(TQDir::Files | TQDir::Hidden, TQDir::Time | TQDir::Reversed);
i = list.count();
if(i > maxEntries-1){
- QStringList::Iterator it;
+ TQStringList::Iterator it;
it = list.begin();
while(i > maxEntries-1){
- QFile::remove(dir.absPath() + QString::fromLatin1("/") + (*it));
+ TQFile::remove(dir.absPath() + TQString::fromLatin1("/") + (*it));
--i, ++it;
}
}
@@ -137,18 +137,18 @@ void KRecentDocument::add(const KURL& url, const QString& desktopEntryName)
// create the applnk
KSimpleConfig conf(ddesktop);
conf.setDesktopGroup();
- conf.writeEntry( QString::fromLatin1("Type"), QString::fromLatin1("Link") );
- conf.writePathEntry( QString::fromLatin1("URL"), openStr );
+ conf.writeEntry( TQString::fromLatin1("Type"), TQString::fromLatin1("Link") );
+ conf.writePathEntry( TQString::fromLatin1("URL"), openStr );
// If you change the line below, change the test in the above loop
- conf.writeEntry( QString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
- QString name = url.fileName();
+ conf.writeEntry( TQString::fromLatin1("X-KDE-LastOpenedWith"), desktopEntryName );
+ TQString name = url.fileName();
if (name.isEmpty())
name = openStr;
- conf.writeEntry( QString::fromLatin1("Name"), name );
- conf.writeEntry( QString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
+ conf.writeEntry( TQString::fromLatin1("Name"), name );
+ conf.writeEntry( TQString::fromLatin1("Icon"), KMimeType::iconForURL( url ) );
}
-void KRecentDocument::add(const QString &openStr, bool isUrl)
+void KRecentDocument::add(const TQString &openStr, bool isUrl)
{
if( isUrl ) {
add( KURL( openStr ) );
@@ -161,17 +161,17 @@ void KRecentDocument::add(const QString &openStr, bool isUrl)
void KRecentDocument::clear()
{
- QStringList list = recentDocuments();
- QDir dir;
- for(QStringList::Iterator it = list.begin(); it != list.end() ; ++it)
+ TQStringList list = recentDocuments();
+ TQDir dir;
+ for(TQStringList::Iterator it = list.begin(); it != list.end() ; ++it)
dir.remove(*it);
}
int KRecentDocument::maximumItems()
{
KConfig *config = KGlobal::config();
- KConfigGroupSaver sa(config, QString::fromLatin1("RecentDocuments"));
- return config->readNumEntry(QString::fromLatin1("MaxEntries"), 10);
+ KConfigGroupSaver sa(config, TQString::fromLatin1("RecentDocuments"));
+ return config->readNumEntry(TQString::fromLatin1("MaxEntries"), 10);
}
diff --git a/kio/kfile/krecentdocument.h b/kio/kfile/krecentdocument.h
index 5ec06c162..6bbd3f654 100644
--- a/kio/kfile/krecentdocument.h
+++ b/kio/kfile/krecentdocument.h
@@ -28,7 +28,7 @@
#ifndef __KRECENTDOCUMENT_H
#define __KRECENTDOCUMENT_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kurl.h>
/**
@@ -57,7 +57,7 @@ public:
* sorted by date.
*
*/
- static QStringList recentDocuments();
+ static TQStringList recentDocuments();
/**
* Add a new item to the Recent Document menu.
@@ -74,7 +74,7 @@ public:
* @param url The url to add.
* @param desktopEntryName The desktopEntryName of the service to use for opening this document.
*/
- static void add(const KURL& url, const QString& desktopEntryName);
+ static void add(const KURL& url, const TQString& desktopEntryName);
/**
*
@@ -83,7 +83,7 @@ public:
* @param documentStr The full path to the document or URL to add.
* @param isURL Set to @p true if @p documentStr is an URL and not a local file path.
*/
- static void add(const QString &documentStr, bool isURL = false);
+ static void add(const TQString &documentStr, bool isURL = false);
/**
* Clear the recent document menu of all entries.
@@ -99,7 +99,7 @@ public:
* Returns the path to the directory where recent document .desktop files
* are stored.
*/
- static QString recentDocumentDirectory();
+ static TQString recentDocumentDirectory();
};
#endif
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();
}
diff --git a/kio/kfile/kurlbar.h b/kio/kfile/kurlbar.h
index 6bc5de6d5..fc29d4fd2 100644
--- a/kio/kfile/kurlbar.h
+++ b/kio/kfile/kurlbar.h
@@ -19,9 +19,9 @@
#ifndef KURLBAR_H
#define KURLBAR_H
-#include <qevent.h>
-#include <qframe.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqframe.h>
+#include <tqtooltip.h>
#include <kdialogbase.h>
#include <kicontheme.h>
@@ -56,8 +56,8 @@ public:
* @since 3.2
*/
KURLBarItem( KURLBar *parent, const KURL& url, bool persistent,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -73,8 +73,8 @@ public:
* dynamic item, that is not saved with KURLBar::writeConfig().
*/
KURLBarItem( KURLBar *parent, const KURL& url,
- const QString& description = QString::null,
- const QString& icon = QString::null,
+ const TQString& description = TQString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
@@ -93,32 +93,32 @@ public:
* of the icon groups.
* @see icon
*/
- void setIcon( const QString& icon, KIcon::Group group = KIcon::Panel );
+ void setIcon( const TQString& icon, KIcon::Group group = KIcon::Panel );
/**
* Sets the description of this item that will be shown as item-text.
* @see description
*/
- void setDescription( const QString& desc );
+ void setDescription( const TQString& desc );
/**
* Sets a tooltip to be used for this item.
* @see toolTip
*/
- void setToolTip( const QString& tip );
+ void setToolTip( const TQString& tip );
/**
* returns the preferred size of this item
* @since 3.1
*/
- QSize sizeHint() const;
+ TQSize sizeHint() const;
/**
* returns the width of this item.
*/
- virtual int width( const QListBox * ) const;
+ virtual int width( const TQListBox * ) const;
/**
* returns the height of this item.
*/
- virtual int height( const QListBox * ) const;
+ virtual int height( const TQListBox * ) const;
/**
* returns the url of this item.
@@ -129,17 +129,17 @@ public:
* returns the description of this item.
* @see setDescription
*/
- const QString& description() const { return m_description; }
+ const TQString& description() const { return m_description; }
/**
* returns the icon of this item.
* @see setIcon
*/
- const QString& icon() const { return m_icon; }
+ const TQString& icon() const { return m_icon; }
/**
* returns the tooltip of this item.
* @see setToolTip
*/
- QString toolTip() const;
+ TQString toolTip() const;
/**
* returns the icon-group of this item (determines icon-effects).
* @see setIcon
@@ -148,7 +148,7 @@ public:
/**
* returns the pixmap of this item.
*/
- virtual const QPixmap * pixmap() const { return &m_pixmap; }
+ virtual const TQPixmap * pixmap() const { return &m_pixmap; }
/**
* Makes this item a local or global one. This has only an effect
@@ -174,18 +174,18 @@ public:
bool isPersistent() const;
protected:
- virtual void paint( QPainter *p );
+ virtual void paint( TQPainter *p );
private:
int iconSize() const;
- void init( const QString& icon, KIcon::Group group,
- const QString& description, bool persistent );
+ void init( const TQString& icon, KIcon::Group group,
+ const TQString& description, bool persistent );
KURL m_url;
- QString m_description;
- QString m_icon;
- QString m_toolTip;
- QPixmap m_pixmap;
+ TQString m_description;
+ TQString m_icon;
+ TQString m_toolTip;
+ TQPixmap m_pixmap;
KIcon::Group m_group;
KURLBar *m_parent;
bool m_appLocal :1;
@@ -237,7 +237,7 @@ public:
* allow global/local item separation.
*/
KURLBar( bool useGlobalItems,
- QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
/**
* Destroys the KURLBar.
*/
@@ -254,9 +254,9 @@ public:
* @p group the icon-group for using icon-effects
*/
virtual KURLBarItem * insertItem( const KURL& url,
- const QString& description,
+ const TQString& description,
bool applicationLocal = true,
- const QString& icon = QString::null,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* Inserts a new dynamic item into the KURLBar and returns the created
@@ -269,8 +269,8 @@ public:
* @since 3.2
*/
virtual KURLBarItem * insertDynamicItem( const KURL& url,
- const QString& description,
- const QString& icon = QString::null,
+ const TQString& description,
+ const TQString& icon = TQString::null,
KIcon::Group group = KIcon::Panel );
/**
* The items can be arranged either vertically in one column or
@@ -319,25 +319,25 @@ public:
* @returns a proper sizehint, depending on the orientation and the number
* of items available.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
/**
* @returns a proper minimum size (reimplemented)
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
* Call this method to read a saved configuration from @p config,
* inside the group @p itemGroup. All items in there will be restored.
* The reading of every item is delegated to the readItem() method.
*/
- virtual void readConfig( KConfig *config, const QString& itemGroup );
+ virtual void readConfig( KConfig *config, const TQString& itemGroup );
/**
* Call this method to save the current configuration into @p config,
* inside the group @p iconGroup. The writeItem() method is used
* to save each item.
*/
- virtual void writeConfig( KConfig *config, const QString& itemGroup );
+ virtual void writeConfig( KConfig *config, const TQString& itemGroup );
/**
* Called from readConfig() to read the i'th from @p config.
@@ -416,9 +416,9 @@ protected:
*/
virtual bool editItem( KURLBarItem *item );
- virtual void resizeEvent( QResizeEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
- virtual void paletteChange( const QPalette & );
+ virtual void paletteChange( const TQPalette & );
/**
* The currently active item.
@@ -446,21 +446,21 @@ protected slots:
* Reimplemented to show a contextmenu, allowing the user to add, edit
* or remove items, or change the iconsize.
*/
- virtual void slotContextMenuRequested( QListBoxItem *, const QPoint& pos );
+ virtual void slotContextMenuRequested( TQListBoxItem *, const TQPoint& pos );
/**
* Called when an item has been selected. Emits the activated()
* signal.
*/
- virtual void slotSelected( QListBoxItem * );
+ virtual void slotSelected( TQListBoxItem * );
/**
* Called when a url was dropped onto the bar to show a
* KURLBarItemDialog.
*/
- virtual void slotDropped( QDropEvent * );
+ virtual void slotDropped( TQDropEvent * );
private slots:
- void slotSelected( int button, QListBoxItem * );
+ void slotSelected( int button, TQListBoxItem * );
private:
KURLBarListBox *m_listBox;
@@ -498,7 +498,7 @@ public:
/**
* Constructs a KURLBarListBox.
*/
- KURLBarListBox( QWidget *parent = 0, const char *name = 0 );
+ KURLBarListBox( TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the box.
*/
@@ -523,18 +523,18 @@ signals:
/**
* Emitted when a drop-event happened.
*/
- void dropped( QDropEvent *e );
+ void dropped( TQDropEvent *e );
protected:
/**
- * @returns a suitable QDragObject when an item is dragged.
+ * @returns a suitable TQDragObject when an item is dragged.
*/
- virtual QDragObject * dragObject();
+ virtual TQDragObject * dragObject();
- virtual void contentsDragEnterEvent( QDragEnterEvent * );
- virtual void contentsDropEvent( QDropEvent * );
- virtual void contextMenuEvent( QContextMenuEvent * );
- virtual void paintEvent( QPaintEvent* );
+ virtual void contentsDragEnterEvent( TQDragEnterEvent * );
+ virtual void contentsDropEvent( TQDropEvent * );
+ virtual void contextMenuEvent( TQContextMenuEvent * );
+ virtual void paintEvent( TQPaintEvent* );
private:
Qt::Orientation m_orientation;
@@ -577,9 +577,9 @@ public:
* See the KURLBarItem constructor for the parameter description.
*/
static bool getInformation( bool allowGlobal, KURL& url,
- QString& description, QString& icon,
+ TQString& description, TQString& icon,
bool& appLocal, int iconSize,
- QWidget *parent = 0 );
+ TQWidget *parent = 0 );
/**
* Constructs a KURLBarItemDialog.
@@ -599,10 +599,10 @@ public:
* used (KMimeType::pixmapForURL()).
*/
KURLBarItemDialog( bool allowGlobal, const KURL& url,
- const QString& description, QString icon,
+ const TQString& description, TQString icon,
bool appLocal = true,
int iconSize = KIcon::SizeMedium,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *parent = 0, const char *name = 0 );
/**
* Destroys the dialog.
*/
@@ -616,12 +616,12 @@ public:
/**
* @returns the configured description
*/
- QString description() const;
+ TQString description() const;
/**
* @returns the configured icon
*/
- QString icon() const;
+ TQString icon() const;
/**
* @returns whether the item should be local to the application or global.
@@ -644,12 +644,12 @@ protected:
*/
KIconButton * m_iconButton;
/**
- * The QCheckBox to modify the local/global setting
+ * The TQCheckBox to modify the local/global setting
*/
- QCheckBox * m_appLocal;
+ TQCheckBox * m_appLocal;
public slots:
- void urlChanged(const QString & );
+ void urlChanged(const TQString & );
private:
class KURLBarItemDialogPrivate;
diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp
index 128e8a22c..72c7cbd07 100644
--- a/kio/kfile/kurlcombobox.cpp
+++ b/kio/kfile/kurlcombobox.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qlistbox.h>
+#include <tqdir.h>
+#include <tqlistbox.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -31,21 +31,21 @@ class KURLComboBox::KURLComboBoxPrivate
{
public:
KURLComboBoxPrivate() {
- dirpix = SmallIcon(QString::fromLatin1("folder"));
+ dirpix = SmallIcon(TQString::fromLatin1("folder"));
}
- QPixmap dirpix;
+ TQPixmap dirpix;
};
-KURLComboBox::KURLComboBox( Mode mode, QWidget *parent, const char *name )
+KURLComboBox::KURLComboBox( Mode mode, TQWidget *parent, const char *name )
: KComboBox( parent, name )
{
init( mode );
}
-KURLComboBox::KURLComboBox( Mode mode, bool rw, QWidget *parent,
+KURLComboBox::KURLComboBox( Mode mode, bool rw, TQWidget *parent,
const char *name )
: KComboBox( rw, parent, name )
{
@@ -70,20 +70,20 @@ void KURLComboBox::init( Mode mode )
defaultList.setAutoDelete( true );
setInsertionPolicy( NoInsertion );
setTrapReturnKey( true );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ));
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ));
- opendirPix = SmallIcon(QString::fromLatin1("folder_open"));
+ opendirPix = SmallIcon(TQString::fromLatin1("folder_open"));
- connect( this, SIGNAL( activated( int )), SLOT( slotActivated( int )));
+ connect( this, TQT_SIGNAL( activated( int )), TQT_SLOT( slotActivated( int )));
}
-QStringList KURLComboBox::urls() const
+TQStringList KURLComboBox::urls() const
{
kdDebug(250) << "::urls()" << endl;
- //static const QString &fileProt = KGlobal::staticQString("file:");
- QStringList list;
- QString url;
+ //static const TQString &fileProt = KGlobal::staticQString("file:");
+ TQStringList list;
+ TQString url;
for ( int i = defaultList.count(); i < count(); i++ ) {
url = text( i );
if ( !url.isEmpty() ) {
@@ -98,14 +98,14 @@ QStringList KURLComboBox::urls() const
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQString& text )
{
addDefaultURL( url, getPixmap( url ), text );
}
-void KURLComboBox::addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text )
+void KURLComboBox::addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text )
{
KURLComboItem *item = new KURLComboItem;
item->url = url;
@@ -134,12 +134,12 @@ void KURLComboBox::setDefaults()
}
}
-void KURLComboBox::setURLs( QStringList urls )
+void KURLComboBox::setURLs( TQStringList urls )
{
setURLs( urls, RemoveBottom );
}
-void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
+void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove )
{
setDefaults();
itemList.clear();
@@ -147,10 +147,10 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
if ( urls.isEmpty() )
return;
- QStringList::Iterator it = urls.begin();
+ TQStringList::Iterator it = urls.begin();
// kill duplicates
- QString text;
+ TQString text;
while ( it != urls.end() ) {
while ( urls.contains( *it ) > 1 ) {
it = urls.remove( it );
@@ -181,7 +181,7 @@ void KURLComboBox::setURLs( QStringList urls, OverLoadResolving remove )
u = KURL::fromPathOrURL( *it );
// Don't restore if file doesn't exist anymore
- if (u.isLocalFile() && !QFile::exists(u.path())) {
+ if (u.isLocalFile() && !TQFile::exists(u.path())) {
++it;
continue;
}
@@ -210,8 +210,8 @@ void KURLComboBox::setURL( const KURL& url )
blockSignals( true );
// check for duplicates
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
- QString urlToInsert = url.url(-1);
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQString urlToInsert = url.url(-1);
while ( mit != itemMapper.end() ) {
if ( urlToInsert == mit.data()->url.url(-1) ) {
setCurrentItem( mit.key() );
@@ -235,7 +235,7 @@ void KURLComboBox::setURL( const KURL& url )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
for( ; it.current(); ++it )
insertURLItem( it.current() );
@@ -249,7 +249,7 @@ void KURLComboBox::setURL( const KURL& url )
kdDebug(250) << "setURL: text=" << item->text << endl;
int id = count();
- QString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
+ TQString text = /*isEditable() ? item->url.prettyURL( myMode ) : */ item->text;
if ( myMode == Directories )
KComboBox::insertItem( opendirPix, text, id );
@@ -293,7 +293,7 @@ void KURLComboBox::setMaxItems( int max )
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
int Overload = itemList.count() - myMaximum + defaultList.count();
for ( int i = 0; i <= Overload; i++ )
++it;
@@ -312,7 +312,7 @@ void KURLComboBox::setMaxItems( int max )
void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
{
- QMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
+ TQMap<int,const KURLComboItem*>::ConstIterator mit = itemMapper.begin();
while ( mit != itemMapper.end() ) {
if ( url.url(-1) == mit.data()->url.url(-1) ) {
if ( !itemList.remove( mit.data() ) && checkDefaultURLs )
@@ -323,7 +323,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
blockSignals( true );
setDefaults();
- QPtrListIterator<KURLComboItem> it( itemList );
+ TQPtrListIterator<KURLComboItem> it( itemList );
while ( it.current() ) {
insertURLItem( *it );
++it;
@@ -332,7 +332,7 @@ void KURLComboBox::removeURL( const KURL& url, bool checkDefaultURLs )
}
-QPixmap KURLComboBox::getPixmap( const KURL& url ) const
+TQPixmap KURLComboBox::getPixmap( const KURL& url ) const
{
if ( myMode == Directories )
return d->dirpix;
@@ -344,9 +344,9 @@ QPixmap KURLComboBox::getPixmap( const KURL& url ) const
// updates "item" with pixmap "pixmap" and sets the URL instead of text
// works around a Qt bug.
void KURLComboBox::updateItem( const KURLComboItem *item,
- int index, const QPixmap& pixmap )
+ int index, const TQPixmap& pixmap )
{
- // QComboBox::changeItem() doesn't honor the pixmap when
+ // TQComboBox::changeItem() doesn't honor the pixmap when
// using an editable combobox, so we just remove and insert
if ( editable() ) {
removeItem( index );
diff --git a/kio/kfile/kurlcombobox.h b/kio/kfile/kurlcombobox.h
index 7485bfed9..d65cd91f5 100644
--- a/kio/kfile/kurlcombobox.h
+++ b/kio/kfile/kurlcombobox.h
@@ -19,11 +19,11 @@
#ifndef KURLCOMBOBOX_H
#define KURLCOMBOBOX_H
-#include <qevent.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
#include <kcombobox.h>
#include <kurl.h>
@@ -41,7 +41,7 @@
class KIO_EXPORT KURLComboBox : public KComboBox
{
Q_OBJECT
- Q_PROPERTY(QStringList urls READ urls WRITE setURLs DESIGNABLE true)
+ Q_PROPERTY(TQStringList urls READ urls WRITE setURLs DESIGNABLE true)
Q_PROPERTY(int maxItems READ maxItems WRITE setMaxItems DESIGNABLE true)
public:
@@ -73,8 +73,8 @@ public:
* @param parent The parent object of this widget.
* @param name The name of this widget.
*/
- KURLComboBox( Mode mode, QWidget *parent=0, const char *name=0 );
- KURLComboBox( Mode mode, bool rw, QWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, TQWidget *parent=0, const char *name=0 );
+ KURLComboBox( Mode mode, bool rw, TQWidget *parent=0, const char *name=0 );
/**
* Destructs the combo box.
*/
@@ -101,7 +101,7 @@ public:
* If the list of urls contains more items than maxItems, the first items
* will be stripped.
*/
- void setURLs( QStringList urls );
+ void setURLs( TQStringList urls );
/**
* Inserts @p urls into the combobox below the "default urls" (see
@@ -110,7 +110,7 @@ public:
* If the list of urls contains more items than maxItems, the @p remove
* parameter determines whether the first or last items will be stripped.
*/
- void setURLs( QStringList urls, OverLoadResolving remove );
+ void setURLs( TQStringList urls, OverLoadResolving remove );
/**
* @returns a list of all urls currently handled. The list contains at most
@@ -122,7 +122,7 @@ public:
* You will always get fully qualified urls, i.e. with protocol like
* file:/
*/
- QStringList urls() const;
+ TQStringList urls() const;
/**
* Sets how many items should be handled and displayed by the combobox.
@@ -144,7 +144,7 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQString& text = TQString::null );
/**
* Adds a url that will always be shown in the combobox, it can't be
@@ -154,8 +154,8 @@ public:
* the pixmap parameter.
* Default URLs will be inserted into the combobox by setDefaults()
*/
- void addDefaultURL( const KURL& url, const QPixmap& pix,
- const QString& text = QString::null );
+ void addDefaultURL( const KURL& url, const TQPixmap& pix,
+ const TQString& text = TQString::null );
/**
* Clears all items and inserts the default urls into the combo. Will be
@@ -185,14 +185,14 @@ protected slots:
protected:
struct _KURLComboItem {
- QString text;
+ TQString text;
KURL url;
- QPixmap pixmap;
+ TQPixmap pixmap;
};
typedef _KURLComboItem KURLComboItem;
- QPtrList<KURLComboItem> itemList;
- QPtrList<KURLComboItem> defaultList;
- QMap<int,const KURLComboItem*> itemMapper;
+ TQPtrList<KURLComboItem> itemList;
+ TQPtrList<KURLComboItem> defaultList;
+ TQMap<int,const KURLComboItem*> itemMapper;
void init( Mode mode );
void insertURLItem( const KURLComboItem * );
@@ -201,16 +201,16 @@ protected:
* Uses KMimeType::pixmapForURL() to return a proper pixmap for @p url.
* In directory mode, a folder icon is always returned.
*/
- QPixmap getPixmap( const KURL& url ) const;
+ TQPixmap getPixmap( const KURL& url ) const;
/**
* Updates @p item with @p pixmap and sets the url instead of the text
* of the KURLComboItem.
* Also works around a Qt bug.
*/
- void updateItem( const KURLComboItem *item, int index, const QPixmap& pix);
+ void updateItem( const KURLComboItem *item, int index, const TQPixmap& pix);
- QPixmap opendirPix;
+ TQPixmap opendirPix;
int firstItemIndex;
diff --git a/kio/kfile/kurlrequester.cpp b/kio/kfile/kurlrequester.cpp
index 0f4619fd8..ae8f5b623 100644
--- a/kio/kfile/kurlrequester.cpp
+++ b/kio/kfile/kurlrequester.cpp
@@ -20,9 +20,9 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qapplication.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
#include <kaccel.h>
#include <kcombobox.h>
@@ -44,7 +44,7 @@
class KURLDragPushButton : public KPushButton
{
public:
- KURLDragPushButton( QWidget *parent, const char *name=0 )
+ KURLDragPushButton( TQWidget *parent, const char *name=0 )
: KPushButton( parent, name ) {
setDragEnabled( true );
}
@@ -63,11 +63,11 @@ public:
*/
protected:
- virtual QDragObject *dragObject() {
+ virtual TQDragObject *dragObject() {
if ( m_urls.isEmpty() )
return 0L;
- QDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
+ TQDragObject *drag = new KURLDrag( m_urls, this, "url drag" );
return drag;
}
@@ -90,7 +90,7 @@ public:
fileDialogMode = KFile::File | KFile::ExistingOnly | KFile::LocalOnly;
}
- void setText( const QString& text ) {
+ void setText( const TQString& text ) {
if ( combo )
{
if (combo->editable())
@@ -109,19 +109,19 @@ public:
}
}
- void connectSignals( QObject *receiver ) {
- QObject *sender;
+ void connectSignals( TQObject *receiver ) {
+ TQObject *sender;
if ( combo )
sender = combo;
else
sender = edit;
- connect( sender, SIGNAL( textChanged( const QString& )),
- receiver, SIGNAL( textChanged( const QString& )));
- connect( sender, SIGNAL( returnPressed() ),
- receiver, SIGNAL( returnPressed() ));
- connect( sender, SIGNAL( returnPressed( const QString& ) ),
- receiver, SIGNAL( returnPressed( const QString& ) ));
+ connect( sender, TQT_SIGNAL( textChanged( const TQString& )),
+ receiver, TQT_SIGNAL( textChanged( const TQString& )));
+ connect( sender, TQT_SIGNAL( returnPressed() ),
+ receiver, TQT_SIGNAL( returnPressed() ));
+ connect( sender, TQT_SIGNAL( returnPressed( const TQString& ) ),
+ receiver, TQT_SIGNAL( returnPressed( const TQString& ) ));
}
void setCompletionObject( KCompletion *comp ) {
@@ -134,8 +134,8 @@ public:
/**
* replaces ~user or $FOO, if necessary
*/
- QString url() {
- QString txt = combo ? combo->currentText() : edit->text();
+ TQString url() {
+ TQString txt = combo ? combo->currentText() : edit->text();
KURLCompletion *comp;
if ( combo )
comp = dynamic_cast<KURLCompletion*>(combo->completionObject());
@@ -151,19 +151,19 @@ public:
KLineEdit *edit;
KComboBox *combo;
int fileDialogMode;
- QString fileDialogFilter;
+ TQString fileDialogFilter;
};
-KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
+KURLRequester::KURLRequester( TQWidget *editWidget, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
// must have this as parent
- editWidget->reparent( this, 0, QPoint(0,0) );
+ editWidget->reparent( this, 0, TQPoint(0,0) );
d->edit = dynamic_cast<KLineEdit*>( editWidget );
d->combo = dynamic_cast<KComboBox*>( editWidget );
@@ -171,17 +171,17 @@ KURLRequester::KURLRequester( QWidget *editWidget, QWidget *parent,
}
-KURLRequester::KURLRequester( QWidget *parent, const char *name )
- : QHBox( parent, name )
+KURLRequester::KURLRequester( TQWidget *parent, const char *name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
}
-KURLRequester::KURLRequester( const QString& url, QWidget *parent,
+KURLRequester::KURLRequester( const TQString& url, TQWidget *parent,
const char *name )
- : QHBox( parent, name )
+ : TQHBox( parent, name )
{
d = new KURLRequesterPrivate;
init();
@@ -206,33 +206,33 @@ void KURLRequester::init()
d->edit = new KLineEdit( this, "line edit" );
myButton = new KURLDragPushButton( this, "kfile button");
- QIconSet iconSet = SmallIconSet(QString::fromLatin1("fileopen"));
- QPixmap pixMap = iconSet.pixmap( QIconSet::Small, QIconSet::Normal );
+ TQIconSet iconSet = SmallIconSet(TQString::fromLatin1("fileopen"));
+ TQPixmap pixMap = iconSet.pixmap( TQIconSet::Small, TQIconSet::Normal );
myButton->setIconSet( iconSet );
myButton->setFixedSize( pixMap.width()+8, pixMap.height()+8 );
- QToolTip::add(myButton, i18n("Open file dialog"));
+ TQToolTip::add(myButton, i18n("Open file dialog"));
- connect( myButton, SIGNAL( pressed() ), SLOT( slotUpdateURL() ));
+ connect( myButton, TQT_SIGNAL( pressed() ), TQT_SLOT( slotUpdateURL() ));
setSpacing( KDialog::spacingHint() );
- QWidget *widget = d->combo ? (QWidget*) d->combo : (QWidget*) d->edit;
+ TQWidget *widget = d->combo ? (TQWidget*) d->combo : (TQWidget*) d->edit;
widget->installEventFilter( this );
setFocusProxy( widget );
d->connectSignals( this );
- connect( myButton, SIGNAL( clicked() ), this, SLOT( slotOpenDialog() ));
+ connect( myButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOpenDialog() ));
myCompletion = new KURLCompletion();
d->setCompletionObject( myCompletion );
KAccel *accel = new KAccel( this );
- accel->insert( KStdAccel::Open, this, SLOT( slotOpenDialog() ));
+ accel->insert( KStdAccel::Open, this, TQT_SLOT( slotOpenDialog() ));
accel->readSettings();
}
-void KURLRequester::setURL( const QString& url )
+void KURLRequester::setURL( const TQString& url )
{
if ( myShowLocalProt )
{
@@ -258,14 +258,14 @@ void KURLRequester::setKURL( const KURL& url )
d->setText( url.pathOrURL() );
}
-void KURLRequester::setCaption( const QString& caption )
+void KURLRequester::setCaption( const TQString& caption )
{
- QWidget::setCaption( caption );
+ TQWidget::setCaption( caption );
if (myFileDialog)
myFileDialog->setCaption( caption );
}
-QString KURLRequester::url() const
+TQString KURLRequester::url() const
{
return d->url();
}
@@ -296,7 +296,7 @@ void KURLRequester::slotOpenDialog()
dlg->setSelection( u.url() );
}
- if ( dlg->exec() != QDialog::Accepted )
+ if ( dlg->exec() != TQDialog::Accepted )
{
return;
}
@@ -324,14 +324,14 @@ unsigned int KURLRequester::mode() const
return d->fileDialogMode;
}
-void KURLRequester::setFilter(const QString &filter)
+void KURLRequester::setFilter(const TQString &filter)
{
d->fileDialogFilter = filter;
if (myFileDialog)
myFileDialog->setFilter( d->fileDialogFilter );
}
-QString KURLRequester::filter( ) const
+TQString KURLRequester::filter( ) const
{
return d->fileDialogFilter;
}
@@ -340,8 +340,8 @@ QString KURLRequester::filter( ) const
KFileDialog * KURLRequester::fileDialog() const
{
if ( !myFileDialog ) {
- QWidget *p = parentWidget();
- myFileDialog = new KFileDialog( QString::null, d->fileDialogFilter, p,
+ TQWidget *p = parentWidget();
+ myFileDialog = new KFileDialog( TQString::null, d->fileDialogFilter, p,
"file dialog", true );
myFileDialog->setMode( d->fileDialogMode );
@@ -363,7 +363,7 @@ void KURLRequester::setShowLocalProtocol( bool b )
void KURLRequester::clear()
{
- d->setText( QString::null );
+ d->setText( TQString::null );
}
KLineEdit * KURLRequester::lineEdit() const
@@ -380,19 +380,19 @@ void KURLRequester::slotUpdateURL()
{
// bin compat, myButton is declared as QPushButton
KURL u;
- u = KURL( KURL( QDir::currentDirPath() + '/' ), url() );
+ u = KURL( KURL( TQDir::currentDirPath() + '/' ), url() );
(static_cast<KURLDragPushButton *>( myButton ))->setURL( u );
}
-bool KURLRequester::eventFilter( QObject *obj, QEvent *ev )
+bool KURLRequester::eventFilter( TQObject *obj, TQEvent *ev )
{
if ( ( d->edit == obj ) || ( d->combo == obj ) )
{
- if (( ev->type() == QEvent::FocusIn ) || ( ev->type() == QEvent::FocusOut ))
+ if (( ev->type() == TQEvent::FocusIn ) || ( ev->type() == TQEvent::FocusOut ))
// Forward focusin/focusout events to the urlrequester; needed by file form element in khtml
- QApplication::sendEvent( this, ev );
+ TQApplication::sendEvent( this, ev );
}
- return QWidget::eventFilter( obj, ev );
+ return TQWidget::eventFilter( obj, ev );
}
KPushButton * KURLRequester::button() const
@@ -402,8 +402,8 @@ KPushButton * KURLRequester::button() const
KEditListBox::CustomEditor KURLRequester::customEditor()
{
- setSizePolicy(QSizePolicy( QSizePolicy::Preferred,
- QSizePolicy::Fixed));
+ setSizePolicy(TQSizePolicy( TQSizePolicy::Preferred,
+ TQSizePolicy::Fixed));
KLineEdit *edit = d->edit;
if ( !edit && d->combo )
@@ -421,7 +421,7 @@ KEditListBox::CustomEditor KURLRequester::customEditor()
void KURLRequester::virtual_hook( int, void* )
{ /*BASE::virtual_hook( id, data );*/ }
-KURLComboRequester::KURLComboRequester( QWidget *parent,
+KURLComboRequester::KURLComboRequester( TQWidget *parent,
const char *name )
: KURLRequester( new KComboBox(false), parent, name)
{
diff --git a/kio/kfile/kurlrequester.h b/kio/kfile/kurlrequester.h
index 1a7016b24..b22e353dd 100644
--- a/kio/kfile/kurlrequester.h
+++ b/kio/kfile/kurlrequester.h
@@ -20,7 +20,7 @@
#ifndef KURLREQUESTER_H
#define KURLREQUESTER_H
-#include <qhbox.h>
+#include <tqhbox.h>
#include <keditlistbox.h>
#include <kfile.h>
@@ -56,22 +56,22 @@ class QTimer;
class KIO_EXPORT KURLRequester : public QHBox
{
Q_OBJECT
- Q_PROPERTY( QString url READ url WRITE setURL )
+ Q_PROPERTY( TQString url READ url WRITE setURL )
Q_PROPERTY( bool showLocalProtocol READ showLocalProtocol WRITE setShowLocalProtocol )
- Q_PROPERTY( QString filter READ filter WRITE setFilter )
+ Q_PROPERTY( TQString filter READ filter WRITE setFilter )
Q_PROPERTY( uint mode READ mode WRITE setMode )
public:
/**
* Constructs a KURLRequester widget.
*/
- KURLRequester( QWidget *parent=0, const char *name=0 );
+ KURLRequester( TQWidget *parent=0, const char *name=0 );
/**
* Constructs a KURLRequester widget with the initial URL @p url.
* // TODO KDE4: Use KURL instead
*/
- KURLRequester( const QString& url, QWidget *parent=0, const char *name=0 );
+ KURLRequester( const TQString& url, TQWidget *parent=0, const char *name=0 );
/**
* Special constructor, which creates a KURLRequester widget with a custom
@@ -79,7 +79,7 @@ public:
* (or inherited thereof). Note: for geometry management reasons, the
* edit-widget is reparented to have the KURLRequester as parent.
*/
- KURLRequester( QWidget *editWidget, QWidget *parent, const char *name=0 );
+ KURLRequester( TQWidget *editWidget, TQWidget *parent, const char *name=0 );
/**
* Destructs the KURLRequester.
*/
@@ -91,7 +91,7 @@ public:
* for local files.
* // TODO KDE4: Use KURL so that the result is properly defined
*/
- QString url() const;
+ TQString url() const;
/**
* Enables/disables showing file:/ in the lineedit, when a local file has
@@ -121,14 +121,14 @@ public:
* Sets the filter for the file dialog.
* @see KFileDialog::setFilter()
*/
- void setFilter( const QString& filter );
+ void setFilter( const TQString& filter );
/**
* Returns the current filter for the file dialog.
* @see KFileDialog::filter()
* @since 3.3
*/
- QString filter() const;
+ TQString filter() const;
/**
* @returns whether local files will be prefixed with file:/ in the
@@ -194,7 +194,7 @@ public slots:
* @since 3.1
* // TODO KDE4: Use KURL instead
*/
- void setURL( const QString& url );
+ void setURL( const TQString& url );
/**
* Sets the url in the lineedit to @p url.
@@ -207,7 +207,7 @@ public slots:
* Sets the caption of the file dialog.
* @since 3.1
*/
- virtual void setCaption( const QString& caption );
+ virtual void setCaption( const TQString& caption );
/**
* Clears the lineedit/combobox.
@@ -221,7 +221,7 @@ signals:
* The parameter contains the contents of the lineedit.
* @since 3.1
*/
- void textChanged( const QString& );
+ void textChanged( const TQString& );
/**
* Emitted when return or enter was pressed in the lineedit.
@@ -232,7 +232,7 @@ signals:
* Emitted when return or enter was pressed in the lineedit.
* The parameter contains the contents of the lineedit.
*/
- void returnPressed( const QString& );
+ void returnPressed( const TQString& );
/**
* Emitted before the filedialog is going to open. Connect
@@ -252,7 +252,7 @@ signals:
* The parameter contains the contents of the lineedit.
* // TODO KDE4: Use KURL instead
*/
- void urlSelected( const QString& );
+ void urlSelected( const TQString& );
protected:
void init();
@@ -278,7 +278,7 @@ private slots:
protected:
virtual void virtual_hook( int id, void* data );
- bool eventFilter( QObject *obj, QEvent *ev );
+ bool eventFilter( TQObject *obj, TQEvent *ev );
private:
class KURLRequesterPrivate;
KURLRequesterPrivate *d;
@@ -294,7 +294,7 @@ public:
/**
* Constructs a KURLRequester widget with a combobox.
*/
- KURLComboRequester( QWidget *parent=0, const char *name=0 );
+ KURLComboRequester( TQWidget *parent=0, const char *name=0 );
};
diff --git a/kio/kfile/kurlrequesterdlg.cpp b/kio/kfile/kurlrequesterdlg.cpp
index ed89f599b..19409afdc 100644
--- a/kio/kfile/kurlrequesterdlg.cpp
+++ b/kio/kfile/kurlrequesterdlg.cpp
@@ -21,10 +21,10 @@
#include <sys/stat.h>
#include <unistd.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
+#include <tqtoolbutton.h>
#include <kaccel.h>
#include <kfiledialog.h>
@@ -39,16 +39,16 @@
#include "kurlrequesterdlg.h"
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, QWidget *parent,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, TQWidget *parent,
const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(i18n( "Location:" ), urlName);
}
-KURLRequesterDlg::KURLRequesterDlg( const QString& urlName, const QString& _text, QWidget *parent, const char *name, bool modal )
- : KDialogBase( Plain, QString::null, Ok|Cancel|User1, Ok, parent, name,
+KURLRequesterDlg::KURLRequesterDlg( const TQString& urlName, const TQString& _text, TQWidget *parent, const char *name, bool modal )
+ : KDialogBase( Plain, TQString::null, Ok|Cancel|User1, Ok, parent, name,
modal, true, KStdGuiItem::clear() )
{
initDialog(_text, urlName);
@@ -58,20 +58,20 @@ KURLRequesterDlg::~KURLRequesterDlg()
{
}
-void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
+void KURLRequesterDlg::initDialog(const TQString &text,const TQString &urlName)
{
- QVBoxLayout * topLayout = new QVBoxLayout( plainPage(), 0,
+ TQVBoxLayout * topLayout = new TQVBoxLayout( plainPage(), 0,
spacingHint() );
- QLabel * label = new QLabel( text , plainPage() );
+ TQLabel * label = new TQLabel( text , plainPage() );
topLayout->addWidget( label );
urlRequester_ = new KURLRequester( urlName, plainPage(), "urlRequester" );
urlRequester_->setMinimumWidth( urlRequester_->sizeHint().width() * 3 );
topLayout->addWidget( urlRequester_ );
urlRequester_->setFocus();
- connect( urlRequester_->lineEdit(), SIGNAL(textChanged(const QString&)),
- SLOT(slotTextChanged(const QString&)) );
+ connect( urlRequester_->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotTextChanged(const TQString&)) );
bool state = !urlName.isEmpty();
enableButtonOK( state );
enableButton( KDialogBase::User1, state );
@@ -80,10 +80,10 @@ void KURLRequesterDlg::initDialog(const QString &text,const QString &urlName)
KFile::ExistingOnly );
urlRequester_->setMode( mode );
*/
- connect( this, SIGNAL( user1Clicked() ), SLOT( slotClear() ) );
+ connect( this, TQT_SIGNAL( user1Clicked() ), TQT_SLOT( slotClear() ) );
}
-void KURLRequesterDlg::slotTextChanged(const QString & text)
+void KURLRequesterDlg::slotTextChanged(const TQString & text)
{
bool state = !text.stripWhiteSpace().isEmpty();
enableButtonOK( state );
@@ -97,15 +97,15 @@ void KURLRequesterDlg::slotClear()
KURL KURLRequesterDlg::selectedURL() const
{
- if ( result() == QDialog::Accepted )
+ if ( result() == TQDialog::Accepted )
return KURL::fromPathOrURL( urlRequester_->url() );
else
return KURL();
}
-KURL KURLRequesterDlg::getURL(const QString& dir, QWidget *parent,
- const QString& caption)
+KURL KURLRequesterDlg::getURL(const TQString& dir, TQWidget *parent,
+ const TQString& caption)
{
KURLRequesterDlg dlg(dir, parent, "filedialog", true);
diff --git a/kio/kfile/kurlrequesterdlg.h b/kio/kfile/kurlrequesterdlg.h
index a4f2cf0f3..3f13a844d 100644
--- a/kio/kfile/kurlrequesterdlg.h
+++ b/kio/kfile/kurlrequesterdlg.h
@@ -43,7 +43,7 @@ public:
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param parent The parent object of this widget.
@@ -51,13 +51,13 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, QWidget *parent,
+ KURLRequesterDlg( const TQString& url, TQWidget *parent,
const char *name, bool modal = true );
/**
* Constructs a KURLRequesterDlg.
*
- * @param url The url of the directory to start in. Use QString::null
+ * @param url The url of the directory to start in. Use TQString::null
* to start in the current working directory, or the last
* directory where a file has been selected.
* @param text Text of the label
@@ -66,8 +66,8 @@ public:
* @param modal Specifies whether the dialog should be opened as modal
* or not.
*/
- KURLRequesterDlg( const QString& url, const QString& text,
- QWidget *parent, const char *name, bool modal=true );
+ KURLRequesterDlg( const TQString& url, const TQString& text,
+ TQWidget *parent, const char *name, bool modal=true );
/**
* Destructs the dialog.
*/
@@ -85,8 +85,8 @@ public:
* @param parent The widget the dialog will be centered on initially.
* @param caption The caption to use for the dialog.
*/
- static KURL getURL(const QString& url = QString::null,
- QWidget *parent= 0, const QString& caption = QString::null);
+ static KURL getURL(const TQString& url = TQString::null,
+ TQWidget *parent= 0, const TQString& caption = TQString::null);
/**
* Returns a pointer to the file dialog used by the KURLRequester.
@@ -99,9 +99,9 @@ public:
private slots:
void slotClear();
- void slotTextChanged(const QString &);
+ void slotTextChanged(const TQString &);
private:
- void initDialog(const QString &text, const QString &url);
+ void initDialog(const TQString &text, const TQString &url);
KURLRequester *urlRequester_;
class KURLRequesterDlgPrivate;
diff --git a/kio/kfile/tests/kdirselectdialogtest.cpp b/kio/kfile/tests/kdirselectdialogtest.cpp
index e2eb52f1b..47fcd02ca 100644
--- a/kio/kfile/tests/kdirselectdialogtest.cpp
+++ b/kio/kfile/tests/kdirselectdialogtest.cpp
@@ -7,10 +7,10 @@ int main( int argc, char **argv )
{
KApplication app(argc, argv, "kdirselectdialogtest");
- KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : QString::null );
+ KURL u = KDirSelectDialog::selectDirectory( (argc >= 1) ? argv[1] : TQString::null );
if ( u.isValid() )
KMessageBox::information( 0L,
- QString::fromLatin1("You selected the url: %1")
+ TQString::fromLatin1("You selected the url: %1")
.arg( u.prettyURL() ), "Selected URL" );
return 0;
diff --git a/kio/kfile/tests/kfdtest.cpp b/kio/kfile/tests/kfdtest.cpp
index d9341a7ae..25e2da949 100644
--- a/kio/kfile/tests/kfdtest.cpp
+++ b/kio/kfile/tests/kfdtest.cpp
@@ -1,31 +1,31 @@
#include "kfdtest.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kfiledialog.h>
#include <kapplication.h>
#include <kmessagebox.h>
-#include <qtimer.h>
+#include <tqtimer.h>
-KFDTest::KFDTest( const QString& startDir, QObject *parent, const char *name )
- : QObject( parent, name ),
+KFDTest::KFDTest( const TQString& startDir, TQObject *parent, const char *name )
+ : TQObject( parent, name ),
m_startDir( startDir )
{
- QTimer::singleShot( 1000, this, SLOT( doit() ));
+ TQTimer::singleShot( 1000, this, TQT_SLOT( doit() ));
}
void KFDTest::doit()
{
- KFileDialog *dlg = new KFileDialog( m_startDir, QString::null, 0L,
+ KFileDialog *dlg = new KFileDialog( m_startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
if ( dlg->exec() == KDialog::Accepted )
{
- KMessageBox::information(0, QString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file: %1").arg( dlg->selectedURL().prettyURL() ));
}
// qApp->quit();
diff --git a/kio/kfile/tests/kfdtest.h b/kio/kfile/tests/kfdtest.h
index 0743bb96c..3f980bc94 100644
--- a/kio/kfile/tests/kfdtest.h
+++ b/kio/kfile/tests/kfdtest.h
@@ -8,20 +8,20 @@
#ifndef KFDTEST_H
#define KFDTEST_H
-#include <qobject.h>
+#include <tqobject.h>
class KFDTest : public QObject
{
Q_OBJECT
public:
- KFDTest( const QString& startDir, QObject *parent = 0, const char *name = 0);
+ KFDTest( const TQString& startDir, TQObject *parent = 0, const char *name = 0);
public slots:
void doit();
private:
- QString m_startDir;
+ TQString m_startDir;
};
diff --git a/kio/kfile/tests/kfiletreeviewtest.cpp b/kio/kfile/tests/kfiletreeviewtest.cpp
index 6a4ea719f..5c520dd5d 100644
--- a/kio/kfile/tests/kfiletreeviewtest.cpp
+++ b/kio/kfile/tests/kfiletreeviewtest.cpp
@@ -17,7 +17,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <kglobal.h>
#include <kiconloader.h>
@@ -45,30 +45,30 @@ testFrame::testFrame():KMainWindow(0,"Test FileTreeView"),
/* Connect to see the status bar */
KStatusBar* sta = statusBar();
- connect( treeView, SIGNAL( onItem( const QString& )),
- sta, SLOT( message( const QString& )));
+ connect( treeView, TQT_SIGNAL( onItem( const TQString& )),
+ sta, TQT_SLOT( message( const TQString& )));
- connect( treeView, SIGNAL( dropped( QWidget*, QDropEvent*, KURL::List& )),
- this, SLOT( urlsDropped( QWidget*, QDropEvent*, KURL::List& )));
+ connect( treeView, TQT_SIGNAL( dropped( TQWidget*, TQDropEvent*, KURL::List& )),
+ this, TQT_SLOT( urlsDropped( TQWidget*, TQDropEvent*, KURL::List& )));
- connect( treeView, SIGNAL( dropped( KURL::List&, KURL& )), this,
- SLOT( copyURLs( KURL::List&, KURL& )));
+ connect( treeView, TQT_SIGNAL( dropped( KURL::List&, KURL& )), this,
+ TQT_SLOT( copyURLs( KURL::List&, KURL& )));
treeView->addColumn( "File" );
treeView->addColumn( "ChildCount" );
setCentralWidget( treeView );
resize( 600, 400 );
- showPath( KURL::fromPathOrURL( QDir::homeDirPath() ));
+ showPath( KURL::fromPathOrURL( TQDir::homeDirPath() ));
}
void testFrame::showPath( const KURL &url )
{
- QString fname = "TestBranch"; // url.fileName ();
+ TQString fname = "TestBranch"; // url.fileName ();
/* try a user icon */
KIconLoader *loader = KGlobal::iconLoader();
- QPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
- QPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
+ TQPixmap pix = loader->loadIcon( "contents2", KIcon::Small );
+ TQPixmap pixOpen = loader->loadIcon( "contents", KIcon::Small );
KFileTreeBranch *nb = treeView->addBranch( url, fname, pix );
@@ -77,10 +77,10 @@ void testFrame::showPath( const KURL &url )
if( dirOnlyMode ) treeView->setDirOnlyMode( nb, true );
nb->setOpenPixmap( pixOpen );
- connect( nb, SIGNAL(populateFinished(KFileTreeViewItem*)),
- this, SLOT(slotPopulateFinished(KFileTreeViewItem*)));
- connect( nb, SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
- this, SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
+ connect( nb, TQT_SIGNAL(populateFinished(KFileTreeViewItem*)),
+ this, TQT_SLOT(slotPopulateFinished(KFileTreeViewItem*)));
+ connect( nb, TQT_SIGNAL( directoryChildCount( KFileTreeViewItem *, int )),
+ this, TQT_SLOT( slotSetChildCount( KFileTreeViewItem*, int )));
// nb->setChildRecurse(false );
nb->setOpen(true);
@@ -89,7 +89,7 @@ void testFrame::showPath( const KURL &url )
}
-void testFrame::urlsDropped( QWidget* , QDropEvent* , KURL::List& list )
+void testFrame::urlsDropped( TQWidget* , TQDropEvent* , KURL::List& list )
{
KURL::List::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) {
@@ -117,7 +117,7 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
kdDebug() << "setting column 2 of treeview with count " << cc << endl;
- item->setText( 1, QString::number( cc ));
+ item->setText( 1, TQString::number( cc ));
#endif
}
else
@@ -129,16 +129,16 @@ void testFrame::slotPopulateFinished(KFileTreeViewItem *item )
void testFrame::slotSetChildCount( KFileTreeViewItem *item, int c )
{
if( item )
- item->setText(1, QString::number( c ));
+ item->setText(1, TQString::number( c ));
}
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfiletreeviewtest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
+ TQString argv1;
testFrame *tf;
tf = new testFrame();
@@ -148,7 +148,7 @@ int main(int argc, char **argv)
{
for( int i = 1; i < argc; i++ )
{
- argv1 = QString::fromLatin1(argv[i]);
+ argv1 = TQString::fromLatin1(argv[i]);
kdDebug() << "Opening " << argv1 << endl;
if( argv1 == "-d" )
tf->setDirOnly();
diff --git a/kio/kfile/tests/kfiletreeviewtest.h b/kio/kfile/tests/kfiletreeviewtest.h
index 1286e1be2..4ae791ce5 100644
--- a/kio/kfile/tests/kfiletreeviewtest.h
+++ b/kio/kfile/tests/kfiletreeviewtest.h
@@ -31,7 +31,7 @@ public slots:
void slotPopulateFinished(KFileTreeViewItem *);
void slotSetChildCount( KFileTreeViewItem *item, int c );
- void urlsDropped( QWidget*, QDropEvent*, KURL::List& );
+ void urlsDropped( TQWidget*, TQDropEvent*, KURL::List& );
void copyURLs( KURL::List& list, KURL& to );
private:
KFileTreeView *treeView;
diff --git a/kio/kfile/tests/kfstest.cpp b/kio/kfile/tests/kfstest.cpp
index 16d74cb0c..b84cbc967 100644
--- a/kio/kfile/tests/kfstest.cpp
+++ b/kio/kfile/tests/kfstest.cpp
@@ -23,10 +23,10 @@
#include <unistd.h>
#include <stdlib.h>
#include <sys/stat.h>
-#include <qdir.h>
-#include <qlayout.h>
-#include <qstringlist.h>
-#include <qwidget.h>
+#include <tqdir.h>
+#include <tqlayout.h>
+#include <tqstringlist.h>
+#include <tqwidget.h>
#include <kfiledialog.h>
#include <kfileiconview.h>
@@ -45,17 +45,17 @@
int main(int argc, char **argv)
{
KApplication a(argc, argv, "kfstest");
- QString name1;
- QStringList names;
+ TQString name1;
+ TQStringList names;
- QString argv1;
- QString startDir;
+ TQString argv1;
+ TQString startDir;
if (argc > 1)
- argv1 = QString::fromLatin1(argv[1]);
+ argv1 = TQString::fromLatin1(argv[1]);
if ( argc > 2 )
- startDir = QString::fromLatin1( argv[2]);
+ startDir = TQString::fromLatin1( argv[2]);
- if (argv1 == QString::fromLatin1("diroperator")) {
+ if (argv1 == TQString::fromLatin1("diroperator")) {
KDirOperator *op = new KDirOperator(startDir, 0, "operator");
op->setViewConfig( KGlobal::config(), "TestGroup" );
op->setView(KFile::Simple);
@@ -64,73 +64,73 @@ int main(int argc, char **argv)
a.exec();
}
- else if (argv1 == QString::fromLatin1("justone")) {
- QString name = KFileDialog::getOpenFileName(startDir);
+ else if (argv1 == TQString::fromLatin1("justone")) {
+ TQString name = KFileDialog::getOpenFileName(startDir);
qDebug("filename=%s",name.latin1());
}
- else if (argv1 == QString::fromLatin1("existingURL")) {
+ else if (argv1 == TQString::fromLatin1("existingURL")) {
KURL url = KFileDialog::getExistingURL();
qDebug("URL=%s",url.url().latin1());
name1 = url.url();
}
- else if (argv1 == QString::fromLatin1("preview")) {
+ else if (argv1 == TQString::fromLatin1("preview")) {
KURL u = KFileDialog::getImageOpenURL();
qDebug("filename=%s", u.url().latin1());
}
- else if (argv1 == QString::fromLatin1("preselect")) {
- names = KFileDialog::getOpenFileNames(QString::fromLatin1("/etc/passwd"));
- QStringList::Iterator it = names.begin();
+ else if (argv1 == TQString::fromLatin1("preselect")) {
+ names = KFileDialog::getOpenFileNames(TQString::fromLatin1("/etc/passwd"));
+ TQStringList::Iterator it = names.begin();
while ( it != names.end() ) {
qDebug("selected file: %s", (*it).latin1());
++it;
}
}
- else if (argv1 == QString::fromLatin1("dirs"))
+ else if (argv1 == TQString::fromLatin1("dirs"))
name1 = KFileDialog::getExistingDirectory();
- else if (argv1 == QString::fromLatin1("heap")) {
- KFileDialog *dlg = new KFileDialog( startDir, QString::null, 0L,
+ else if (argv1 == TQString::fromLatin1("heap")) {
+ KFileDialog *dlg = new KFileDialog( startDir, TQString::null, 0L,
"file dialog", true );
dlg->setMode( KFile::File);
dlg->setOperationMode( KFileDialog::Saving );
- QStringList filter;
+ TQStringList filter;
filter << "all/allfiles" << "text/plain";
dlg->setMimeFilter( filter, "all/allfiles" );
KURLBar *urlBar = dlg->speedBar();
if ( urlBar )
{
urlBar->insertDynamicItem( KURL("ftp://ftp.kde.org"),
- QString::fromLatin1("KDE FTP Server") );
+ TQString::fromLatin1("KDE FTP Server") );
}
if ( dlg->exec() == KDialog::Accepted )
name1 = dlg->selectedURL().url();
}
- else if ( argv1 == QString::fromLatin1("eventloop") )
+ else if ( argv1 == TQString::fromLatin1("eventloop") )
{
KFDTest *test = new KFDTest( startDir );
return a.exec();
}
- else if (argv1 == QString::fromLatin1("save")) {
+ else if (argv1 == TQString::fromLatin1("save")) {
KURL u = KFileDialog::getSaveURL();
-// QString(QDir::homeDirPath() + QString::fromLatin1("/testfile")),
-// QString::null, 0L);
+// TQString(TQDir::homeDirPath() + TQString::fromLatin1("/testfile")),
+// TQString::null, 0L);
name1 = u.url();
}
- else if (argv1 == QString::fromLatin1("icon")) {
+ else if (argv1 == TQString::fromLatin1("icon")) {
KIconDialog dlg;
- QString icon = dlg.selectIcon();
+ TQString icon = dlg.selectIcon();
kdDebug() << icon << endl;
}
-// else if ( argv1 == QString::fromLatin1("dirselect") ) {
+// else if ( argv1 == TQString::fromLatin1("dirselect") ) {
// KURL url;
// url.setPath( "/" );
// KURL selected = KDirSelectDialog::selectDirectory( url );
@@ -140,7 +140,7 @@ int main(int argc, char **argv)
else {
KFileDialog dlg(startDir,
- QString::fromLatin1("*|All Files\n"
+ TQString::fromLatin1("*|All Files\n"
"*.lo *.o *.la|All libtool Files"),
0, 0, true);
// dlg.setFilter( "*.kdevelop" );
@@ -148,14 +148,14 @@ int main(int argc, char **argv)
KFile::Directory |
KFile::ExistingOnly |
KFile::LocalOnly) );
-// QStringList filter;
+// TQStringList filter;
// filter << "text/plain" << "text/html" << "image/png";
// dlg.setMimeFilter( filter );
// KMimeType::List types;
// types.append( KMimeType::mimeType( "text/plain" ) );
// types.append( KMimeType::mimeType( "text/html" ) );
// dlg.setFilterMimeType( "Filetypes:", types, types.first() );
- if ( dlg.exec() == QDialog::Accepted ) {
+ if ( dlg.exec() == TQDialog::Accepted ) {
KURL::List list = dlg.selectedURLs();
KURL::List::ConstIterator it = list.begin();
qDebug("*** selectedURLs(): ");
@@ -167,8 +167,8 @@ int main(int argc, char **argv)
qDebug("*** selectedFile: %s", dlg.selectedFile().latin1());
qDebug("*** selectedURL: %s", dlg.selectedURL().url().latin1());
qDebug("*** selectedFiles: ");
- QStringList l = dlg.selectedFiles();
- QStringList::Iterator it2 = l.begin();
+ TQStringList l = dlg.selectedFiles();
+ TQStringList::Iterator it2 = l.begin();
while ( it2 != l.end() ) {
qDebug(" -> %s", (*it2).latin1());
++it2;
@@ -177,7 +177,7 @@ int main(int argc, char **argv)
}
if (!(name1.isNull()))
- KMessageBox::information(0, QString::fromLatin1("You selected the file " ) + name1,
- QString::fromLatin1("Your Choice"));
+ KMessageBox::information(0, TQString::fromLatin1("You selected the file " ) + name1,
+ TQString::fromLatin1("Your Choice"));
return 0;
}
diff --git a/kio/kfile/tests/kopenwithtest.cpp b/kio/kfile/tests/kopenwithtest.cpp
index 96e18bcc2..ea348a94c 100644
--- a/kio/kfile/tests/kopenwithtest.cpp
+++ b/kio/kfile/tests/kopenwithtest.cpp
@@ -19,9 +19,9 @@
*/
#include <kapplication.h>
-#include <qwidget.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqwidget.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
#include <kopenwith.h>
#include <kurl.h>
#include <kdebug.h>
@@ -53,7 +53,7 @@ int main(int argc, char **argv)
delete dlg;
// Test with a mimetype
- QString mimetype = "text/plain";
+ TQString mimetype = "text/plain";
dlg = new KOpenWithDlg( mimetype, "kedit", 0);
if(dlg->exec()) {
kdDebug() << "Dialog ended successfully\ntext: " << dlg->text() << endl;
diff --git a/kio/kfile/tests/kurlrequestertest.cpp b/kio/kfile/tests/kurlrequestertest.cpp
index 5601f4922..9248eec5d 100644
--- a/kio/kfile/tests/kurlrequestertest.cpp
+++ b/kio/kfile/tests/kurlrequestertest.cpp
@@ -10,7 +10,7 @@ int main( int argc, char **argv )
qDebug( "Selected url: %s", url.url().latin1());
KURLRequester *req = new KURLRequester();
- KEditListBox *el = new KEditListBox( QString::fromLatin1("Test"), req->customEditor() );
+ KEditListBox *el = new KEditListBox( TQString::fromLatin1("Test"), req->customEditor() );
el->show();
return app.exec();
}