diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /kaboodle | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaboodle')
-rw-r--r-- | kaboodle/conf.cpp | 2 | ||||
-rw-r--r-- | kaboodle/conf.h | 1 | ||||
-rw-r--r-- | kaboodle/controls.cpp | 24 | ||||
-rw-r--r-- | kaboodle/controls.h | 12 | ||||
-rw-r--r-- | kaboodle/engine.cpp | 4 | ||||
-rw-r--r-- | kaboodle/engine.h | 5 | ||||
-rw-r--r-- | kaboodle/kaboodle_factory.cpp | 6 | ||||
-rw-r--r-- | kaboodle/kaboodle_factory.h | 3 | ||||
-rw-r--r-- | kaboodle/kaboodleapp.h | 1 | ||||
-rw-r--r-- | kaboodle/main.cpp | 6 | ||||
-rw-r--r-- | kaboodle/player.cpp | 16 | ||||
-rw-r--r-- | kaboodle/player.h | 8 | ||||
-rw-r--r-- | kaboodle/userinterface.cpp | 20 | ||||
-rw-r--r-- | kaboodle/userinterface.h | 3 | ||||
-rw-r--r-- | kaboodle/view.cpp | 18 | ||||
-rw-r--r-- | kaboodle/view.h | 3 |
16 files changed, 71 insertions, 61 deletions
diff --git a/kaboodle/conf.cpp b/kaboodle/conf.cpp index 4570bf2e..370946e4 100644 --- a/kaboodle/conf.cpp +++ b/kaboodle/conf.cpp @@ -32,7 +32,7 @@ #include "view.h" Kaboodle::Conf::Conf(TQWidget *_parent, const char *_name) - : KDialogBase(_parent, _name, true, TQString::null, Ok | Cancel) + : KDialogBase(_parent, _name, true, TQString(), Ok | Cancel) { TQVBox *box = makeVBoxMainWidget(); diff --git a/kaboodle/conf.h b/kaboodle/conf.h index 884593ba..a3d46dd8 100644 --- a/kaboodle/conf.h +++ b/kaboodle/conf.h @@ -36,6 +36,7 @@ namespace Kaboodle class Conf : public KDialogBase { Q_OBJECT + TQ_OBJECT public: Conf(TQWidget *_parent = 0, const char *_name = 0); diff --git a/kaboodle/controls.cpp b/kaboodle/controls.cpp index 305ae661..b718b659 100644 --- a/kaboodle/controls.cpp +++ b/kaboodle/controls.cpp @@ -23,15 +23,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "controls.h" -Kaboodle::L33tSlider::L33tSlider(TQWidget * parent, const char * name) : - TQSlider(parent,name), pressed(false) +Kaboodle::L33tSlider::L33tSlider(TQWidget * tqparent, const char * name) : + TQSlider(tqparent,name), pressed(false) {} -Kaboodle::L33tSlider::L33tSlider(Orientation o, TQWidget * parent, const char * name) : - TQSlider(o,parent,name), pressed(false) +Kaboodle::L33tSlider::L33tSlider(Qt::Orientation o, TQWidget * tqparent, const char * name) : + TQSlider(o,tqparent,name), pressed(false) {} Kaboodle::L33tSlider::L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation o, TQWidget * parent, const char * name) : - TQSlider(minValue, maxValue, pageStep, value, o, parent,name), pressed(false) + Qt::Orientation o, TQWidget * tqparent, const char * name) : + TQSlider(minValue, maxValue, pageStep, value, o, tqparent,name), pressed(false) {} bool Kaboodle::L33tSlider::currentlyPressed() const @@ -47,7 +47,7 @@ void Kaboodle::L33tSlider::setValue(int i) void Kaboodle::L33tSlider::mousePressEvent(TQMouseEvent*e) { - if (e->button()!=RightButton) + if (e->button()!=Qt::RightButton) { pressed=true; TQSlider::mousePressEvent(e); @@ -76,8 +76,8 @@ void Kaboodle::L33tSlider::wheelEvent(TQWheelEvent *e) } Kaboodle::SliderAction::SliderAction(const TQString& text, int accel, const TQObject *receiver, - const char *member, TQObject* parent, const char* name ) - : KAction( text, accel, parent, name ) + const char *member, TQObject* tqparent, const char* name ) + : KAction( text, accel, tqparent, name ) { m_receiver = receiver; m_member = member; @@ -91,7 +91,7 @@ int Kaboodle::SliderAction::plug( TQWidget *w, int index ) int id = KAction::getToolButtonID(); //Create it. - m_slider=new L33tSlider(0, 1000, 100, 0, Horizontal, toolBar); + m_slider=new L33tSlider(0, 1000, 100, 0,Qt::Horizontal, toolBar); m_slider->setMinimumWidth(10); toolBar->insertWidget(id, 10, m_slider, index ); @@ -115,12 +115,12 @@ return; /* if (pos == KToolBar::Left || pos == KToolBar::Right) { - m_slider->setOrientation(Vertical); + m_slider->setOrientationVertical); m_slider->setFixedWidth(m_slider->height()); } else { - m_slider->setOrientation(Horizontal); + m_slider->setOrientationHorizontal); m_slider->resize(m_slider->height(), m_slider->height()); } */ diff --git a/kaboodle/controls.h b/kaboodle/controls.h index c89ee8d5..19b11fde 100644 --- a/kaboodle/controls.h +++ b/kaboodle/controls.h @@ -40,14 +40,15 @@ namespace Kaboodle * A slider that can be moved around while being * changed internally **/ -class L33tSlider : public QSlider +class L33tSlider : public TQSlider { Q_OBJECT + TQ_OBJECT public: - L33tSlider(TQWidget * parent, const char * name=0); - L33tSlider(Orientation, TQWidget * parent, const char * name=0); + L33tSlider(TQWidget * tqparent, const char * name=0); + L33tSlider(Qt::Orientation, TQWidget * tqparent, const char * name=0); L33tSlider(int minValue, int maxValue, int pageStep, int value, - Orientation, TQWidget * parent, const char * name=0); + Qt::Orientation, TQWidget * tqparent, const char * name=0); bool currentlyPressed() const; signals: @@ -73,9 +74,10 @@ private: class SliderAction : public KAction { Q_OBJECT + TQ_OBJECT public: SliderAction(const TQString& text, int accel, const TQObject *receiver, - const char *member, TQObject* parent, const char* name ); + const char *member, TQObject* tqparent, const char* name ); virtual int plug( TQWidget *w, int index = -1 ); virtual void unplug( TQWidget *w ); TQSlider* slider() const { return m_slider; } diff --git a/kaboodle/engine.cpp b/kaboodle/engine.cpp index 5909dbcd..f103ca19 100644 --- a/kaboodle/engine.cpp +++ b/kaboodle/engine.cpp @@ -71,8 +71,8 @@ public: KURL file; }; -Kaboodle::Engine::Engine(TQObject *parent) - : TQObject(parent) +Kaboodle::Engine::Engine(TQObject *tqparent) + : TQObject(tqparent) , d(new EnginePrivate) { } diff --git a/kaboodle/engine.h b/kaboodle/engine.h index c8001e56..5a1b51b3 100644 --- a/kaboodle/engine.h +++ b/kaboodle/engine.h @@ -42,12 +42,13 @@ namespace Kaboodle * Does almost everything related to multimedia. * Most interfacing should be done with Player **/ -class Engine : public QObject +class Engine : public TQObject { Q_OBJECT + TQ_OBJECT public: - Engine(TQObject *parent=0); + Engine(TQObject *tqparent=0); ~Engine(); Arts::PlayObject playObject() const; diff --git a/kaboodle/kaboodle_factory.cpp b/kaboodle/kaboodle_factory.cpp index 99302702..0b842d53 100644 --- a/kaboodle/kaboodle_factory.cpp +++ b/kaboodle/kaboodle_factory.cpp @@ -42,15 +42,15 @@ Kaboodle::KaboodleFactory::~KaboodleFactory() s_instance = 0; } -KParts::Part *Kaboodle::KaboodleFactory::createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *parent, const char *name, const char *className, const TQStringList &) +KParts::Part *Kaboodle::KaboodleFactory::createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *tqparent, const char *name, const char *className, const TQStringList &) { if(className == TQString("KMediaPlayer/Engine")) { - return new Player(parent, name); + return new Player(tqparent, name); } else { - return new Player(widgetParent, widgetName, parent, name); + return new Player(widgetParent, widgetName, tqparent, name); } } diff --git a/kaboodle/kaboodle_factory.h b/kaboodle/kaboodle_factory.h index 415876d5..46e02af6 100644 --- a/kaboodle/kaboodle_factory.h +++ b/kaboodle/kaboodle_factory.h @@ -35,12 +35,13 @@ class Player; class KaboodleFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: KaboodleFactory(); virtual ~KaboodleFactory(); - virtual KParts::Part *createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *parent = 0, const char *name = 0, const char *classname = "TQObject", const TQStringList &args = TQStringList()); + virtual KParts::Part *createPartObject(TQWidget *widgetParent, const char *widgetName, TQObject *tqparent = 0, const char *name = 0, const char *classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList()); static const KAboutData *aboutData(); static KInstance *instance(); diff --git a/kaboodle/kaboodleapp.h b/kaboodle/kaboodleapp.h index 92073c96..8f61b234 100644 --- a/kaboodle/kaboodleapp.h +++ b/kaboodle/kaboodleapp.h @@ -33,6 +33,7 @@ class UserInterface; class KaboodleApp : public KApplication { Q_OBJECT + TQ_OBJECT public: KaboodleApp(); diff --git a/kaboodle/main.cpp b/kaboodle/main.cpp index 943e90df..b3f4f84e 100644 --- a/kaboodle/main.cpp +++ b/kaboodle/main.cpp @@ -29,7 +29,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "kaboodle_factory.h" #include "kaboodleapp.h" -void noMessageOutput(QtMsgType, const char *) +void noMessageOutput(TQtMsgType, const char *) { } @@ -37,7 +37,7 @@ static KCmdLineOptions options[] = { { "+[URL]", I18N_NOOP("URL to open"), 0 }, #ifndef NDEBUG - { "qdebug", I18N_NOOP("Turn on Qt Debug output"), 0 }, + { "qdebug", I18N_NOOP("Turn on TQt Debug output"), 0 }, #endif KCmdLineLastOption }; @@ -49,7 +49,7 @@ int main(int argc, char **argv) #ifndef NDEBUG if(!KCmdLineArgs::parsedArgs()->isSet("qdebug")) - qInstallMsgHandler(noMessageOutput); + tqInstallMsgHandler(noMessageOutput); #endif Kaboodle::KaboodleApp::addCmdLineOptions(); diff --git a/kaboodle/player.cpp b/kaboodle/player.cpp index 70517c2d..32cc37d2 100644 --- a/kaboodle/player.cpp +++ b/kaboodle/player.cpp @@ -32,8 +32,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "player.h" #include "view.h" -Kaboodle::Player::Player(TQObject *parent, const char *name) - : KMediaPlayer::Player(parent, name) +Kaboodle::Player::Player(TQObject *tqparent, const char *name) + : KMediaPlayer::Player(tqparent, name) , engine(new Engine(this)) , widget(0) , uncompleted(true) @@ -47,8 +47,8 @@ Kaboodle::Player::Player(TQObject *parent, const char *name) } Kaboodle::Player::Player(TQWidget *widgetParent, const char *widgetName, - TQObject *parent, const char *name) - : KMediaPlayer::Player(widgetParent, widgetName, parent, name) + TQObject *tqparent, const char *name) + : KMediaPlayer::Player(widgetParent, widgetName, tqparent, name) , engine(new Engine(this)) , widget(new View(widgetParent, widgetName, this)) , uncompleted(true) @@ -244,8 +244,8 @@ void Kaboodle::Player::tickerTimeout(void) if(extension) emit setStatusBarText(i18n("Playing %1 - %2") - .arg(current.prettyURL()) - .arg(positionString() + "/" + lengthString())); + .tqarg(current.prettyURL()) + .tqarg(positionString() + "/" + lengthString())); } updateTitle(); @@ -260,8 +260,8 @@ void Kaboodle::Player::updateTitle() } } -Kaboodle::BrowserExtension::BrowserExtension(Player *parent) - : KParts::BrowserExtension(parent, "Kaboodle Browser Extension") +Kaboodle::BrowserExtension::BrowserExtension(Player *tqparent) + : KParts::BrowserExtension(tqparent, "Kaboodle Browser Extension") { } diff --git a/kaboodle/player.h b/kaboodle/player.h index 4d67abb6..ee7f1b0a 100644 --- a/kaboodle/player.h +++ b/kaboodle/player.h @@ -43,19 +43,21 @@ class View; class BrowserExtension : public KParts::BrowserExtension { Q_OBJECT + TQ_OBJECT public: - BrowserExtension(Player *parent); + BrowserExtension(Player *tqparent); }; class Player : public KMediaPlayer::Player { Q_OBJECT + TQ_OBJECT public: Player(TQWidget *widgetParent, const char *widgetName, - TQObject *parent, const char *name); - Player(TQObject *parent, const char *name); + TQObject *tqparent, const char *name); + Player(TQObject *tqparent, const char *name); virtual ~Player(); virtual bool openURL(const KURL &); diff --git a/kaboodle/userinterface.cpp b/kaboodle/userinterface.cpp index 72449fcf..5dd8bd70 100644 --- a/kaboodle/userinterface.cpp +++ b/kaboodle/userinterface.cpp @@ -48,22 +48,22 @@ #include "view.h" #include "userinterface.h" -Kaboodle::UserInterface::UserInterface(TQWidget *parent, const KURL &initialFile) - : KParts::MainWindow(parent) +Kaboodle::UserInterface::UserInterface(TQWidget *tqparent, const KURL &initialFile) + : KParts::MainWindow(tqparent) { setAcceptDrops(true); setStandardToolBarMenuEnabled(true); - KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection()); - KStdAction::preferences(this, TQT_SLOT(playerPreferences()), actionCollection()); - KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys() ), actionCollection() ); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); + KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(playerPreferences()), actionCollection()); + KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() ); - menubarAction = KStdAction::showMenubar(this, TQT_SLOT(showMenubar()), actionCollection()); - propertiesAction = new KAction(i18n("Properties"), 0, this, TQT_SLOT(properties()), actionCollection(), "properties"); + menubarAction = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(showMenubar()), actionCollection()); + propertiesAction = new KAction(i18n("Properties"), 0, TQT_TQOBJECT(this), TQT_SLOT(properties()), actionCollection(), "properties"); propertiesAction->setEnabled(false); - part = new Player(this, "KaboodlePlayer", this, "KaboodleView"); + part = new Player(this, "KaboodlePlayer", TQT_TQOBJECT(this), "KaboodleView"); part->view()->setButtons(KMediaPlayer::View::Seeker); setCentralWidget(part->view()); @@ -109,7 +109,7 @@ Kaboodle::UserInterface::~UserInterface(void) void Kaboodle::UserInterface::fileOpen(void) { - KURL file(KFileDialog::getOpenURL(TQString::null, KDE::PlayObjectFactory::mimeTypes().join(" "), this, i18n("Select File to Play"))); + KURL file(KFileDialog::getOpenURL(TQString(), KDE::PlayObjectFactory::mimeTypes().join(" "), this, i18n("Select File to Play"))); if(file.isValid()) { part->openURL(file); diff --git a/kaboodle/userinterface.h b/kaboodle/userinterface.h index a58dfa5d..076a4eec 100644 --- a/kaboodle/userinterface.h +++ b/kaboodle/userinterface.h @@ -42,8 +42,9 @@ namespace Kaboodle class UserInterface : public KParts::MainWindow { Q_OBJECT + TQ_OBJECT public: - UserInterface(TQWidget *parent, const KURL &initialFile = KURL()); + UserInterface(TQWidget *tqparent, const KURL &initialFile = KURL()); virtual ~UserInterface(void); void load(const TQString& url); diff --git a/kaboodle/view.cpp b/kaboodle/view.cpp index eba6ff20..75171584 100644 --- a/kaboodle/view.cpp +++ b/kaboodle/view.cpp @@ -55,8 +55,8 @@ TQButton *createButton(const TQIconSet &_iconset, const TQString &_tip, TQObject } } -Kaboodle::View::View(TQWidget *parent, const char *name, Player *p) - : KMediaPlayer::View(parent, name) +Kaboodle::View::View(TQWidget *tqparent, const char *name, Player *p) + : KMediaPlayer::View(tqparent, name) , state((KMediaPlayer::Player::State)p->state()) , autoPlay(false) , quitAfterPlaying(false) @@ -77,19 +77,19 @@ Kaboodle::View::View(TQWidget *parent, const char *name, Player *p) connect(video, TQT_SIGNAL(mouseButtonDoubleClick(const TQPoint&, int)), this, TQT_SLOT(slotDblClick(const TQPoint &, int) ) ) ; TQWidget *sliderBox = new TQWidget(box); - sliderBox->setFocusPolicy(TQWidget::ClickFocus); + sliderBox->setFocusPolicy(TQ_ClickFocus); sliderBox->setAcceptDrops(true); - TQHBoxLayout *layout = new TQHBoxLayout(sliderBox); - layout->setSpacing(KDialog::spacingHint()); - layout->setMargin(0); - layout->setAutoAdd(true); + TQHBoxLayout *tqlayout = new TQHBoxLayout(sliderBox); + tqlayout->setSpacing(KDialog::spacingHint()); + tqlayout->setMargin(0); + tqlayout->setAutoAdd(true); playButton = createButton(BarIconSet("1rightarrow"), i18n("Play"), player, TQT_SLOT(play()), sliderBox); pauseButton = createButton(BarIconSet("player_pause"), i18n("Pause"), player, TQT_SLOT(pause()), sliderBox); stopButton = createButton(BarIconSet("player_stop"), i18n("Stop"), player, TQT_SLOT(stop()), sliderBox); - slider = new L33tSlider(0, 1000, 10, 0, L33tSlider::Horizontal, sliderBox); + slider = new L33tSlider(0, 1000, 10, 0, Qt::Horizontal, sliderBox); slider->setTickmarks(TQSlider::NoMarks); slider->show(); @@ -99,7 +99,7 @@ Kaboodle::View::View(TQWidget *parent, const char *name, Player *p) labelFont.setBold(true); TQFontMetrics labelFontMetrics(labelFont); elapsedLabel->setFont(labelFont); - elapsedLabel->setAlignment(AlignCenter | AlignVCenter | ExpandTabs); + elapsedLabel->tqsetAlignment(AlignCenter | AlignVCenter | ExpandTabs); elapsedLabel->setFixedHeight(labelFontMetrics.height()); elapsedLabel->setMinimumWidth(labelFontMetrics.width("00:00")); diff --git a/kaboodle/view.h b/kaboodle/view.h index 4e2f3edf..5aa2a6b7 100644 --- a/kaboodle/view.h +++ b/kaboodle/view.h @@ -45,9 +45,10 @@ namespace Kaboodle class View : public KMediaPlayer::View { Q_OBJECT + TQ_OBJECT public: - View(TQWidget *parent, const char *name, Player *player); + View(TQWidget *tqparent, const char *name, Player *player); virtual ~View(void); /** |