summaryrefslogtreecommitdiffstats
path: root/kicker/applets/media
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kicker/applets/media
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kicker/applets/media')
-rw-r--r--kicker/applets/media/mediaapplet.cpp34
-rw-r--r--kicker/applets/media/mediaapplet.h18
-rw-r--r--kicker/applets/media/mediumbutton.cpp42
-rw-r--r--kicker/applets/media/mediumbutton.h22
-rw-r--r--kicker/applets/media/preferencesdialog.cpp48
-rw-r--r--kicker/applets/media/preferencesdialog.h12
6 files changed, 88 insertions, 88 deletions
diff --git a/kicker/applets/media/mediaapplet.cpp b/kicker/applets/media/mediaapplet.cpp
index 4ccd0eeef..b137b5d5c 100644
--- a/kicker/applets/media/mediaapplet.cpp
+++ b/kicker/applets/media/mediaapplet.cpp
@@ -33,7 +33,7 @@
extern "C"
{
- KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString configFile)
+ KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString configFile)
{
KGlobal::locale()->insertCatalogue("mediaapplet");
return new MediaApplet(configFile, KPanelApplet::Normal,
@@ -42,7 +42,7 @@ extern "C"
}
}
-MediaApplet::MediaApplet(const QString& configFile, Type type, int actions, QWidget *parent, const char *name)
+MediaApplet::MediaApplet(const TQString& configFile, Type type, int actions, TQWidget *parent, const char *name)
: KPanelApplet(configFile, type, actions, parent, name),
mButtonSizeSum(0)
{
@@ -57,18 +57,18 @@ MediaApplet::MediaApplet(const QString& configFile, Type type, int actions, QWid
mpDirLister = new KDirLister();
- connect( mpDirLister, SIGNAL( clear() ),
- this, SLOT( slotClear() ) );
- connect( mpDirLister, SIGNAL( started(const KURL&) ),
- this, SLOT( slotStarted(const KURL&) ) );
- connect( mpDirLister, SIGNAL( completed() ),
- this, SLOT( slotCompleted() ) );
- connect( mpDirLister, SIGNAL( newItems( const KFileItemList & ) ),
- this, SLOT( slotNewItems( const KFileItemList & ) ) );
- connect( mpDirLister, SIGNAL( deleteItem( KFileItem * ) ),
- this, SLOT( slotDeleteItem( KFileItem * ) ) );
- connect( mpDirLister, SIGNAL( refreshItems( const KFileItemList & ) ),
- this, SLOT( slotRefreshItems( const KFileItemList & ) ) );
+ connect( mpDirLister, TQT_SIGNAL( clear() ),
+ this, TQT_SLOT( slotClear() ) );
+ connect( mpDirLister, TQT_SIGNAL( started(const KURL&) ),
+ this, TQT_SLOT( slotStarted(const KURL&) ) );
+ connect( mpDirLister, TQT_SIGNAL( completed() ),
+ this, TQT_SLOT( slotCompleted() ) );
+ connect( mpDirLister, TQT_SIGNAL( newItems( const KFileItemList & ) ),
+ this, TQT_SLOT( slotNewItems( const KFileItemList & ) ) );
+ connect( mpDirLister, TQT_SIGNAL( deleteItem( KFileItem * ) ),
+ this, TQT_SLOT( slotDeleteItem( KFileItem * ) ) );
+ connect( mpDirLister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ),
+ this, TQT_SLOT( slotRefreshItems( const KFileItemList & ) ) );
reloadList();
}
@@ -135,7 +135,7 @@ int MediaApplet::heightForWidth( int /*width*/ ) const
return mButtonSizeSum;
}
-void MediaApplet::resizeEvent( QResizeEvent *)
+void MediaApplet::resizeEvent( TQResizeEvent *)
{
arrangeButtons();
}
@@ -323,7 +323,7 @@ void MediaApplet::slotRefreshItems(const KFileItemList &entries)
{
kdDebug()<<"MediaApplet::slotRefreshItems:"<<(*it.current()).url().url()<<endl;
- QString mimetype = (*it.current()).mimetype();
+ TQString mimetype = (*it.current()).mimetype();
bool found = false;
kdDebug()<<"mimetype="<<mimetype<<endl;
@@ -423,7 +423,7 @@ void MediaApplet::reloadList()
mpDirLister->openURL(KURL("media:/"));
}
-void MediaApplet::mousePressEvent(QMouseEvent *e)
+void MediaApplet::mousePressEvent(TQMouseEvent *e)
{
if(e->button()==RightButton)
{
diff --git a/kicker/applets/media/mediaapplet.h b/kicker/applets/media/mediaapplet.h
index 5e2320be0..68d0b5d99 100644
--- a/kicker/applets/media/mediaapplet.h
+++ b/kicker/applets/media/mediaapplet.h
@@ -25,15 +25,15 @@
#endif
#include <kpanelapplet.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <kconfig.h>
#include <kurl.h>
#include <kfileitem.h>
#include <kdirlister.h>
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "mediumbutton.h"
-typedef QValueList<MediumButton*> MediumButtonList;
+typedef TQValueList<MediumButton*> MediumButtonList;
class MediaApplet : public KPanelApplet
@@ -41,8 +41,8 @@ class MediaApplet : public KPanelApplet
Q_OBJECT
public:
- MediaApplet(const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0);
+ MediaApplet(const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *parent = 0, const char *name = 0);
~MediaApplet();
int widthForHeight(int height) const;
@@ -52,12 +52,12 @@ public:
protected:
void arrangeButtons();
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
void positionChange(Position p);
void reloadList();
void loadConfig();
void saveConfig();
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
protected slots:
void slotClear();
@@ -70,8 +70,8 @@ protected slots:
private:
KDirLister *mpDirLister;
MediumButtonList mButtonList;
- QStringList mExcludedTypesList;
- QStringList mExcludedList;
+ TQStringList mExcludedTypesList;
+ TQStringList mExcludedList;
KFileItemList mMedia;
int mButtonSizeSum;
};
diff --git a/kicker/applets/media/mediumbutton.cpp b/kicker/applets/media/mediumbutton.cpp
index e8007a989..5be2acbab 100644
--- a/kicker/applets/media/mediumbutton.cpp
+++ b/kicker/applets/media/mediumbutton.cpp
@@ -19,13 +19,13 @@
#include "mediumbutton.h"
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqtooltip.h>
#include <kmessagebox.h>
#include <kmimetype.h>
@@ -44,13 +44,13 @@
#include <konq_popupmenu.h>
#include <konq_drag.h>
-MediumButton::MediumButton(QWidget *parent, const KFileItem &fileItem)
+MediumButton::MediumButton(TQWidget *parent, const KFileItem &fileItem)
: PanelPopupButton(parent), mActions(this, this), mFileItem(fileItem)
{
- KAction *a = KStdAction::paste(this, SLOT(slotPaste()),
+ KAction *a = KStdAction::paste(this, TQT_SLOT(slotPaste()),
&mActions, "pasteto");
a->setShortcut(0);
- a = KStdAction::copy(this, SLOT(slotCopy()), &mActions, "copy");
+ a = KStdAction::copy(this, TQT_SLOT(slotCopy()), &mActions, "copy");
a->setShortcut(0);
setBackgroundOrigin(AncestorOrigin);
@@ -63,18 +63,18 @@ MediumButton::MediumButton(QWidget *parent, const KFileItem &fileItem)
refreshType();
- connect(&mOpenTimer, SIGNAL(timeout()), SLOT(slotDragOpen()));
+ connect(&mOpenTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotDragOpen()));
// Activate this code only if we find a way to have both an
// action and a popup menu for the same kicker button
- //connect(this, SIGNAL(clicked()), this, SLOT(slotClicked()));
+ //connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotClicked()));
- setPopup(new QPopupMenu());
+ setPopup(new TQPopupMenu());
}
MediumButton::~MediumButton()
{
- QPopupMenu *menu = popup();
+ TQPopupMenu *menu = popup();
setPopup(0);
delete menu;
}
@@ -94,7 +94,7 @@ void MediumButton::setFileItem(const KFileItem &fileItem)
void MediumButton::initPopup()
{
- QPopupMenu *old_popup = popup();
+ TQPopupMenu *old_popup = popup();
KFileItemList items;
items.append(&mFileItem);
@@ -122,7 +122,7 @@ void MediumButton::initPopup()
void MediumButton::refreshType()
{
KMimeType::Ptr mime = mFileItem.determineMimeType();
- QToolTip::add(this, mime->comment());
+ TQToolTip::add(this, mime->comment());
setIcon(mFileItem.iconName());
}
@@ -144,10 +144,10 @@ void MediumButton::slotCopy()
{
KonqDrag * obj = KonqDrag::newDrag(mFileItem.url(), false);
- QApplication::clipboard()->setData( obj );
+ TQApplication::clipboard()->setData( obj );
}
-void MediumButton::dragEnterEvent(QDragEnterEvent* e)
+void MediumButton::dragEnterEvent(TQDragEnterEvent* e)
{
if (mFileItem.isWritable())
{
@@ -156,14 +156,14 @@ void MediumButton::dragEnterEvent(QDragEnterEvent* e)
}
}
-void MediumButton::dragLeaveEvent(QDragLeaveEvent* e)
+void MediumButton::dragLeaveEvent(TQDragLeaveEvent* e)
{
mOpenTimer.stop();
PanelPopupButton::dragLeaveEvent( e );
}
-void MediumButton::dropEvent(QDropEvent *e)
+void MediumButton::dropEvent(TQDropEvent *e)
{
mOpenTimer.stop();
@@ -175,7 +175,7 @@ void MediumButton::slotDragOpen()
mFileItem.run();
}
-QString MediumButton::tileName()
+TQString MediumButton::tileName()
{
return mFileItem.text();
}
diff --git a/kicker/applets/media/mediumbutton.h b/kicker/applets/media/mediumbutton.h
index 8d7970d89..3fa31756a 100644
--- a/kicker/applets/media/mediumbutton.h
+++ b/kicker/applets/media/mediumbutton.h
@@ -21,11 +21,11 @@
#define MEDIUMBUTTON_H
#include <panelbutton.h>
-#include <qpoint.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qtimer.h>
+#include <tqpoint.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqtimer.h>
#include <kfileitem.h>
#include <kpanelapplet.h>
#include <kactioncollection.h>
@@ -35,19 +35,19 @@ class MediumButton : public PanelPopupButton
Q_OBJECT
public:
- MediumButton(QWidget *parent, const KFileItem &fileItem);
+ MediumButton(TQWidget *parent, const KFileItem &fileItem);
~MediumButton();
const KFileItem &fileItem() const;
void setFileItem(const KFileItem &fileItem);
void setPanelPosition(KPanelApplet::Position position);
protected:
- QString tileName();
+ TQString tileName();
void refreshType();
void initPopup();
- void dragEnterEvent( QDragEnterEvent* );
- void dragLeaveEvent( QDragLeaveEvent* );
- void dropEvent(QDropEvent *e);
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dragLeaveEvent( TQDragLeaveEvent* );
+ void dropEvent(TQDropEvent *e);
protected slots:
// Activate this code only if we find a way to have both an
@@ -60,7 +60,7 @@ protected slots:
private:
KActionCollection mActions;
KFileItem mFileItem;
- QTimer mOpenTimer;
+ TQTimer mOpenTimer;
};
#endif
diff --git a/kicker/applets/media/preferencesdialog.cpp b/kicker/applets/media/preferencesdialog.cpp
index 179878e89..8d9cdcc94 100644
--- a/kicker/applets/media/preferencesdialog.cpp
+++ b/kicker/applets/media/preferencesdialog.cpp
@@ -21,34 +21,34 @@
#include <klocale.h>
#include <kmimetype.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
#include <kfiledetailview.h>
class MediumTypeItem : public QCheckListItem
{
public:
- MediumTypeItem(QListView *parent, const QString name,
- const QString mimetype)
- : QCheckListItem(parent, name, CheckBox),
+ MediumTypeItem(TQListView *parent, const TQString name,
+ const TQString mimetype)
+ : TQCheckListItem(parent, name, CheckBox),
mMimeType(mimetype) { }
- const QString &mimeType() const { return mMimeType; }
+ const TQString &mimeType() const { return mMimeType; }
private:
- QString mMimeType;
+ TQString mMimeType;
};
class MediumItem : public QCheckListItem
{
public:
- MediumItem(QListView *parent, const QString name,
+ MediumItem(TQListView *parent, const TQString name,
const KFileItem medium)
- : QCheckListItem(parent, name, CheckBox),
+ : TQCheckListItem(parent, name, CheckBox),
mMedium(medium) { }
- const QString itemURL() const { return mMedium.url().url(); }
+ const TQString itemURL() const { return mMedium.url().url(); }
private:
KFileItem mMedium;
@@ -56,27 +56,27 @@ private:
-PreferencesDialog::PreferencesDialog(KFileItemList media, QWidget *parent,
+PreferencesDialog::PreferencesDialog(KFileItemList media, TQWidget *parent,
const char *name)
: KDialogBase(Tabbed, i18n("Media Applet Preferences"), Ok|Cancel|Default,
Ok, parent, name, true),
mMedia(media)
{
- QVBox *types_page = addVBoxPage( i18n("Medium Types") );
+ TQVBox *types_page = addVBoxPage( i18n("Medium Types") );
mpMediumTypesListView = new KListView(types_page);
//mpMediumTypesListView->setFullWidth(true);
mpMediumTypesListView->addColumn( i18n("Types to Display") );
- QWhatsThis::add(mpMediumTypesListView, i18n("Deselect the medium types which you do not want to see in the applet"));
+ TQWhatsThis::add(mpMediumTypesListView, i18n("Deselect the medium types which you do not want to see in the applet"));
- QVBox *media_page = addVBoxPage( i18n("Media") );
+ TQVBox *media_page = addVBoxPage( i18n("Media") );
mpMediaListView = new KListView(media_page);
//mpMediaListView->setFullWidth(true);
mpMediaListView->addColumn( i18n("Media to Display") );
- QWhatsThis::add(mpMediaListView, i18n("Deselect the media which you do not want to see in the applet"));
+ TQWhatsThis::add(mpMediaListView, i18n("Deselect the media which you do not want to see in the applet"));
slotDefault();
}
@@ -87,7 +87,7 @@ PreferencesDialog::~PreferencesDialog()
void PreferencesDialog::slotDefault()
{
- QStringList defaultExclude;
+ TQStringList defaultExclude;
defaultExclude << "media/hdd_mounted";
defaultExclude << "media/hdd_unmounted";
@@ -97,12 +97,12 @@ void PreferencesDialog::slotDefault()
defaultExclude << "media/smb_unmounted";
setExcludedMediumTypes(defaultExclude);
- setExcludedMedia(QStringList());
+ setExcludedMedia(TQStringList());
}
-QStringList PreferencesDialog::excludedMediumTypes()
+TQStringList PreferencesDialog::excludedMediumTypes()
{
- QStringList excludedTypes;
+ TQStringList excludedTypes;
for(MediumTypeItem *it=static_cast<MediumTypeItem *>(mpMediumTypesListView->firstChild());
it; it=static_cast<MediumTypeItem *>(it->nextSibling()))
@@ -113,13 +113,13 @@ QStringList PreferencesDialog::excludedMediumTypes()
return excludedTypes;
}
-void PreferencesDialog::setExcludedMediumTypes(QStringList excludedTypesList)
+void PreferencesDialog::setExcludedMediumTypes(TQStringList excludedTypesList)
{
mpMediumTypesListView->clear();
mpMediumTypesListView->setRootIsDecorated(false);
KMimeType::List mimetypes = KMimeType::allMimeTypes();
- QValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
+ TQValueListIterator<KMimeType::Ptr> it(mimetypes.begin());
for(; it != mimetypes.end(); ++it)
{
@@ -132,9 +132,9 @@ void PreferencesDialog::setExcludedMediumTypes(QStringList excludedTypesList)
}
}
-QStringList PreferencesDialog::excludedMedia()
+TQStringList PreferencesDialog::excludedMedia()
{
- QStringList excluded;
+ TQStringList excluded;
for(MediumItem *it=static_cast<MediumItem *>(mpMediaListView->firstChild());
it; it=static_cast<MediumItem *>(it->nextSibling()))
@@ -145,7 +145,7 @@ QStringList PreferencesDialog::excludedMedia()
return excluded;
}
-void PreferencesDialog::setExcludedMedia(QStringList excludedList)
+void PreferencesDialog::setExcludedMedia(TQStringList excludedList)
{
mpMediaListView->clear();
mpMediaListView->setRootIsDecorated(false);
diff --git a/kicker/applets/media/preferencesdialog.h b/kicker/applets/media/preferencesdialog.h
index bb400564b..e946f81de 100644
--- a/kicker/applets/media/preferencesdialog.h
+++ b/kicker/applets/media/preferencesdialog.h
@@ -20,7 +20,7 @@
#ifndef PREFERENCESDIALOG_H
#define PREFERENCESDIALOG_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include <kfileitem.h>
@@ -32,14 +32,14 @@ class PreferencesDialog : public KDialogBase
{
Q_OBJECT
public:
- PreferencesDialog(KFileItemList media, QWidget *parent=0, const char *name=0);
+ PreferencesDialog(KFileItemList media, TQWidget *parent=0, const char *name=0);
~PreferencesDialog();
- QStringList excludedMediumTypes();
- void setExcludedMediumTypes(QStringList excludedTypesList);
+ TQStringList excludedMediumTypes();
+ void setExcludedMediumTypes(TQStringList excludedTypesList);
- QStringList excludedMedia();
- void setExcludedMedia(QStringList excludedList);
+ TQStringList excludedMedia();
+ void setExcludedMedia(TQStringList excludedList);
protected slots:
void slotDefault();