Finish TQt4 porting of Amarok

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/amarok@1228394 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 14 years ago
parent e9db3e45ed
commit 1d9d9f5ce4

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options1</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>General</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -30,7 +30,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>generalBox</cstring>
</property>
@ -44,7 +44,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ShowSplashscreen</cstring>
</property>
@ -58,7 +58,7 @@
<string>Check to enable the splashscreen during Amarok startup.</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ShowTrayIcon</cstring>
</property>
@ -72,9 +72,9 @@
<string>Check to enable the Amarok system tray icon.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@ -90,14 +90,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_AnimateTrayIcon</cstring>
</property>
@ -116,7 +116,7 @@
</widget>
</hbox>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ShowPlayerWindow</cstring>
</property>
@ -130,15 +130,15 @@
<string>Check to enable an extra player window.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout4</cstring>
<cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -155,7 +155,7 @@
<string>Size of the cover image in the context viewer in pixels.</string>
</property>
</widget>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_CoverPreviewSize</cstring>
</property>
@ -188,7 +188,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>30</width>
<height>20</height>
@ -197,19 +197,19 @@
</spacer>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -234,7 +234,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -254,7 +254,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>50</width>
<height>21</height>
@ -263,22 +263,22 @@
</spacer>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
<cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>checkBox_customBrowser</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -303,7 +303,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -323,7 +323,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>50</width>
<height>21</height>
@ -334,7 +334,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>componentsBox</cstring>
</property>
@ -348,7 +348,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseScores</cstring>
</property>
@ -362,7 +362,7 @@
<string>Scores for tracks are calculated automatically, based on your listening habits.</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseRatings</cstring>
</property>
@ -395,7 +395,7 @@
<string>You need the &lt;a href='http://amarok.kde.org/wiki/Moodbar'&gt;moodbar package&lt;/a&gt; installed to enable the moodbar feature.</string>
</property>
</widget>
<widget class="QFrame">
<widget class="TQFrame">
<property name="name">
<cstring>moodFrame</cstring>
</property>
@ -421,7 +421,7 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_ShowMoodbar</cstring>
</property>
@ -441,9 +441,9 @@
<string>Displays a visual representation of the current track in the slider bar of the player window and a column in the playlist window.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8_2_2</cstring>
<cstring>tqlayout8_2_2</cstring>
</property>
<hbox>
<property name="name">
@ -459,14 +459,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_MakeMoodier</cstring>
</property>
@ -483,7 +483,7 @@
<string>When enabled, the hue distribution is quantised and respread evenly, giving a prettier but less meaningful output.</string>
</property>
</widget>
<widget class="QComboBox">
<widget class="TQComboBox">
<item>
<property name="text">
<string>Happy Like a Rainbow</string>
@ -516,7 +516,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
@ -525,9 +525,9 @@
</spacer>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7_2_2</cstring>
<cstring>tqlayout7_2_2</cstring>
</property>
<hbox>
<property name="name">
@ -543,14 +543,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_MoodsWithMusic</cstring>
</property>
@ -573,7 +573,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@ -587,7 +587,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SavePlaylist</cstring>
</property>
@ -601,7 +601,7 @@
<string>If checked, Amarok saves the current playlist on quit and restores it when restarted.</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RelativePlaylist</cstring>
</property>
@ -615,7 +615,7 @@
<string>If checked, Amarok uses a relative path for the tracks of manually saved playlists</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_AutoShowContextBrowser</cstring>
</property>
@ -641,7 +641,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>30</height>
@ -685,13 +685,13 @@
<includes>
<include location="local" impldecl="in implementation">Options1.ui.h</include>
</includes>
<slots>
<Q_SLOTS>
<slot>slotUpdateMoodFrame()</slot>
</slots>
</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>

@ -3,7 +3,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
@ -37,11 +37,11 @@ void Options1::init()
else
++it;
}
#ifdef Q_WS_MAC
if ( KStandardDirs::findExe( "open" ) != TQString::null )
#ifdef TQ_WS_MAC
if ( KStandardDirs::findExe( "open" ) != TQString() )
browsers.prepend( i18n( "Default Browser" ) );
#else
if ( KStandardDirs::findExe( "kfmclient" ) != TQString::null )
if ( KStandardDirs::findExe( "kfmclient" ) != TQString() )
browsers.prepend( i18n( "Default KDE Browser" ) );
#endif
@ -51,7 +51,7 @@ void Options1::init()
if( index >= 0 )
kComboBox_browser->setCurrentItem( index );
else if( AmarokConfig::externalBrowser() ==
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
"open"
#else
"kfmclient openURL"

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options2</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>Options2</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -27,7 +27,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox6</cstring>
</property>
@ -38,7 +38,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseCustomIconTheme</cstring>
</property>
@ -54,7 +54,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@ -65,7 +65,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_UseCustomFonts</cstring>
</property>
@ -82,7 +82,7 @@
<string>Check to enable custom fonts.</string>
</property>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>fontGroupBox</cstring>
</property>
@ -113,7 +113,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@ -157,7 +157,7 @@
<string>The font to use in the playlist window.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -172,7 +172,7 @@
<property name="text">
<string>Player Window:</string>
</property>
<property name="alignment">
<property name="tqalignment">
<set>AlignVCenter</set>
</property>
<property name="toolTip" stdset="0">
@ -182,7 +182,7 @@
<string>The font to use in the player window.</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@ -252,7 +252,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@ -263,7 +263,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QButtonGroup">
<widget class="TQButtonGroup">
<property name="name">
<cstring>radioGroup</cstring>
</property>
@ -280,9 +280,9 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QLayoutWidget" row="2" column="0">
<widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>layout2</cstring>
<cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
@ -291,7 +291,7 @@
<property name="spacing">
<number>0</number>
</property>
<widget class="QRadioButton">
<widget class="TQRadioButton">
<property name="name">
<cstring>kcfg_SchemeCustom</cstring>
</property>
@ -308,7 +308,7 @@
<string>If selected, Amarok uses the user-defined colors in the playlist.</string>
</property>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>customSchemeBox</cstring>
</property>
@ -334,7 +334,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>fgLabel</cstring>
</property>
@ -349,7 +349,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@ -400,7 +400,7 @@
<string>Selects the color to use as foreground (text) color in the playlist.</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>bgColor</cstring>
</property>
@ -443,13 +443,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<property name="tqmaximumSize">
<size>
<width>192</width>
<height>32767</height>
@ -476,7 +476,7 @@
</widget>
</vbox>
</widget>
<widget class="QRadioButton" row="0" column="0">
<widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>kcfg_SchemeKDE</cstring>
</property>
@ -493,7 +493,7 @@
<string>If selected, Amarok uses the KDE standard colors in the playlist.</string>
</property>
</widget>
<widget class="QRadioButton" row="1" column="0">
<widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>kcfg_SchemeAmarok</cstring>
</property>
@ -526,15 +526,15 @@
<enum>Horizontal</enum>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@ -563,7 +563,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>contextGroupBox</cstring>
</property>
@ -574,15 +574,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout6</cstring>
<cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@ -614,15 +614,15 @@
</widget>
</hbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout5</cstring>
<cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>installPushButton</cstring>
</property>
@ -636,7 +636,7 @@
<string>Select and install a new Context Browser style.</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>retrievePushButton</cstring>
</property>
@ -660,14 +660,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>uninstallPushButton</cstring>
</property>
@ -695,7 +695,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>30</height>
@ -745,17 +745,17 @@
<includes>
<include location="local" impldecl="in implementation">Options2.ui.h</include>
</includes>
<slots>
<Q_SLOTS>
<slot>installPushButton_clicked()</slot>
<slot>retrievePushButton_clicked()</slot>
<slot>uninstallPushButton_clicked()</slot>
<slot>styleComboBox_activated( const QString &amp; s )</slot>
<slot>updateStyleComboBox()</slot>
</slots>
</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kfontrequester.h</includehint>
<includehint>kfontrequester.h</includehint>

@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
@ -41,8 +41,8 @@
class AmarokThemeNewStuff : public KNewStuff
{
public:
AmarokThemeNewStuff(const TQString &type, TQWidget *parentWidget=0)
: KNewStuff( type, parentWidget )
AmarokThemeNewStuff(const TQString &type, TQWidget *tqparentWidget=0)
: KNewStuff( type, tqparentWidget )
{}
bool install( const TQString& fileName )
@ -80,7 +80,7 @@ void Options2::init()
// This method is basically lifted from ScriptManager::slotInstallScript()
void Options2::installPushButton_clicked()
{
KFileDialog dia( TQString::null, "*.tar *.tar.bz2 *.tar.gz|" + i18n( "Style Packages (*.tar, *.tar.bz2, *.tar.gz)" ), 0, 0, true );
KFileDialog dia( TQString(), "*.tar *.tar.bz2 *.tar.gz|" + i18n( "Style Packages (*.tar, *.tar.bz2, *.tar.gz)" ), 0, 0, true );
kapp->setTopWidget( &dia );
dia.setCaption( kapp->makeStdCaption( i18n( "Select Style Package" ) ) );
dia.setMode( KFile::File | KFile::ExistingOnly );
@ -108,7 +108,7 @@ void Options2::retrievePushButton_clicked()
// Delete KNewStuff's configuration entries. These entries reflect which styles
// are already installed. As we cannot yet keep them in sync after uninstalling
// styles, we deactivate the check marks entirely.
Amarok::config()->deleteGroup( "KNewStuffStatus" );
Amarok::config()->deleteGroup( "KNewStufftqStatus" );
// we need this because KNewStuffGeneric's install function isn't clever enough
AmarokThemeNewStuff *kns = new AmarokThemeNewStuff( "amarok/themes", this );
@ -137,7 +137,7 @@ void Options2::uninstallPushButton_clicked()
return;
if( KMessageBox::warningContinueCancel( 0,
i18n( "<p>Are you sure you want to uninstall the theme <strong>%1</strong>?</p>" ).arg( name ),
i18n( "<p>Are you sure you want to uninstall the theme <strong>%1</strong>?</p>" ).tqarg( name ),
i18n("Uninstall Theme"), i18n("Uninstall") ) == KMessageBox::Cancel )
return;
@ -152,7 +152,7 @@ void Options2::uninstallPushButton_clicked()
if( !KIO::NetAccess::del( themeDir, 0 ) ) {
KMessageBox::sorry( 0, i18n( "<p>Could not uninstall this theme.</p>"
"<p>You may not have sufficient permissions to delete the folder <strong>%1<strong></p>."
).arg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
).tqarg( themeDir.isLocalFile() ? themeDir.path() : themeDir.url() ) );
return;
}

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options4</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>Options4</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -24,7 +24,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QButtonGroup" row="0" column="0">
<widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>opt_crossfade</cstring>
</property>
@ -36,7 +36,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>180</height>
@ -59,7 +59,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButtonNormalPlayback</cstring>
</property>
@ -73,15 +73,15 @@
<string>Enable normal track transition. You may insert a gap of silence between tracks.</string>
</property>
</widget>
<widget class="QLayoutWidget" row="1" column="1">
<widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
<cstring>layout11</cstring>
<cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>trackDelayLengthLabel</cstring>
</property>
@ -93,7 +93,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -106,7 +106,7 @@
<cstring>kcfg_TrackDelayLength</cstring>
</property>
</widget>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_TrackDelayLength</cstring>
</property>
@ -118,7 +118,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>160</width>
<height>0</height>
@ -142,7 +142,7 @@
</widget>
</hbox>
</widget>
<widget class="QRadioButton" row="2" column="0" rowspan="1" colspan="2">
<widget class="TQRadioButton" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kcfg_Crossfade</cstring>
</property>
@ -156,23 +156,23 @@
<string>Enable crossfading between tracks.</string>
</property>
</widget>
<widget class="QLayoutWidget" row="3" column="1">
<widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>layout9</cstring>
<cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7</cstring>
<cstring>tqlayout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>crossfadeLengthLabel</cstring>
</property>
@ -187,7 +187,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -200,7 +200,7 @@
<cstring>kcfg_CrossfadeLength</cstring>
</property>
</widget>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>crossfadeDropdownText</cstring>
</property>
@ -215,7 +215,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -230,15 +230,15 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8</cstring>
<cstring>tqlayout8</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_CrossfadeLength</cstring>
</property>
@ -253,7 +253,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@ -278,7 +278,7 @@
<string>The length of the crossfade between tracks, in milliseconds.</string>
</property>
</widget>
<widget class="QComboBox">
<widget class="TQComboBox">
<item>
<property name="text">
<string>Always</string>
@ -308,7 +308,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@ -338,7 +338,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@ -347,7 +347,7 @@
</spacer>
</grid>
</widget>
<widget class="QCheckBox" row="2" column="0">
<widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>kcfg_FadeoutOnExit</cstring>
</property>
@ -358,7 +358,7 @@
<string>If checked, Amarok will fade out the music on program exit.</string>
</property>
</widget>
<widget class="QCheckBox" row="3" column="0">
<widget class="TQCheckBox" row="3" column="0">
<property name="name">
<cstring>kcfg_ResumePlayback</cstring>
</property>
@ -379,14 +379,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>31</width>
<height>30</height>
</size>
</property>
</spacer>
<widget class="QButtonGroup" row="1" column="0">
<widget class="TQButtonGroup" row="1" column="0">
<property name="name">
<cstring>opt_crossfade_2</cstring>
</property>
@ -398,7 +398,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>0</width>
<height>120</height>
@ -421,7 +421,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>radioButtonNormalPlayback_2</cstring>
</property>
@ -445,30 +445,30 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLayoutWidget" row="2" column="1">
<widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
<cstring>layout9_2</cstring>
<cstring>tqlayout9_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout7_2</cstring>
<cstring>tqlayout7_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>fadeoutLengthLabel</cstring>
</property>
@ -483,7 +483,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@ -498,15 +498,15 @@
</widget>
</vbox>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout8_2</cstring>
<cstring>tqlayout8_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QSpinBox">
<widget class="TQSpinBox">
<property name="name">
<cstring>kcfg_FadeoutLength</cstring>
</property>
@ -521,7 +521,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@ -550,7 +550,7 @@
</widget>
</hbox>
</widget>
<widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2">
<widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kcfg_Fadeout</cstring>
</property>
@ -618,5 +618,5 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
</UI>

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options5</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>Options5</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OsdEnabled</cstring>
</property>
@ -36,9 +36,9 @@
<string>Check to enable the On-Screen-Display. The OSD briefly displays track data when a new track is played.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
<cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@ -54,14 +54,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>mainBox</cstring>
</property>
@ -78,7 +78,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>fontBox</cstring>
</property>
@ -119,7 +119,7 @@
<string>The font to use for the On-Screen Display.</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OsdDrawShadow</cstring>
</property>
@ -129,7 +129,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox9</cstring>
</property>
@ -140,9 +140,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
@ -151,7 +151,7 @@
<property name="spacing">
<number>2</number>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OsdUseCustomColors</cstring>
</property>
@ -165,9 +165,9 @@
<string>Check to enable custom colors for the On-Screen-Display.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout1</cstring>
<cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@ -183,14 +183,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>colorsBox</cstring>
</property>
@ -213,7 +213,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@ -293,7 +293,7 @@
<string>The color of the OSD background.</string>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@ -318,7 +318,7 @@
</widget>
</vbox>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OsdUseFakeTranslucency</cstring>
</property>
@ -328,7 +328,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>osdText</cstring>
</property>
@ -345,7 +345,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_OsdUsePlaylistColumns</cstring>
</property>
@ -377,7 +377,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox22</cstring>
</property>
@ -388,7 +388,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -458,7 +458,7 @@
<string>The screen that should display the OSD.</string>
</property>
</widget>
<widget class="QLabel" row="0" column="2">
<widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@ -504,26 +504,26 @@
</connection>
</connections>
<includes>
<include location="global" impldecl="in implementation">qapplication.h</include>
<include location="global" impldecl="in implementation">qdesktopwidget.h</include>
<include location="global" impldecl="in implementation">tqapplication.h</include>
<include location="global" impldecl="in implementation">tqdesktopwidget.h</include>
<include location="local" impldecl="in declaration">osd.h</include>
</includes>
<variables>
<variable access="private">OSDPreviewWidget *m_pOSDPreview;</variable>
</variables>
<signals>
<Q_SIGNALS>
<signal>settingsChanged()</signal>
</signals>
<slots>
</Q_SIGNALS>
<Q_SLOTS>
<slot access="protected">slotPositionChanged()</slot>
<slot access="protected">useCustomColorsToggled( bool on )</slot>
</slots>
</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
<function access="protected">hideEvent( QHideEvent * )</function>
<function access="protected">showEvent( QShowEvent * )</function>
</functions>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>ktextedit.h</includehint>
</includehints>

@ -18,7 +18,7 @@ email : fh@ez.no
** ui.h extension file, included from the uic-generated form implementation.
**
** If you wish to add, delete or rename functions or slots use
** Qt Designer which will update this file, preserving your code. Create an
** TQt Designer which will update this file, preserving your code. Create an
** init() function in place of a constructor, and a destroy() function in
** place of a destructor.
*****************************************************************************/
@ -32,7 +32,7 @@ email : fh@ez.no
void Options5::init()
{
m_pOSDPreview = new OSDPreviewWidget( this ); //must be child!!!
m_pOSDPreview->setAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
m_pOSDPreview->tqsetAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) );
m_pOSDPreview->setOffset( AmarokConfig::osdYOffset() );
connect( m_pOSDPreview, TQT_SIGNAL( positionChanged() ), TQT_SLOT( slotPositionChanged() ) );
@ -56,7 +56,7 @@ void Options5::init()
connect( kcfg_OsdEnabled, TQT_SIGNAL( toggled(bool) ),
m_pOSDPreview, TQT_SLOT( setShown(bool) ) );
Amarok::QStringx text = i18n(
Amarok::TQStringx text = i18n(
"<h3>Tags Displayed in OSD</h3>"
"You can use the following tokens:"
"<ul>"
@ -89,7 +89,7 @@ void Options5::init()
<< "%year " << "%length" << "%track" << "%filename" << "%directory"
<< "%type" << "%comment" << "%score" << "%playcount" << "%discnumber"
<< "%rating" << "%moodbar" << "%elapsed"
<< "%title {" + i18n( "Score: %1" ).arg( "%score" ) +'}' ) );
<< "%title {" + i18n( "Score: %1" ).tqarg( "%score" ) +'}' ) );
}
void

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options7</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>Options7</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>collectionFoldersBox</cstring>
</property>
@ -30,7 +30,7 @@
<string>Collection Folders</string>
</property>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>databaseBox</cstring>
</property>
@ -73,7 +73,7 @@
<data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
</image>
</images>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>

@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>Options8</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>Options8</cstring>
</property>
<property name="geometry">
<property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@ -12,7 +12,7 @@
<height>418</height>
</rect>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>1</width>
<height>1</height>
@ -28,9 +28,9 @@
<property name="spacing">
<number>12</number>
</property>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout2</cstring>
<cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@ -39,7 +39,7 @@
<property name="spacing">
<number>12</number>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>infoPixmap_2</cstring>
</property>
@ -54,7 +54,7 @@
<property name="text">
<string></string>
</property>
<property name="alignment">
<property name="tqalignment">
<set>AlignVCenter</set>
</property>
</widget>
@ -70,7 +70,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<property name="tqminimumSize">
<size>
<width>-1</width>
<height>-1</height>
@ -82,7 +82,7 @@
</widget>
</hbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@ -109,9 +109,9 @@
<string>&lt;P&gt;To use last.fm with Amarok, you need a &lt;A href='http://www.last.fm:80/signup.php'&gt;last.fm profile&lt;/A&gt;.</string>
</property>
</widget>
<widget class="QLayoutWidget">
<widget class="TQLayoutWidget">
<property name="name">
<cstring>layout3</cstring>
<cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
@ -130,7 +130,7 @@
</sizepolicy>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelPassword</cstring>
</property>
@ -149,7 +149,7 @@
<cstring>kcfg_ScrobblerPassword</cstring>
</property>
</widget>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelUsername</cstring>
</property>
@ -188,7 +188,7 @@
</widget>
</vbox>
</widget>
<widget class="QGroupBox">
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@ -202,7 +202,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel">
<widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@ -213,7 +213,7 @@
<enum>RichText</enum>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_SubmitPlayedSongs</cstring>
</property>
@ -232,7 +232,7 @@
<string>Improve m&amp;y profile by submitting the tracks I play</string>
</property>
</widget>
<widget class="QCheckBox">
<widget class="TQCheckBox">
<property name="name">
<cstring>kcfg_RetrieveSimilarArtists</cstring>
</property>
@ -271,7 +271,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>20</width>
<height>30</height>
@ -291,10 +291,10 @@
<includes>
<include location="local" impldecl="in implementation">Options8.ui.h</include>
</includes>
<slots>
<Q_SLOTS>
<slot access="protected">updateServices( const QString &amp; s )</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</Q_SLOTS>
<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
<includehint>kactivelabel.h</includehint>

@ -4,7 +4,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code.
** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().

@ -87,7 +87,7 @@ MenuAction::plug( TQWidget *w, int index )
//TODO create menu on demand
//TODO create menu above and aligned within window
//TODO make the arrow point upwards!
bar->insertButton( TQString::null, id, true, i18n( "Menu" ), index );
bar->insertButton( TQString(), id, true, i18n( "Menu" ), index );
bar->alignItemRight( id );
KToolBarButton* button = bar->getButton( id );
@ -120,7 +120,7 @@ Menu::Menu()
insertItem( SmallIconSet( Amarok::icon( "covermanager" ) ), i18n( "C&over Manager" ), ID_SHOW_COVER_MANAGER );
safePlug( ac, "queue_manager", this );
insertItem( SmallIconSet( Amarok::icon( "visualizations" ) ), i18n( "&Visualizations" ), ID_SHOW_VIS_SELECTOR );
insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_EQUALIZER );
insertItem( SmallIconSet( Amarok::icon( "equalizer" ) ), i18n( "E&qualizer" ), kapp, TQT_SLOT( slotConfigEqualizer() ), 0, ID_CONFIGURE_ETQUALIZER );
safePlug( ac, "script_manager", this );
safePlug( ac, "statistics", this );
@ -131,7 +131,7 @@ Menu::Menu()
insertItem( SmallIconSet( Amarok::icon( "rescan" ) ), i18n("&Rescan Collection"), ID_RESCAN_COLLECTION );
setItemEnabled( ID_RESCAN_COLLECTION, !ThreadManager::instance()->isJobPending( "CollectionScanner" ) );
#ifndef Q_WS_MAC
#ifndef TQ_WS_MAC
insertSeparator();
safePlug( ac, KStdAction::name(KStdAction::ShowMenubar), this );
@ -169,12 +169,12 @@ Menu::instance()
}
KPopupMenu*
Menu::helpMenu( TQWidget *parent ) //STATIC
Menu::helpMenu( TQWidget *tqparent ) //STATIC
{
extern KAboutData aboutData;
if ( s_helpMenu == 0 )
s_helpMenu = new KHelpMenu( parent, &aboutData, Amarok::actionCollection() );
s_helpMenu = new KHelpMenu( tqparent, &aboutData, Amarok::actionCollection() );
return s_helpMenu->menu();
}
@ -182,7 +182,7 @@ Menu::helpMenu( TQWidget *parent ) //STATIC
void
Menu::slotAboutToShow()
{
setItemEnabled( ID_CONFIGURE_EQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
setItemEnabled( ID_CONFIGURE_ETQUALIZER, EngineController::hasEngineProperty( "HasEqualizer" ) );
setItemEnabled( ID_CONF_DECODER, EngineController::hasEngineProperty( "HasConfigure" ) );
}
@ -288,8 +288,8 @@ AnalyzerAction::plug( TQWidget *w, int index )
}
AnalyzerContainer::AnalyzerContainer( TQWidget *parent )
: TQWidget( parent, "AnalyzerContainer" )
AnalyzerContainer::AnalyzerContainer( TQWidget *tqparent )
: TQWidget( tqparent, "AnalyzerContainer" )
, m_child( 0 )
{
TQToolTip::add( this, i18n( "Click for more analyzers" ) );
@ -421,7 +421,7 @@ TQString SelectAction::currentText() const {
VolumeAction::VolumeAction( KActionCollection *ac )
: KAction( i18n( "Volume" ), 0, ac, "toolbar_volume" )
, EngineObserver( EngineController::instance() )
, m_slider( 0 ) //is QGuardedPtr
, m_slider( 0 ) //is TQGuardedPtr
{}
int
@ -434,7 +434,7 @@ VolumeAction::plug( TQWidget *w, int index )
m_slider = new Amarok::VolumeSlider( w, Amarok::VOLUME_MAX );
m_slider->setName( "ToolBarVolume" );
m_slider->setValue( AmarokConfig::masterVolume() );
m_slider->setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
m_slider->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Ignored );
TQToolTip::add( m_slider, i18n( "Volume control" ) );
@ -521,7 +521,7 @@ BurnMenuAction::plug( TQWidget *w, int index )
addContainer( bar, id );
connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) );
bar->insertButton( TQString::null, id, true, i18n( "Burn" ), index );
bar->insertButton( TQString(), id, true, i18n( "Burn" ), index );
KToolBarButton* button = bar->getButton( id );
button->setPopup( Amarok::BurnMenu::instance() );
@ -589,7 +589,7 @@ StopAction::plug( TQWidget *w, int index )
addContainer( bar, id );
connect( bar, TQT_SIGNAL( destroyed() ), TQT_SLOT( slotDestroyed() ) );
bar->insertButton( TQString::null, id, TQT_SIGNAL( clicked() ), EngineController::instance(), TQT_SLOT( stop() ),
bar->insertButton( TQString(), id, TQT_SIGNAL( clicked() ), EngineController::instance(), TQT_SLOT( stop() ),
true, i18n( "Stop" ), index );
KToolBarButton* button = bar->getButton( id );
@ -608,7 +608,7 @@ StopMenu::StopMenu()
insertTitle( i18n( "Stop" ) );
insertItem( i18n("Now"), NOW );
insertItem( i18n("After Current Track"), AFTER_TRACK );
insertItem( i18n("After Queue"), AFTER_QUEUE );
insertItem( i18n("After Queue"), AFTER_TQUEUE );
connect( this, TQT_SIGNAL( aboutToShow() ), TQT_SLOT( slotAboutToShow() ) );
connect( this, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotActivated(int) ) );
@ -631,8 +631,8 @@ StopMenu::slotAboutToShow()
setItemEnabled( AFTER_TRACK, EngineController::engine()->loaded() );
setItemChecked( AFTER_TRACK, pl->stopAfterMode() == Playlist::StopAfterCurrent );
setItemEnabled( AFTER_QUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_QUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
setItemEnabled( AFTER_TQUEUE, pl->nextTracks().count() );
setItemChecked( AFTER_TQUEUE, pl->stopAfterMode() == Playlist::StopAfterQueue );
}
void
@ -653,7 +653,7 @@ StopMenu::slotActivated( int index )
? Playlist::DoNotStop
: Playlist::StopAfterCurrent );
break;
case AFTER_QUEUE:
case AFTER_TQUEUE:
pl->setStopAfterMode( mode == Playlist::StopAfterQueue
? Playlist::DoNotStop
: Playlist::StopAfterQueue );

@ -24,15 +24,16 @@ namespace Amarok
class Menu : public PrettyPopupMenu
{
Q_OBJECT
TQ_OBJECT
public:
static Menu *instance();
static KPopupMenu *helpMenu( TQWidget *parent = 0 );
static KPopupMenu *helpMenu( TQWidget *tqparent = 0 );
enum MenuIds {
ID_CONF_DECODER,
ID_SHOW_VIS_SELECTOR,
ID_SHOW_COVER_MANAGER,
ID_CONFIGURE_EQUALIZER,
ID_CONFIGURE_ETQUALIZER,
ID_RESCAN_COLLECTION
};
@ -64,10 +65,10 @@ namespace Amarok
virtual void engineStateChanged( Engine::State, Engine::State = Engine::Empty );
};
class AnalyzerContainer : public QWidget
class AnalyzerContainer : public TQWidget
{
public:
AnalyzerContainer( TQWidget *parent );
AnalyzerContainer( TQWidget *tqparent );
protected:
virtual void resizeEvent( TQResizeEvent* );
virtual void mousePressEvent( TQMouseEvent* );
@ -154,6 +155,7 @@ namespace Amarok
class BurnMenu : public KPopupMenu
{
Q_OBJECT
TQ_OBJECT
public:
enum MenuIds {
@ -182,12 +184,13 @@ namespace Amarok
class StopMenu : public KPopupMenu
{
Q_OBJECT
TQ_OBJECT
public:
enum MenuIds {
NOW,
AFTER_TRACK,
AFTER_QUEUE
AFTER_TQUEUE
};
static KPopupMenu *instance();

@ -41,7 +41,7 @@ namespace Amarok
///eg. base of the Amarok Player-window
extern TQColor Base; //Amarok::blue
///eg. text in the Amarok Player-window
extern TQColor Text; //Qt::white
extern TQColor Text; //TQt::white
///eg. background colour for Amarok::PrettySliders
extern TQColor Background; //brighter blue
///eg. outline of slider widgets in Player-window
@ -90,12 +90,12 @@ namespace Amarok
bool invokeBrowser( const TQString& url ); //defined in app.cpp
/**
* Obtain an Amarok PNG image as a QPixmap
* Obtain an Amarok PNG image as a TQPixmap
*/
TQPixmap getPNG( const TQString& /*fileName*/ ); //defined in app.cpp
/**
* Obtain an Amarok JPG image as a QPixmap
* Obtain an Amarok JPG image as a TQPixmap
*/
TQPixmap getJPG( const TQString& /*fileName*/ ); //defined in app.cpp
@ -111,7 +111,7 @@ namespace Amarok
*/
class OverrideCursor { //defined in app.cpp
public:
OverrideCursor( Qt::CursorShape cursor = Qt::WaitCursor );
OverrideCursor( TQt::tqCursorShape cursor = TQt::WaitCursor );
~OverrideCursor();
};
@ -120,7 +120,7 @@ namespace Amarok
* @param directory will be created if not existing, you MUST end the string
* with '/'
*/
LIBAMAROK_EXPORT TQString saveLocation( const TQString &directory = TQString::null ); //defined in collectionreader.cpp
LIBAMAROK_EXPORT TQString saveLocation( const TQString &directory = TQString() ); //defined in collectionreader.cpp
KIO::Job *trashFiles( const KURL::List &files ); //defined in app.cpp
@ -146,7 +146,7 @@ namespace Amarok
*/
inline TQString extension( const TQString &fileName )
{
return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
}
/** Transform url into a file url if possible */
@ -176,7 +176,7 @@ namespace Amarok
/**
* Returns internal code for database type, DbConnection::sqlite, DbConnection::mysql, or DbConnection::postgresql
* @param type either "SQLite", "MySQL", or "Postgresql".
* @param type either "STQLite", "MySQL", or "Postgresql".
*/
int databaseTypeCode( const TQString type ); //defined in configdialog.cpp
@ -203,7 +203,7 @@ namespace Amarok
TQStringList splitPath( TQString path ); //defined in playlistbrowser.cpp
/**
* Creates a copy of of the KURL instance, that doesn't have any QStrings sharing memory.
* Creates a copy of of the KURL instance, that doesn't have any TQStrings sharing memory.
**/
KURL detachedKURL( const KURL &url ); //defined in metabundle.cpp
@ -293,7 +293,7 @@ namespace Amarok
*/
class LIBAMAROK_EXPORT Process : public KProcess {
public:
Process( TQObject *parent = 0 ) : KProcess( parent ) {}
Process( TQObject *tqparent = 0 ) : KProcess( tqparent ) {}
virtual int commSetupDoneC() {
const int i = KProcess::commSetupDoneC();
Amarok::closeOpenFiles(KProcess::out[0],KProcess::in[0], KProcess::err[0]);
@ -304,9 +304,12 @@ namespace Amarok
}
#ifdef USE_QT4
#undef foreach
#endif // USE_QT4
/**
* Use this to const-iterate over QStringLists, if you like.
* Use this to const-iterate over TQStringLists, if you like.
* Watch out for the definition of last in the scope of your for.
*
* TQStringList strings;
@ -317,7 +320,7 @@ namespace Amarok
for( TQStringList::ConstIterator it = x.begin(), end = x.end(); it != end; ++it )
/**
* You can use this for lists that aren't QStringLists.
* You can use this for lists that aren't TQStringLists.
* Watch out for the definition of last in the scope of your for.
*
* BundleList bundles;

@ -35,11 +35,11 @@ Name[ne]=अमारोकसँग अडियो सीडी बजाउ
Name[nl]=Audio-cd met Amarok afspelen
Name[nn]=Spel lyd-CD med Amarok
Name[pa]=ਅਮਰੋਕ ਨਾਲ ਆਡੀਓ CD ਚਲਾਓ
Name[pl]=Odtwórz Audio CD za pomocą Amarok
Name[pl]=Odtwórz Audio CD za potqmocą Amarok
Name[pt]=Tocar o CD de Áudio com o Amarok
Name[pt_BR]=Reproduzir CD de Áudio com o Amarok
Name[se]=Čuojat jietna-CD:a Amarokain
Name[sk]=Zahrať Audio CD pomocou Amarok
Name[sk]=Zahrať Audio CD potqmocou Amarok
Name[sr]=Пусти аудио CD помоћу Amarok-а
Name[sr@Latn]=Pusti audio CD pomoću Amarok-a
Name[sv]=Spela ljud-cd med Amarok

@ -4,7 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<include>qdir.h</include>
<include>tqdir.h</include>
<kcfgfile name="amarokrc"/>
@ -443,7 +443,7 @@
</entry>
<entry key="Osd Y Offset" type="Int">
<label>Y position offset</label>
<whatsthis>The Y position of the OSD relative to the chosen screen and OSD alignment. If Top alignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom alignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.</whatsthis>
<whatsthis>The Y position of the OSD relative to the chosen screen and OSD tqalignment. If Top tqalignment is chosen the Y offset is the space between the upper part of the OSD and the top of the screen. If Bottom tqalignment is chosen the Y offset is the space between the bottom part of the OSD and the bottom of the screen.</whatsthis>
<default>50</default>
<min>0</min>
<max>10000</max>

@ -72,7 +72,7 @@ namespace Amarok
return APP_VERSION;
}
bool DcopPlayerHandler::dynamicModeStatus()
bool DcopPlayerHandler::dynamicModetqStatus()
{
return Amarok::dynamicMode();
}
@ -95,17 +95,17 @@ namespace Amarok
return EngineController::engine()->state() == Engine::Playing;
}
bool DcopPlayerHandler::randomModeStatus()
bool DcopPlayerHandler::randomModetqStatus()
{
return AmarokConfig::randomMode();
}
bool DcopPlayerHandler::repeatPlaylistStatus()
bool DcopPlayerHandler::repeatPlaylisttqStatus()
{
return Amarok::repeatPlaylist();
}
bool DcopPlayerHandler::repeatTrackStatus()
bool DcopPlayerHandler::repeatTracktqStatus()
{
return Amarok::repeatTrack();
}
@ -237,7 +237,7 @@ namespace Amarok
TQString DcopPlayerHandler::lastfmStation()
{
return LastFm::Controller::stationDescription(); //return TQString::null if not playing
return LastFm::Controller::stationDescription(); //return TQString() if not playing
}
TQString DcopPlayerHandler::nowPlaying()
@ -521,7 +521,7 @@ namespace Amarok
//the amarok binary anyway --mxcl
debug() << "Startup ID: " << args.first() << endl;
kapp->setStartupId( args.first().local8Bit() );
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
// currently X11 only
KStartupInfo::appStarted();
#endif

@ -30,19 +30,20 @@ namespace Amarok
class DcopPlayerHandler : public TQObject, virtual public AmarokPlayerInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopPlayerHandler();
public:
virtual TQString version();
virtual bool dynamicModeStatus();
virtual bool dynamicModetqStatus();
virtual bool equalizerEnabled();
virtual bool osdEnabled();
virtual bool isPlaying();
virtual bool randomModeStatus();
virtual bool repeatPlaylistStatus();
virtual bool repeatTrackStatus();
virtual bool randomModetqStatus();
virtual bool repeatPlaylisttqStatus();
virtual bool repeatTracktqStatus();
virtual int getVolume();
virtual int sampleRate();
virtual float score ();
@ -116,6 +117,7 @@ class DcopPlayerHandler : public TQObject, virtual public AmarokPlayerInterface
class DcopPlaylistHandler : public TQObject, virtual public AmarokPlaylistInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopPlaylistHandler();
@ -146,6 +148,7 @@ class DcopPlaylistHandler : public TQObject, virtual public AmarokPlaylistInterf
class DcopPlaylistBrowserHandler : public TQObject, virtual public AmarokPlaylistBrowserInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopPlaylistBrowserHandler();
@ -160,6 +163,7 @@ class DcopPlaylistBrowserHandler : public TQObject, virtual public AmarokPlaylis
class DcopContextBrowserHandler : public TQObject, virtual public AmarokContextBrowserInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopContextBrowserHandler();
@ -175,6 +179,7 @@ class DcopContextBrowserHandler : public TQObject, virtual public AmarokContextB
class DcopCollectionHandler : public TQObject, virtual public AmarokCollectionInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopCollectionHandler();
@ -208,6 +213,7 @@ class DcopCollectionHandler : public TQObject, virtual public AmarokCollectionIn
class DcopScriptHandler : public TQObject, virtual public AmarokScriptInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopScriptHandler();
@ -227,6 +233,7 @@ class DcopScriptHandler : public TQObject, virtual public AmarokScriptInterface
class DcopDevicesHandler : public TQObject, virtual public AmarokDevicesInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopDevicesHandler();
@ -241,6 +248,7 @@ class DcopDevicesHandler : public TQObject, virtual public AmarokDevicesInterfac
class DcopMediaBrowserHandler : public TQObject, virtual public AmarokMediaBrowserInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopMediaBrowserHandler();

@ -36,13 +36,13 @@ class AmarokPlayerInterface : virtual public DCOPObject
k_dcop:
virtual TQString version() = 0; ///< returns amarok version string
virtual bool dynamicModeStatus() = 0; ///< Return dynamic mode status.
virtual bool dynamicModetqStatus() = 0; ///< Return dynamic mode status.
virtual bool equalizerEnabled() = 0; ///< Return the equalizer status.
virtual bool osdEnabled() = 0; ///< Return the OSD display status.
virtual bool isPlaying() = 0; ///< Return true if something is playing now.
virtual bool randomModeStatus() = 0; ///< Return random mode status.
virtual bool repeatPlaylistStatus() = 0; ///< Return repeat playlist status.
virtual bool repeatTrackStatus() = 0; ///< Return repeat track status.
virtual bool randomModetqStatus() = 0; ///< Return random mode status.
virtual bool repeatPlaylisttqStatus() = 0; ///< Return repeat playlist status.
virtual bool repeatTracktqStatus() = 0; ///< Return repeat track status.
virtual int getVolume() = 0; ///< Return volume in range 0-100%.
virtual int sampleRate() = 0; ///< Return the sample rate of the currently playing track.
virtual float score() = 0; ///< Return the score of the currently playing track.

@ -47,13 +47,13 @@ namespace Amarok
};
#endif
static QString
static TQString
runCommand( const TQCString &command )
{
static const uint SIZE = 40960; //40 KiB
static char stdoutBuf[ SIZE ] = {0};
std::cout << "Running: " << command << std::endl;
std::cout << "Running: " << command.data() << std::endl;
FILE *process = ::popen( command, "r" );
if ( process )
@ -100,7 +100,7 @@ namespace Amarok
"Build date: " __DATE__ "\n"
"CC version: " __VERSION__ "\n" //assuming we're using GCC
"KDElibs: " KDE_VERSION_STRING "\n"
"Qt: %2\n"
"TQt: %2\n"
"TagLib: %3.%4.%5\n"
"CPU count: %6\n";
@ -120,12 +120,12 @@ namespace Amarok
#endif
body = body.arg( AmarokConfig::soundSystem() )
.arg( qVersion() )
.arg( TAGLIB_MAJOR_VERSION )
.arg( TAGLIB_MINOR_VERSION )
.arg( TAGLIB_PATCH_VERSION )
.arg( cpucount );
body = body.tqarg( AmarokConfig::soundSystem() )
.tqarg( qVersion() )
.tqarg( TAGLIB_MAJOR_VERSION )
.tqarg( TAGLIB_MINOR_VERSION )
.tqarg( TAGLIB_PATCH_VERSION )
.tqarg( cpucount );
#ifdef NDEBUG
body += "NDEBUG: true";
@ -171,37 +171,37 @@ namespace Amarok
/// clean up
bt.remove( "(no debugging symbols found)..." );
bt.remove( "(no debugging symbols found)\n" );
bt.replace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
bt.tqreplace( TQRegExp("\n{2,}"), "\n" ); //clean up multiple \n characters
bt.stripWhiteSpace();
/// analyze usefulness
bool useful = true;
const TQString fileCommandOutput = runCommand( "file `which amarokapp`" );
if( fileCommandOutput.find( "not stripped", false ) == -1 )
if( fileCommandOutput.tqfind( "not stripped", false ) == -1 )
subject += "[___stripped]"; //same length as below
else
subject += "[NOTstripped]";
if( !bt.isEmpty() ) {
const int invalidFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
const int validFrames = bt.contains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
const int invalidFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in \\?\\?") );
const int validFrames = bt.tqcontains( TQRegExp("\n#[0-9]+\\s+0x[0-9A-Fa-f]+ in [^?]") );
const int totalFrames = invalidFrames + validFrames;
if( totalFrames > 0 ) {
const double validity = double(validFrames) / totalFrames;
subject += TQString("[validity: %1]").arg( validity, 0, 'f', 2 );
subject += TQString("[validity: %1]").tqarg( validity, 0, 'f', 2 );
if( validity <= 0.5 ) useful = false;
}
subject += TQString("[frames: %1]").arg( totalFrames, 3 /*padding*/ );
subject += TQString("[frames: %1]").tqarg( totalFrames, 3 /*padding*/ );
if( bt.find( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
if( bt.tqfind( TQRegExp(" at \\w*\\.cpp:\\d+\n") ) >= 0 )
subject += "[line numbers]";
}
else
useful = false;
subject += TQString("[%1]").arg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
subject += TQString("[%1]").tqarg( AmarokConfig::soundSystem().remove( TQRegExp("-?engine") ) );
std::cout << subject.latin1() << std::endl;
@ -232,7 +232,7 @@ namespace Amarok
else {
std::cout << i18n( "\nAmarok has crashed! We are terribly sorry about this :(\n\n"
"But, all is not lost! Perhaps an upgrade is already available "
"which fixes the problem. Please check your distribution's software repository.\n" ).local8Bit();
"which fixes the problem. Please check your distribution's software repository.\n" ).local8Bit().data();
}
//_exit() exits immediately, otherwise this
@ -265,10 +265,10 @@ namespace Amarok
Amarok::CrashHandlerWidget::CrashHandlerWidget()
{
TQBoxLayout *layout = new TQHBoxLayout( this, 18, 12 );
TQBoxLayout *tqlayout = new TQHBoxLayout( this, 18, 12 );
{
TQBoxLayout *lay = new TQVBoxLayout( layout );
TQBoxLayout *lay = new TQVBoxLayout( tqlayout );
TQLabel *label = new TQLabel( this );
label->setPixmap( locate( "data", "drkonqi/pics/konqi.png" ) );
label->setFrameStyle( TQFrame::Plain | TQFrame::Box );
@ -276,9 +276,9 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
lay->addItem( new TQSpacerItem( 3, 3, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
}
layout = new TQVBoxLayout( layout, 6 );
tqlayout = new TQVBoxLayout( tqlayout, 6 );
layout->add( new TQLabel( /*i18n*/(
tqlayout->add( new TQLabel( /*i18n*/(
"<p>" "Amarok has crashed! We are terribly sorry about this :("
"<p>" "However you now have an opportunity to help us fix this crash so that it doesn't "
"happen again! Click <b>Send Email</b> and Amarok will prepare an email that you "
@ -286,11 +286,11 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
"as soon as possible."
"<p>" "Thanks for choosing Amarok.<br>" ), this ) );
layout = new TQHBoxLayout( layout, 6 );
tqlayout = new TQHBoxLayout( tqlayout, 6 );
layout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
layout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
layout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
tqlayout->addItem( new TQSpacerItem( 6, 6, TQSizePolicy::Expanding ) );
tqlayout->add( new KPushButton( KGuiItem( i18n("Send Email"), "mail_send" ), this, "email" ) );
tqlayout->add( new KPushButton( KStdGuiItem::close(), this, "close" ) );
static_cast<TQPushButton*>(child("email"))->setDefault( true );
@ -298,6 +298,6 @@ Amarok::CrashHandlerWidget::CrashHandlerWidget()
connect( child( "close" ), TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
setCaption( i18n("Crash Handler") );
setFixedSize( sizeHint() );
setFixedSize( tqsizeHint() );
}
#endif

@ -31,7 +31,7 @@
//can't mod scope in analyze you have to use transform
//TODO for 2D use setErasePixmap Qt function insetead of m_background
//TODO for 2D use setErasePixmap TQt function insetead of m_background
// make the linker happy only for gcc < 4.0
#if !( __GNUC__ > 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ >= 0 ) )
@ -40,8 +40,8 @@ template class Analyzer::Base<TQWidget>;
template<class W>
Analyzer::Base<W>::Base( TQWidget *parent, uint timeout, uint scopeSize )
: W( parent )
Analyzer::Base<W>::Base( TQWidget *tqparent, uint timeout, uint scopeSize )
: W( tqparent )
, m_timeout( timeout )
, m_fht( new FHT(scopeSize) )
{}
@ -188,10 +188,10 @@ Analyzer::Base<W>::demo() //virtual
Analyzer::Base2D::Base2D( TQWidget *parent, uint timeout, uint scopeSize )
: Base<TQWidget>( parent, timeout, scopeSize )
Analyzer::Base2D::Base2D( TQWidget *tqparent, uint timeout, uint scopeSize )
: Base<TQWidget>( tqparent, timeout, scopeSize )
{
setWFlags( Qt::WNoAutoErase ); //no flicker
setWFlags( TQt::WNoAutoErase ); //no flicker
connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}
@ -228,9 +228,9 @@ Analyzer::Base2D::paletteChange( const TQPalette& )
#ifdef HAVE_QGLWIDGET
Analyzer::Base3D::Base3D( TQWidget *parent, uint timeout, uint scopeSize )
: Base<TQGLWidget>( parent, timeout, scopeSize )
#ifdef HAVE_TQGLWIDGET
Analyzer::Base3D::Base3D( TQWidget *tqparent, uint timeout, uint scopeSize )
: Base<TQGLWidget>( tqparent, timeout, scopeSize )
{
connect( &m_timer, TQT_SIGNAL( timeout() ), TQT_SLOT( draw() ) );
}

@ -5,7 +5,7 @@
#define ANALYZERBASE_H
#include <config.h> //HAVE_QGLWIDGET
#include <config.h> //HAVE_TQGLWIDGET
#ifdef __FreeBSD__
#include <sys/types.h>
@ -17,9 +17,9 @@
#include <tqwidget.h> //baseclass
#include <vector> //included for convenience
//#ifdef HAVE_QGLWIDGET
//#ifdef HAVE_TQGLWIDGET
#include <tqgl.h> //baseclass
#ifdef Q_WS_MACX
#ifdef TQ_WS_MACX
#include <OpenGL/gl.h> //included for convenience
#include <OpenGL/glu.h> //included for convenience
#else
@ -27,8 +27,8 @@
#include <GL/glu.h> //included for convenience
#endif
//#else
////this is a workaround for compile problems due to moc
//#define TQGLWidget QWidget
////this is a workaround for compile problems due to tqmoc
//#define TQGLWidget TQWidget
//#endif
class TQEvent;
@ -76,6 +76,7 @@ protected:
class Base2D : public Base<TQWidget>
{
Q_OBJECT
TQ_OBJECT
public:
const TQPixmap *background() const { return &m_background; }
const TQPixmap *canvas() const { return &m_canvas; }
@ -105,16 +106,17 @@ private:
//This mess is because moc generates an entry for this class despite the #if block
//1. the Q_OBJECT macro must be exposed
//This mess is because tqmoc generates an entry for this class despite the #if block
//1. the TQ_OBJECT macro must be exposed
//2. we have to define the class
//3. we have to declare a ctor (to satisfy the inheritance)
//4. the slot must also by visible (!)
//TODO find out how to stop moc generating a metaobject for this class
//TODO find out how to stop tqmoc generating a metaobject for this class
class Base3D : public Base<TQGLWidget>
{
Q_OBJECT
#ifdef HAVE_QGLWIDGET
TQ_OBJECT
#ifdef HAVE_TQGLWIDGET
protected:
Base3D( TQWidget*, uint, uint = 7 );
private slots:

@ -15,7 +15,7 @@
* *
***************************************************************************/
#include <config.h> //for HAVE_QGLWIDGET macro
#include <config.h> //for HAVE_TQGLWIDGET macro
#include "amarokcore/amarokconfig.h"
#include "analyzerbase.h" //declaration here
@ -26,7 +26,7 @@
#include "turbine.h"
#include "blockanalyzer.h"
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include "glanalyzer.h"
#include "glanalyzer2.h"
#include "glanalyzer3.h"
@ -38,7 +38,7 @@
//separate from analyzerbase.cpp to save compile time
TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *tqparent )
{
//new XmmsWrapper(); //toplevel
@ -47,80 +47,80 @@ TQWidget *Analyzer::Factory::createAnalyzer( TQWidget *parent )
switch( AmarokConfig::currentAnalyzer() )
{
case 2:
analyzer = new Sonogram( parent );
analyzer = new Sonogram( tqparent );
break;
case 1:
analyzer = new TurbineAnalyzer( parent );
analyzer = new TurbineAnalyzer( tqparent );
break;
case 3:
analyzer = new BarAnalyzer( parent );
analyzer = new BarAnalyzer( tqparent );
break;
case 4:
analyzer = new BlockAnalyzer( parent );
analyzer = new BlockAnalyzer( tqparent );
break;
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
case 5:
analyzer = new GLAnalyzer( parent );
analyzer = new GLAnalyzer( tqparent );
break;
case 6:
analyzer = new GLAnalyzer2( parent );
analyzer = new GLAnalyzer2( tqparent );
break;
case 7:
analyzer = new GLAnalyzer3( parent );
analyzer = new GLAnalyzer3( tqparent );
break;
case 8:
#else
case 5:
#endif
analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
analyzer = new TQLabel( i18n( "Click for Analyzers" ), tqparent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->tqsetAlignment( TQt::AlignCenter );
break;
default:
AmarokConfig::setCurrentAnalyzer( 0 );
case 0:
analyzer = new BoomAnalyzer( parent );
analyzer = new BoomAnalyzer( tqparent );
}
return analyzer;
}
TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *parent)
TQWidget *Analyzer::Factory::createPlaylistAnalyzer( TQWidget *tqparent)
{
TQWidget *analyzer = 0;
switch( AmarokConfig::currentPlaylistAnalyzer() )
{
case 1:
analyzer = new TurbineAnalyzer( parent );
analyzer = new TurbineAnalyzer( tqparent );
break;
case 2:
analyzer = new Sonogram( parent );
analyzer = new Sonogram( tqparent );
break;
case 3:
analyzer = new BoomAnalyzer( parent );
analyzer = new BoomAnalyzer( tqparent );
break;
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
case 4:
analyzer = new GLAnalyzer( parent );
analyzer = new GLAnalyzer( tqparent );
break;
case 5:
analyzer = new GLAnalyzer2( parent );
analyzer = new GLAnalyzer2( tqparent );
break;
case 6:
analyzer = new GLAnalyzer3( parent );
analyzer = new GLAnalyzer3( tqparent );
break;
case 7:
#else
case 4:
#endif
analyzer = new TQLabel( i18n( "Click for Analyzers" ), parent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->setAlignment( Qt::AlignCenter );
analyzer = new TQLabel( i18n( "Click for Analyzers" ), tqparent ); //blank analyzer to satisfy Grue
static_cast<TQLabel *>(analyzer)->tqsetAlignment( TQt::AlignCenter );
break;
default:
AmarokConfig::setCurrentPlaylistAnalyzer( 0 );
case 0:
analyzer = new BlockAnalyzer( parent );
analyzer = new BlockAnalyzer( tqparent );
break;
}
return analyzer;

@ -17,15 +17,15 @@
#include <tqpainter.h>
BarAnalyzer::BarAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 12, 8 )
BarAnalyzer::BarAnalyzer( TQWidget *tqparent )
: Analyzer::Base2D( tqparent, 12, 8 )
//, m_bands( BAND_COUNT )
//, barVector( BAND_COUNT, 0 )
//, roofVector( BAND_COUNT, 50 )
//, roofVelocityVector( BAND_COUNT, ROOF_VELOCITY_REDUCTION_FACTOR )
{
//roof pixmaps don't depend on size() so we do in the ctor
m_bg = parent->paletteBackgroundColor();
m_bg = tqparent->paletteBackgroundColor();
TQColor fg( 0xff, 0x50, 0x70 );
#define m_bg backgroundColor()
@ -150,7 +150,7 @@ void BarAnalyzer::analyze( const Scope &s )
//blt the bar
bitBlt( canvas(), x, height() - y2,
gradient(), y2 * COLUMN_WIDTH, height() - y2, COLUMN_WIDTH, y2, Qt::CopyROP );
gradient(), y2 * COLUMN_WIDTH, height() - y2, COLUMN_WIDTH, y2, TQt::CopyROP );
m_roofMem[i].push_back( height() - roofVector[i] - 2 );

@ -21,7 +21,7 @@ class BarAnalyzer : public Analyzer::Base2D
//virtual void transform( Scope& );
/**
* Resizes the widget to a new geometry according to @p e
* Resizes the widget to a new tqgeometry according to @p e
* @param e The resize-event
*/
void resizeEvent( TQResizeEvent * e);

@ -29,8 +29,8 @@ static inline uint myMax( uint v1, uint v2 ) { return v1 > v2 ? v1 : v2; }
namespace Amarok { extern KConfig *config( const TQString& ); }
BlockAnalyzer::BlockAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 20, 9 )
BlockAnalyzer::BlockAnalyzer( TQWidget *tqparent )
: Analyzer::Base2D( tqparent, 20, 9 )
, m_columns( 0 ) //uint
, m_rows( 0 ) //uint
, m_y( 0 ) //uint
@ -141,7 +141,7 @@ BlockAnalyzer::analyze( const Analyzer::Scope &s )
// y starts from the top and increases in units of blocks
// m_yscale looks similar to: { 0.7, 0.5, 0.25, 0.15, 0.1, 0 }
// if it contains 6 elements there are 5 rows in the analyzer
// if it tqcontains 6 elements there are 5 rows in the analyzer
Analyzer::interpolate( s, m_scope );
@ -222,7 +222,7 @@ adjustToLimits( int &b, int &f, uint &amount )
* It won't modify the hue of fg unless absolutely necessary
* @return the adjusted form of fg
*/
QColor
TQColor
ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
{
class OutputOnExit {
@ -244,8 +244,8 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
int bh, bs, bv;
int fh, fs, fv;
bg.getHsv( bh, bs, bv );
fg.getHsv( fh, fs, fv );
bg.getHsv( &bh, &bs, &bv );
fg.getHsv( &fh, &fs, &fv );
int dv = abs( bv - fv );
@ -345,7 +345,7 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
// STAMP
// debug() << "Something went wrong!\n";
return Qt::blue;
return TQt::blue;
#undef amount
// #undef STAMP
@ -354,7 +354,7 @@ ensureContrast( const TQColor &bg, const TQColor &fg, uint _amount = 150 )
void
BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
{
const TQColor bg = palette().active().background();
const TQColor bg = tqpalette().active().background();
const TQColor fg = ensureContrast( bg, KGlobalSettings::activeTitleColor() );
m_topBarPixmap.fill( fg );
@ -372,11 +372,11 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
p.fillRect( 0, y*(HEIGHT+1), WIDTH, HEIGHT, TQColor( r+int(dr*y), g+int(dg*y), b+int(db*y) ) );
{
const TQColor bg = palette().active().background().dark( 112 );
const TQColor bg = tqpalette().active().background().dark( 112 );
//make a complimentary fadebar colour
//TODO dark is not always correct, dumbo!
int h,s,v; palette().active().background().dark( 150 ).getHsv( &h, &s, &v );
int h,s,v; tqpalette().active().background().dark( 150 ).getHsv( &h, &s, &v );
const TQColor fg( h + 120, s, v, TQColor::Hsv );
const double dr = fg.red() - bg.red();
@ -386,7 +386,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
// Precalculate all fade-bar pixmaps
for( uint y = 0; y < FADE_SIZE; ++y ) {
m_fade_bars[y].fill( palette().active().background() );
m_fade_bars[y].fill( tqpalette().active().background() );
TQPainter f( &m_fade_bars[y] );
for( int z = 0; (uint)z < m_rows; ++z ) {
const double Y = 1.0 - (log10( FADE_SIZE - y ) / log10( FADE_SIZE ));
@ -401,7 +401,7 @@ BlockAnalyzer::paletteChange( const TQPalette& ) //virtual
void
BlockAnalyzer::drawBackground()
{
const TQColor bg = palette().active().background();
const TQColor bg = tqpalette().active().background();
const TQColor bgdark = bg.dark( 112 );
background()->fill( bg );
@ -430,7 +430,7 @@ BlockAnalyzer::contextMenuEvent( TQContextMenuEvent *e )
{
const uint v = ids[x];
menu.insertItem( i18n( "%1 fps" ).arg( 1000/v ), v );
menu.insertItem( i18n( "%1 fps" ).tqarg( 1000/v ), v );
menu.setItemChecked( v, v == timeout() );
}

@ -10,8 +10,8 @@
#include <tqslider.h>
#include <tqspinbox.h>
BoomAnalyzer::BoomAnalyzer( TQWidget *parent )
: Analyzer::Base2D( parent, 10, 9 )
BoomAnalyzer::BoomAnalyzer( TQWidget *tqparent )
: Analyzer::Base2D( tqparent, 10, 9 )
, K_barHeight( 1.271 )//1.471
, F_peakSpeed( 1.103 )//1.122
, F( 1.0 )

@ -14,6 +14,7 @@
class BoomAnalyzer : public Analyzer::Base2D
{
Q_OBJECT
TQ_OBJECT
public:
BoomAnalyzer( TQWidget* );

@ -17,15 +17,15 @@
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include <cmath>
#include "glanalyzer.h"
#include <kdebug.h>
GLAnalyzer::GLAnalyzer( TQWidget *parent )
: Analyzer::Base3D(parent, 15)
GLAnalyzer::GLAnalyzer( TQWidget *tqparent )
: Analyzer::Base3D(tqparent, 15)
, m_oldy(32, -10.0f)
, m_peaks(32)
{}

@ -19,7 +19,7 @@
#define GLOSCOPE_H
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include "analyzerbase.h"

@ -17,7 +17,7 @@
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include <cmath>
#include <cstdlib>
@ -28,8 +28,8 @@
#include <sys/time.h>
GLAnalyzer2::GLAnalyzer2( TQWidget *parent ):
Analyzer::Base3D(parent, 15)
GLAnalyzer2::GLAnalyzer2( TQWidget *tqparent ):
Analyzer::Base3D(tqparent, 15)
{
//initialize openGL context before managing GL calls
makeCurrent();
@ -232,7 +232,7 @@ void GLAnalyzer2::paintGL()
glLoadIdentity();
// glRotatef( -frame.rotDegrees, 0,0,1 );
glBegin( GL_QUADS );
glBegin( GL_TQUADS );
// Particle * particle = particleList.first();
// for (; particle; particle = particleList.next())
{

@ -19,7 +19,7 @@
#define GLSTARVIEW_H
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include "analyzerbase.h"
#include <tqstring.h>

@ -17,7 +17,7 @@
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#include <cmath>
#include <cstdlib>
@ -121,8 +121,8 @@ class Paddle
};
GLAnalyzer3::GLAnalyzer3( TQWidget *parent ):
Analyzer::Base3D(parent, 15)
GLAnalyzer3::GLAnalyzer3( TQWidget *tqparent ):
Analyzer::Base3D(tqparent, 15)
{
//initialize openGL context before managing GL calls
makeCurrent();
@ -347,7 +347,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
pYm = y - sizeY,
pYM = y + sizeY;
// Draw the Dot
glBegin( GL_QUADS );
glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, pYm, z );
glTexCoord2f( 0, 1 ); // Top Left
@ -370,7 +370,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the top shadow
currentColor[3] = topSide * topSide * alpha;
glColor4fv( currentColor );
glBegin( GL_QUADS );
glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, 1, pZm );
glTexCoord2f( 0, 1 ); // Top Left
@ -383,7 +383,7 @@ void GLAnalyzer3::drawDot3s( float x, float y, float z, float size )
// Draw the bottom shadow
currentColor[3] = bottomSide * bottomSide * alpha;
glColor4fv( currentColor );
glBegin( GL_QUADS );
glBegin( GL_TQUADS );
glTexCoord2f( 0, 0 ); // Bottom Left
glVertex3f( pXm, -1, pZm );
glTexCoord2f( 0, 1 ); // Top Left

@ -16,7 +16,7 @@
***************************************************************************/
#include <config.h>
#ifdef HAVE_QGLWIDGET
#ifdef HAVE_TQGLWIDGET
#ifndef GLBOUNCER_H
#define GLBOUNCER_H

@ -14,8 +14,8 @@
#include <tqpainter.h>
#include "sonogram.h"
Sonogram::Sonogram(TQWidget *parent) :
Analyzer::Base2D(parent, 16, 9)
Sonogram::Sonogram(TQWidget *tqparent) :
Analyzer::Base2D(tqparent, 16, 9)
{
}
@ -64,7 +64,7 @@ void Sonogram::analyze(const Scope &s)
else if (*it < 1.0)
c.setHsv(95 - int(*it * 90.0), 255, 255);
else
c = Qt::red;
c = TQt::red;
p.setPen(c);
p.drawPoint(x, y--);

@ -14,7 +14,7 @@
class TurbineAnalyzer : public BoomAnalyzer
{
public:
TurbineAnalyzer( TQWidget *parent ) : BoomAnalyzer( parent ) {}
TurbineAnalyzer( TQWidget *tqparent ) : BoomAnalyzer( tqparent ) {}
void analyze( const Scope& );
};

@ -91,12 +91,12 @@ TQMutex Amarok::globalDirsMutex;
int App::mainThreadId = 0;
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
#include <qt_mac.h>
static AEEventHandlerUPP appleEventProcessorUPP = 0;
OSStatus
OStqStatus
appleEventProcessor(const AppleEvent *ae, AppleEvent *, long /*handlerRefCon*/)
{
OSType aeID = typeWildCard;
@ -130,7 +130,7 @@ App::App()
{
DEBUG_BLOCK
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
// this is inspired by OpenSceneGraph: osgDB/FilePath.cpp
// Start with the the Bundle PlugIns directory.
@ -192,7 +192,7 @@ App::App()
qWarning("AtomicString was initialized from a thread other than the GUI "
"thread. This could lead to memory leaks.");
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
appleEventProcessorUPP = AEEventHandlerUPP(appleEventProcessor);
AEInstallEventHandler(kCoreEventClass, kAEReopenApplication, appleEventProcessorUPP, (long)this, true);
#endif
@ -214,7 +214,7 @@ App::~App()
AmarokConfig::setResumeTrack( EngineController::instance()->playingURL().prettyURL() );
AmarokConfig::setResumeTime( engine->position() );
}
else AmarokConfig::setResumeTrack( TQString::null ); //otherwise it'll play previous resume next time!
else AmarokConfig::setResumeTrack( TQString() ); //otherwise it'll play previous resume next time!
}
EngineController::instance()->endSession(); //records final statistics
@ -442,7 +442,7 @@ void App::initGlobalShortcuts()
m_pGlobalAccel->insert( "stop", i18n( "Stop" ), 0, KKey("WIN+v"), 0,
ec, TQT_SLOT( stop() ), true, true );
m_pGlobalAccel->insert( "stop_after_global", i18n( "Stop Playing After Current Track" ), 0, KKey("WIN+CTRL+v"), 0,
Playlist::instance()->qscrollview(), TQT_SLOT( toggleStopAfterCurrentTrack() ), true, true );
TQT_TQOBJECT(Playlist::instance()->qscrollview()), TQT_SLOT( toggleStopAfterCurrentTrack() ), true, true );
m_pGlobalAccel->insert( "next", i18n( "Next Track" ), 0, KKey("WIN+b"), 0,
ec, TQT_SLOT( next() ), true, true );
m_pGlobalAccel->insert( "prev", i18n( "Previous Track" ), 0, KKey("WIN+z"), 0,
@ -456,26 +456,26 @@ void App::initGlobalShortcuts()
m_pGlobalAccel->insert( "seekbackward", i18n( "Seek Backward" ), 0, KKey("WIN+Shift+KP_Subtract"), 0,
ec, TQT_SLOT( seekBackward() ), true, true );
m_pGlobalAccel->insert( "playlist_add", i18n( "Add Media..." ), 0, KKey("WIN+a"), 0,
m_pPlaylistWindow, TQT_SLOT( slotAddLocation() ), true, true );
TQT_TQOBJECT(m_pPlaylistWindow), TQT_SLOT( slotAddLocation() ), true, true );
m_pGlobalAccel->insert( "show", i18n( "Toggle Playlist Window" ), 0, KKey("WIN+p"), 0,
m_pPlaylistWindow, TQT_SLOT( showHide() ), true, true );
#ifdef Q_WS_X11
TQT_TQOBJECT(m_pPlaylistWindow), TQT_SLOT( showHide() ), true, true );
#ifdef TQ_WS_X11
m_pGlobalAccel->insert( "osd", i18n( "Show OSD" ), 0, KKey("WIN+o"), 0,
Amarok::OSD::instance(), TQT_SLOT( forceToggleOSD() ), true, true );
TQT_TQOBJECT(Amarok::OSD::instance()), TQT_SLOT( forceToggleOSD() ), true, true );
#endif
m_pGlobalAccel->insert( "mute", i18n( "Mute Volume" ), 0, KKey("WIN+m"), 0,
ec, TQT_SLOT( mute() ), true, true );
m_pGlobalAccel->insert( "rating1", i18n( "Rate Current Track: 1" ), 0, KKey("WIN+1"), 0,
this, TQT_SLOT( setRating1() ), true, true );
TQT_TQOBJECT(this), TQT_SLOT( setRating1() ), true, true );
m_pGlobalAccel->insert( "rating2", i18n( "Rate Current Track: 2" ), 0, KKey("WIN+2"), 0,
this, TQT_SLOT( setRating2() ), true, true );
TQT_TQOBJECT(this), TQT_SLOT( setRating2() ), true, true );
m_pGlobalAccel->insert( "rating3", i18n( "Rate Current Track: 3" ), 0, KKey("WIN+3"), 0,
this, TQT_SLOT( setRating3() ), true, true );
TQT_TQOBJECT(this), TQT_SLOT( setRating3() ), true, true );
m_pGlobalAccel->insert( "rating4", i18n( "Rate Current Track: 4" ), 0, KKey("WIN+4"), 0,
this, TQT_SLOT( setRating4() ), true, true );
TQT_TQOBJECT(this), TQT_SLOT( setRating4() ), true, true );
m_pGlobalAccel->insert( "rating5", i18n( "Rate Current Track: 5" ), 0, KKey("WIN+5"), 0,
this, TQT_SLOT( setRating5() ), true, true );
TQT_TQOBJECT(this), TQT_SLOT( setRating5() ), true, true );
m_pGlobalAccel->setConfigGroup( "Shortcuts" );
m_pGlobalAccel->readSettings( kapp->config() );
@ -530,13 +530,13 @@ void App::fixHyperThreading()
// If the library is new enough try and call sched_setaffinity.
#ifdef SCHEDAFFINITY_SUPPORT
cpu_set_t mask;
CPU_ZERO( &mask ); // Initializes all the bits in the mask to zero
CPU_SET( 0, &mask ); // Sets only the bit corresponding to cpu
cpu_set_t tqmask;
CPU_ZERO( &tqmask ); // Initializes all the bits in the tqmask to zero
CPU_SET( 0, &tqmask ); // Sets only the bit corresponding to cpu
#ifdef SCHEDAFFINITY_3PARAMS
if ( sched_setaffinity( 0, sizeof(mask), &mask ) == -1 )
if ( sched_setaffinity( 0, sizeof(tqmask), &tqmask ) == -1 )
#else //SCHEDAFFINITY_3PARAMS
if ( sched_setaffinity( 0, &mask ) == -1 )
if ( sched_setaffinity( 0, &tqmask ) == -1 )
#endif //SCHEDAFFINITY_3PARAMS
{
warning() << "sched_setaffinity() call failed with error code: " << errno << endl;
@ -622,7 +622,7 @@ void App::applySettings( bool firstTime )
//determine and apply colors first
applyColorScheme();
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
TrackToolTip::instance()->removeFromWidget( m_pTray );
#endif
@ -644,9 +644,9 @@ void App::applySettings( bool firstTime )
connect( m_pPlayerWindow, TQT_SIGNAL(playlistToggled( bool )), m_pPlaylistWindow, TQT_SLOT(showHide()) );
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
//TODO get this to work!
//may work if you set no parent for the systray?
//may work if you set no tqparent for the systray?
//KWin::setSystemTrayWindowFor( m_pTray->winId(), m_pPlayerWindow->winId() );
delete m_pTray; m_pTray = new Amarok::TrayIcon( m_pPlayerWindow );
@ -666,7 +666,7 @@ void App::applySettings( bool firstTime )
m_pPlayerWindow->applySettings();
} else if( m_pPlayerWindow ) {
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
delete m_pTray; m_pTray = new Amarok::TrayIcon( m_pPlaylistWindow );
m_pTray->engineStateChanged(EngineController::instance()->engine()->state(), EngineController::instance()->engine()->state());
m_pTray->engineNewMetaData(EngineController::instance()->bundle(), false);
@ -675,7 +675,7 @@ void App::applySettings( bool firstTime )
//Set the caption correctly.
if ( !EngineController::instance()->bundle().prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( EngineController::instance()->bundle().veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( EngineController::instance()->bundle().veryNiceTitle() ) );
else
m_pPlaylistWindow->setCaption( "Amarok" );
@ -691,7 +691,7 @@ void App::applySettings( bool firstTime )
Scrobbler::instance()->applySettings();
Amarok::OSD::instance()->applySettings();
CollectionDB::instance()->applySettings();
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
m_pTray->setShown( AmarokConfig::showTrayIcon() );
TrackToolTip::instance()->addToWidget( m_pTray );
#endif
@ -700,7 +700,7 @@ void App::applySettings( bool firstTime )
//on startup we need to show the window, but only if it wasn't hidden on exit
//and always if the trayicon isn't showing
TQWidget* main_window = mainWindow();
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
if( ( main_window && firstTime && !Amarok::config()->readBoolEntry( "HiddenOnExit", false ) ) || ( main_window && !AmarokConfig::showTrayIcon() ) )
#endif
{
@ -780,9 +780,9 @@ App::continueInit()
CollectionDB::instance()->checkDatabase();
m_pMediaDeviceManager = MediaDeviceManager::instance();
m_pGlobalAccel = new KGlobalAccel( this );
m_pGlobalAccel = new KGlobalAccel( TQT_TQOBJECT(this) );
m_pPlaylistWindow = new PlaylistWindow();
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
m_pTray = new Amarok::TrayIcon( m_pPlaylistWindow );
#endif
m_pPlaylistWindow->init(); //creates the playlist, browsers, etc.
@ -855,8 +855,8 @@ App::applyColorScheme()
TQColorGroup group;
using Amarok::ColorScheme::AltBase;
int h, s, v;
TQWidget* const browserBar = static_cast<TQWidget*>( playlistWindow()->child( "BrowserBar" ) );
TQWidget* const contextBrowser = static_cast<TQWidget*>( ContextBrowser::instance() );
TQWidget* const browserBar = TQT_TQWIDGET( playlistWindow()->child( "BrowserBar" ) );
TQWidget* const contextBrowser = TQT_TQWIDGET( ContextBrowser::instance() );
if( AmarokConfig::schemeKDE() )
{
@ -871,11 +871,11 @@ App::applyColorScheme()
else if( AmarokConfig::schemeAmarok() )
{
group = TQApplication::palette().active();
group = TQApplication::tqpalette().active();
const TQColor bg( Amarok::blue );
AltBase.setRgb( 57, 64, 98 );
group.setColor( TQColorGroup::Text, Qt::white );
group.setColor( TQColorGroup::Text, TQt::white );
group.setColor( TQColorGroup::Link, 0xCCCCCC );
group.setColor( TQColorGroup::Base, bg );
group.setColor( TQColorGroup::Foreground, 0xd7d7ef );
@ -884,13 +884,13 @@ App::applyColorScheme()
group.setColor( TQColorGroup::Button, AltBase );
group.setColor( TQColorGroup::ButtonText, 0xd7d7ef );
// group.setColor( TQColorGroup::Light, Qt::cyan /*lighter than Button color*/ );
// group.setColor( TQColorGroup::Midlight, Qt::blue /*between Button and Light*/ );
// group.setColor( TQColorGroup::Dark, Qt::green /*darker than Button*/ );
// group.setColor( TQColorGroup::Mid, Qt::red /*between Button and Dark*/ );
// group.setColor( TQColorGroup::Shadow, Qt::yellow /*a very dark color. By default, the shadow color is Qt::black*/ );
// group.setColor( TQColorGroup::Light, TQt::cyan /*lighter than Button color*/ );
// group.setColor( TQColorGroup::Midlight, TQt::blue /*between Button and Light*/ );
// group.setColor( TQColorGroup::Dark, TQt::green /*darker than Button*/ );
// group.setColor( TQColorGroup::Mid, TQt::red /*between Button and Dark*/ );
// group.setColor( TQColorGroup::Shadow, TQt::yellow /*a very dark color. By default, the shadow color is TQt::black*/ );
group.setColor( TQColorGroup::Highlight, Qt::white );
group.setColor( TQColorGroup::Highlight, TQt::white );
group.setColor( TQColorGroup::HighlightedText, bg );
//group.setColor( TQColorGroup::BrightText, TQColor( 0xff, 0x40, 0x40 ) ); //GlowColor
@ -902,11 +902,11 @@ App::applyColorScheme()
using namespace Amarok::ColorScheme;
Base = Amarok::blue;
Text = Qt::white;
Text = TQt::white;
Background = 0x002090;
Foreground = 0x80A0FF;
//all children() derive their palette from this
//all tqchildren() derive their palette from this
playlistWindow()->setPalette( TQPalette( group, group, group ) );
browserBar->unsetPalette();
contextBrowser->setPalette( TQPalette( group, group, group ) );
@ -916,7 +916,7 @@ App::applyColorScheme()
{
// we try to be smart: this code figures out contrasting colors for
// selection and alternate background rows
group = TQApplication::palette().active();
group = TQApplication::tqpalette().active();
const TQColor fg( AmarokConfig::playlistWindowFgColor() );
const TQColor bg( AmarokConfig::playlistWindowBgColor() );
@ -937,8 +937,8 @@ App::applyColorScheme()
group.setColor( TQColorGroup::Text, fg );
group.setColor( TQColorGroup::Link, fg.light( 120 ) );
group.setColor( TQColorGroup::Highlight, highlight );
group.setColor( TQColorGroup::HighlightedText, Qt::white );
group.setColor( TQColorGroup::Dark, Qt::darkGray );
group.setColor( TQColorGroup::HighlightedText, TQt::white );
group.setColor( TQColorGroup::Dark, TQt::darkGray );
PlayerWidget::determineAmarokColors();
@ -952,7 +952,7 @@ App::applyColorScheme()
// set the KListView alternate colours
TQObjectList* const list = playlistWindow()->queryList( "KListView" );
for( TQObject *o = list->first(); o; o = list->next() )
static_cast<KListView*>(o)->setAlternateBackground( AltBase );
static_cast<KListView*>(TQT_TQWIDGET(o))->setAlternateBackground( AltBase );
delete list; //heap allocated!
}
@ -964,7 +964,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//to use it just pass the event eg:
//
// void Foo::barEvent( QBarEvent *e )
// void Foo::barEvent( TQBarEvent *e )
// {
// Amarok::genericEventHandler( this, e );
// }
@ -1009,14 +1009,14 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//please don't remove!
case TQEvent::Wheel:
{
#define e static_cast<TQWheelEvent*>(e)
#define e TQT_TQWHEELEVENT(e)
//this behaviour happens for the systray and the player window
//to override one, override it in that class
switch( e->state() )
{
case Qt::ControlButton:
case TQt::ControlButton:
{
const bool up = e->delta() > 0;
@ -1026,7 +1026,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
else EngineController::instance()->next();
break;
}
case Qt::ShiftButton:
case TQt::ShiftButton:
{
EngineController::instance()->seekRelative( ( e->delta() / 120 ) * 10000 ); // 10 seconds
break;
@ -1046,7 +1046,7 @@ bool Amarok::genericEventHandler( TQWidget *recipient, TQEvent *e )
//KDE policy states we should hide to tray and not quit() when the
//close window button is pushed for the main widget
static_cast<TQCloseEvent*>(e)->accept(); //if we don't do this the info box appears on quit()!
TQT_TQCLOSEEVENT(e)->accept(); //if we don't do this the info box appears on quit()!
if( AmarokConfig::showTrayIcon() && !e->spontaneous() && !kapp->sessionSaving() )
{
@ -1084,7 +1084,7 @@ void App::engineStateChanged( Engine::State state, Engine::State oldState )
if ( oldState == Engine::Paused )
Amarok::OSD::instance()->OSDWidget::show( i18n( "state, as in playing", "Play" ) );
if ( !bundle.prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
break;
case Engine::Paused:
@ -1106,7 +1106,7 @@ void App::engineNewMetaData( const MetaBundle &bundle, bool /*trackChanged*/ )
{
Amarok::OSD::instance()->show( bundle );
if ( !bundle.prettyTitle().isEmpty() )
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").arg( bundle.veryNiceTitle() ) );
m_pPlaylistWindow->setCaption( i18n("Amarok - %1").tqarg( bundle.veryNiceTitle() ) );
TrackToolTip::instance()->setTrack( bundle );
}
@ -1272,8 +1272,8 @@ void App::slotTrashResult( KIO::Job *job )
TQWidget *App::mainWindow() const
{
return AmarokConfig::showPlayerWindow() ? static_cast<TQWidget*>( m_pPlayerWindow )
: static_cast<TQWidget*>( m_pPlaylistWindow );
return AmarokConfig::showPlayerWindow() ? TQT_TQWIDGET( m_pPlayerWindow )
: TQT_TQWIDGET( m_pPlaylistWindow );
}
void App::quit()
@ -1313,7 +1313,7 @@ namespace Amarok
{
//URL can be in whatever forms KURL::fromPathOrURL understands - ie most.
const TQString cmd = "%1 \"%2\"";
return KRun::runCommand( cmd.arg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
return KRun::runCommand( cmd.tqarg( AmarokConfig::externalBrowser(), KURL::fromPathOrURL( url ).url() ) ) > 0;
}
namespace ColorScheme
@ -1325,9 +1325,9 @@ namespace Amarok
TQColor AltBase;
}
OverrideCursor::OverrideCursor( Qt::CursorShape cursor )
OverrideCursor::OverrideCursor( TQt::tqCursorShape cursor )
{
TQApplication::setOverrideCursor( cursor == Qt::WaitCursor ? KCursor::waitCursor() : KCursor::workingCursor() );
TQApplication::setOverrideCursor( cursor == TQt::WaitCursor ? KCursor::waitCursor() : KCursor::workingCursor() );
}
OverrideCursor::~OverrideCursor()
@ -1347,24 +1347,24 @@ namespace Amarok
{
TQString result = path;
// german umlauts
result.replace( TQChar(0x00e4), "ae" ).replace( TQChar(0x00c4), "Ae" );
result.replace( TQChar(0x00f6), "oe" ).replace( TQChar(0x00d6), "Oe" );
result.replace( TQChar(0x00fc), "ue" ).replace( TQChar(0x00dc), "Ue" );
result.replace( TQChar(0x00df), "ss" );
result.tqreplace( TQChar(0x00e4), "ae" ).tqreplace( TQChar(0x00c4), "Ae" );
result.tqreplace( TQChar(0x00f6), "oe" ).tqreplace( TQChar(0x00d6), "Oe" );
result.tqreplace( TQChar(0x00fc), "ue" ).tqreplace( TQChar(0x00dc), "Ue" );
result.tqreplace( TQChar(0x00df), "ss" );
// some strange accents
result.replace( TQChar(0x00e7), "c" ).replace( TQChar(0x00c7), "C" );
result.replace( TQChar(0x00fd), "y" ).replace( TQChar(0x00dd), "Y" );
result.replace( TQChar(0x00f1), "n" ).replace( TQChar(0x00d1), "N" );
result.tqreplace( TQChar(0x00e7), "c" ).tqreplace( TQChar(0x00c7), "C" );
result.tqreplace( TQChar(0x00fd), "y" ).tqreplace( TQChar(0x00dd), "Y" );
result.tqreplace( TQChar(0x00f1), "n" ).tqreplace( TQChar(0x00d1), "N" );
// czech letters with carons
result.replace( TQChar(0x0161), "s" ).replace( TQChar(0x0160), "S" );
result.replace( TQChar(0x010d), "c" ).replace( TQChar(0x010c), "C" );
result.replace( TQChar(0x0159), "r" ).replace( TQChar(0x0158), "R" );
result.replace( TQChar(0x017e), "z" ).replace( TQChar(0x017d), "Z" );
result.replace( TQChar(0x0165), "t" ).replace( TQChar(0x0164), "T" );
result.replace( TQChar(0x0148), "n" ).replace( TQChar(0x0147), "N" );
result.replace( TQChar(0x010f), "d" ).replace( TQChar(0x010e), "D" );
result.tqreplace( TQChar(0x0161), "s" ).tqreplace( TQChar(0x0160), "S" );
result.tqreplace( TQChar(0x010d), "c" ).tqreplace( TQChar(0x010c), "C" );
result.tqreplace( TQChar(0x0159), "r" ).tqreplace( TQChar(0x0158), "R" );
result.tqreplace( TQChar(0x017e), "z" ).tqreplace( TQChar(0x017d), "Z" );
result.tqreplace( TQChar(0x0165), "t" ).tqreplace( TQChar(0x0164), "T" );
result.tqreplace( TQChar(0x0148), "n" ).tqreplace( TQChar(0x0147), "N" );
result.tqreplace( TQChar(0x010f), "d" ).tqreplace( TQChar(0x010e), "D" );
// accented vowels
TQChar a[] = { 'a', 0xe0,0xe1,0xe2,0xe3,0xe5, 0 };

@ -42,11 +42,12 @@ class MediaDeviceManager;
class LIBAMAROK_EXPORT App : public KApplication, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
public:
App();
~App();
static App *instance() { return static_cast<App*>( qApp ); }
static App *instance() { return static_cast<App*>( tqApp ); }
static void handleCliArgs();
static void initCliArgs( int argc, char *argv[] );
@ -113,7 +114,7 @@ class LIBAMAROK_EXPORT App : public KApplication, public EngineObserver
KGlobalAccel *m_pGlobalAccel;
PlayerWidget *m_pPlayerWindow;
PlaylistWindow *m_pPlaylistWindow;
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
Amarok::TrayIcon *m_pTray;
#endif
MediaDeviceManager *m_pMediaDeviceManager;

@ -27,7 +27,7 @@
#include "atomicstring.h"
class AtomicString::Data: public QString
class AtomicString::Data: public TQString
{
public:
uint refcount;
@ -82,7 +82,7 @@ TQString AtomicString::string() const
TQString AtomicString::deepCopy() const
{
if (m_string)
return TQString( m_string->unicode(), m_string->length() );
return TQString( m_string->tqunicode(), m_string->length() );
return TQString();
}
@ -95,7 +95,7 @@ const TQString *AtomicString::ptr() const
{
if( m_string )
return m_string;
return &TQString::null;
return &TQString();
}
uint AtomicString::refcount() const
@ -150,10 +150,10 @@ inline void AtomicString::ref( Data *s )
bool AtomicString::isMainThread()
{
// For isMainThread(), we could use TQThread::currentThread(), except the
// docs say it's unreliable. And in general QThreads don't like to be called from
// docs say it's unreliable. And in general TQThreads don't like to be called from
// app destructors. Good old pthreads will serve us well. As for Windows, these
// two calls surely have equivalents; better yet we'll have QT4 and thread safe
// QStrings by then.
// TQStrings by then.
// Note that the the static local init is thread safe.
static pthread_t main_thread = pthread_self();
return pthread_equal(pthread_self(), main_thread);

@ -27,7 +27,7 @@
* can hash 5 million 256 byte strings in 1.34s on a 1.62GHz Athlon XP.) For
* other use, the overhead compared to a plain TQString should be minimal.
*
* Added note: due to QString's thread unsafe refcounting, special precautions have to be
* Added note: due to TQString's thread unsafe refcounting, special precautions have to be
* taken to avoid memory corruption, while still maintaining some level of efficiency.
* We deepCopy strings, unless we are in the same thread that *first* used
* AtomicStrings. Also, deletions from other threads are delayed until that first thread
@ -136,15 +136,15 @@ public:
* different ones. This can be useful for certain kinds of hacks, but
* shouldn't normally be used.
*
* Note: DO NOT COPY this pointer with TQString() or QString=. It is not
* Note: DO NOT COPY this pointer with TQString() or TQString=. It is not
* thread safe to do it (TQString internal refcount)
* @return the internal pointer to the string
*/
const TQString *ptr() const;
/**
* For convenience, so you can do atomicstring->QStringfunction(),
* instead of atomicstring.string().QStringfunction(). The same warning
* For convenience, so you can do atomicstring->TQStringfunction(),
* instead of atomicstring.string().TQStringfunction(). The same warning
* applies as for the above ptr() function.
*/
inline const TQString *operator->() const { return ptr(); }

@ -18,8 +18,8 @@ namespace Browser
class ToolBar : public KToolBar
{
public:
ToolBar( TQWidget *parent )
: KToolBar( parent, "NotMainToolBar" )
ToolBar( TQWidget *tqparent )
: KToolBar( tqparent, "NotMainToolBar" )
{
setMovingEnabled(false);
setFlat(true);

@ -38,38 +38,38 @@ namespace Amarok
Splitter( BrowserBar *w ) : TQWidget( w, "divider" )
{
setCursor( TQCursor(SplitHCursor) );
styleChange( style() );
styleChange( tqstyle() );
}
virtual void paintEvent( TQPaintEvent* )
{
TQPainter p( this );
parentWidget()->style().drawPrimitive( TQStyle::PE_Splitter, &p, rect(), colorGroup(), TQStyle::Style_Horizontal );
tqparentWidget()->tqstyle().tqdrawPrimitive( TQStyle::PE_Splitter, &p, rect(), tqcolorGroup(), TQStyle::Style_Horizontal );
}
virtual void styleChange( TQStyle& )
{
setFixedWidth( style().pixelMetric( TQStyle::PM_SplitterWidth, this ) );
setFixedWidth( tqstyle().tqpixelMetric( TQStyle::PM_SplitterWidth, this ) );
}
virtual void mouseMoveEvent( TQMouseEvent *e )
{
static_cast<BrowserBar*>(parent())->mouseMovedOverSplitter( e );
static_cast<BrowserBar*>(TQT_TQWIDGET(tqparent()))->mouseMovedOverSplitter( e );
}
};
}
BrowserBar* BrowserBar::s_instance = 0;
BrowserBar::BrowserBar( TQWidget *parent )
: TQWidget( parent, "BrowserBar" )
BrowserBar::BrowserBar( TQWidget *tqparent )
: TQWidget( tqparent, "BrowserBar" )
, EngineObserver( EngineController::instance() )
, m_playlistBox( new TQVBox( this ) )
, m_divider( new Amarok::Splitter( this ) )
, m_browserBox( new TQVBox( this ) )
, m_currentIndex( -1 )
, m_lastIndex( -1 )
, m_mapper( new TQSignalMapper( this ) )
, m_mapper( new TQSignalMapper( TQT_TQOBJECT(this) ) )
{
m_tabManagementButton = new TQPushButton( SmallIconSet(Amarok::icon( "configure" )), 0, this, "tab_managment_button" );
connect (m_tabManagementButton, TQT_SIGNAL(clicked()), TQT_SLOT(showBrowserSelectionMenu()));
@ -81,12 +81,12 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar = new MultiTabBar( MultiTabBar::Vertical, this );
m_tabManagementButton->setFixedWidth(m_tabBar->sizeHint().width());
m_tabManagementButton->setFixedHeight(m_tabBar->sizeHint().width());
m_tabManagementButton->setFixedWidth(m_tabBar->tqsizeHint().width());
m_tabManagementButton->setFixedHeight(m_tabBar->tqsizeHint().width());
s_instance = this;
m_pos = m_tabBar->sizeHint().width() + 5; //5 = esthetic spacing
m_pos = m_tabBar->tqsizeHint().width() + 5; //5 = esthetic spacing
m_tabBar->setStyle( MultiTabBar::AMAROK );
m_tabBar->setPosition( MultiTabBar::Left );
@ -94,9 +94,9 @@ BrowserBar::BrowserBar( TQWidget *parent )
m_tabBar->setFixedWidth( m_pos );
m_tabBar->move( 0, 25 );
TQVBoxLayout *layout = new TQVBoxLayout( m_browserBox );
layout->addSpacing( 3 ); // aesthetics
layout->setAutoAdd( true );
TQVBoxLayout *tqlayout = new TQVBoxLayout( m_browserBox );
tqlayout->addSpacing( 3 ); // aesthetics
tqlayout->setAutoAdd( true );
m_browserBox->move( m_pos, 0 );
m_browserBox->hide();
@ -109,14 +109,14 @@ BrowserBar::BrowserBar( TQWidget *parent )
//m_tabBar->appendButton( Amarok::icon( "configure" ), 1, 0, TQString::null );
//m_tabBar->appendButton( Amarok::icon( "configure" ), 1, 0, TQString() );
}
BrowserBar::~BrowserBar()
{
KConfig* const config = Amarok::config( "BrowserBar" );
config->writeEntry( "CurrentPane", m_currentIndex != -1 ? TQString(currentBrowser()->name()) : TQString::null );
config->writeEntry( "CurrentPane", m_currentIndex != -1 ? TQString(currentBrowser()->name()) : TQString() );
config->writeEntry( "Width", m_browserBox->width() );
}
@ -133,7 +133,7 @@ int
BrowserBar::restoreWidth()
{
const int index = indexForName( Amarok::config( "BrowserBar" )->readEntry( "CurrentPane" ) );
const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->sizeHint().width() );
const int width = Amarok::config( "BrowserBar" )->readNumEntry( "Width", browser( index )->tqsizeHint().width() );
m_browserBox->resize( width, height() );
m_pos = m_browserBox->width() + m_tabBar->width();
@ -170,7 +170,7 @@ BrowserBar::polish()
void
BrowserBar::adjustWidgetSizes()
{
//TODO set the geometry of the PlaylistWindow before
//TODO set the tqgeometry of the PlaylistWindow before
// the browsers are loaded so this isn't called twice
const uint w = width();
@ -226,8 +226,8 @@ BrowserBar::event( TQEvent *e )
case TQEvent::Resize:
// DEBUG_LINE_INFO
m_divider->resize( 0, height() ); //Qt will set width
m_tabBar->resize( 0, height() ); //Qt will set width
m_divider->resize( 0, height() ); //TQt will set width
m_tabBar->resize( 0, height() ); //TQt will set width
adjustWidgetSizes();
@ -253,11 +253,11 @@ BrowserBar::addBrowser( const TQString &identifier, TQWidget *widget, const TQSt
m_tabBar->appendTab( SmallIcon( icon ), id, title, identifier );
tab = m_tabBar->tab( id );
tab->setFocusPolicy( TQWidget::NoFocus ); //FIXME you can focus on the tab, but they respond to no input!
tab->setFocusPolicy( TQ_NoFocus ); //FIXME you can focus on the tab, but they respond to no input!
//we use a SignalMapper to show/hide the corresponding browser when tabs are clicked
connect( tab, TQT_SIGNAL(clicked()), m_mapper, TQT_SLOT(map()) );
m_mapper->setMapping( tab, id );
m_mapper->setMapping( TQT_TQOBJECT(tab), id );
connect( tab, TQT_SIGNAL(initiateDrag ( int ) ), this, TQT_SLOT( showBrowser( int )) );
m_browsers.push_back( widget );
@ -266,12 +266,12 @@ BrowserBar::addBrowser( const TQString &identifier, TQWidget *widget, const TQSt
void
BrowserBar::removeMediaBrowser( TQWidget *widget )
{
BrowserList::iterator it = qFind( m_browsers.begin(), m_browsers.end(), widget );
BrowserList::iterator it = tqFind( m_browsers.begin(), m_browsers.end(), widget );
if( it != m_browsers.end() )
m_browsers.erase( it );
TQWidget *tab;
tab = m_tabBar->tab( m_browserIds["MediaBrowser"] );
m_mapper->removeMappings( tab );
m_mapper->removeMappings( TQT_TQOBJECT(tab) );
m_tabBar->removeTab( m_browserIds["MediaBrowser"] );
}

@ -33,9 +33,10 @@ class TQVBox;
class BrowserBar : public TQWidget, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
public:
BrowserBar( TQWidget *parent );
BrowserBar( TQWidget *tqparent );
~BrowserBar();
LIBAMAROK_EXPORT static BrowserBar* instance() { return s_instance; }
@ -84,12 +85,12 @@ private:
LIBAMAROK_EXPORT static BrowserBar *s_instance;
uint m_pos; ///the x-axis position of m_divider
TQVBox *m_playlistBox; ///parent to playlist, playlist filter and toolbar
TQVBox *m_playlistBox; ///tqparent to playlist, playlist filter and toolbar
TQWidget *m_divider; ///a qsplitter like widget
MultiTabBar *m_tabBar;
BrowserList m_browsers;
BrowserIdMap m_browserIds;
TQVBox *m_browserBox; ///parent widget to the browsers
TQVBox *m_browserBox; ///tqparent widget to the browsers
int m_currentIndex;
int m_lastIndex;
TQSignalMapper *m_mapper; ///maps tab clicks to browsers

@ -25,8 +25,8 @@
#include "tqpainter.h"
ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *parent, const char* name ) :
KLineEdit( parent, name )
ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *tqparent, const char* name ) :
KLineEdit( tqparent, name )
{
mDrawClickMsg = true;
setClickMessage( msg );
@ -40,14 +40,14 @@ ClickLineEdit::ClickLineEdit( const TQString &msg, TQWidget *parent, const char*
void ClickLineEdit::setClickMessage( const TQString &msg )
{
mClickMessage = msg;
repaint();
tqrepaint();
}
void ClickLineEdit::setText( const TQString &txt )
{
mDrawClickMsg = txt.isEmpty();
repaint();
tqrepaint();
KLineEdit::setText( txt );
}
@ -86,7 +86,7 @@ void ClickLineEdit::focusInEvent( TQFocusEvent *ev )
{
if ( mDrawClickMsg == true ) {
mDrawClickMsg = false;
repaint();
tqrepaint();
}
TQLineEdit::focusInEvent( ev );
}
@ -96,7 +96,7 @@ void ClickLineEdit::focusOutEvent( TQFocusEvent *ev )
{
if ( text().isEmpty() ) {
mDrawClickMsg = true;
repaint();
tqrepaint();
}
TQLineEdit::focusOutEvent( ev );
}

@ -33,9 +33,10 @@
class ClickLineEdit : public KLineEdit
{
Q_OBJECT
Q_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
TQ_OBJECT
TQ_PROPERTY( TQString clickMessage READ clickMessage WRITE setClickMessage )
public:
ClickLineEdit( const TQString &msg, TQWidget *parent, const char* name = 0 );
ClickLineEdit( const TQString &msg, TQWidget *tqparent, const char* name = 0 );
void setClickMessage( const TQString &msg );
TQString clickMessage() const { return mClickMessage; }

File diff suppressed because it is too large Load Diff

@ -56,9 +56,10 @@ namespace CollectionBrowserIds
};
}
class CollectionBrowser: public QVBox
class CollectionBrowser: public TQVBox
{
Q_OBJECT
TQ_OBJECT
friend class CollectionView;
public:
@ -79,7 +80,7 @@ class CollectionBrowser: public QVBox
void slotEditFilter();
private:
void layoutToolbar();
void tqlayoutToolbar();
void ipodToolbar( bool activate );
void appendSearchResults();
@ -123,7 +124,7 @@ public:
static bool shareTheSameGroup(const TQString& a, const TQString& b, int cat);
public:
DividerItem( TQListView* parent, TQString txt, int cat);
DividerItem( TQListView* tqparent, TQString txt, int cat);
virtual void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r );
@ -145,13 +146,13 @@ private:
class CollectionItem : public KListViewItem {
public:
CollectionItem( TQListView* parent, int cat = 0, bool unknown = false, bool sampler=false )
: KListViewItem( parent )
CollectionItem( TQListView* tqparent, int cat = 0, bool unknown = false, bool sampler=false )
: KListViewItem( tqparent )
, m_cat( cat )
, m_isUnknown( unknown )
, m_isSampler( sampler ) {};
CollectionItem( TQListViewItem* parent, int cat = 0, bool unknown = false, bool sampler=false )
: KListViewItem( parent )
CollectionItem( TQListViewItem* tqparent, int cat = 0, bool unknown = false, bool sampler=false )
: KListViewItem( tqparent )
, m_cat( cat )
, m_isUnknown( unknown )
, m_isSampler( sampler ) {};
@ -160,7 +161,7 @@ class CollectionItem : public KListViewItem {
virtual void sortChildItems ( int column, bool ascending ); //reimplemented
inline TQString getSQLText( int column )
inline TQString getSTQLText( int column )
{
return ( !column && m_isUnknown ) ? "" : text( column );
}
@ -191,6 +192,7 @@ class CollectionItem : public KListViewItem {
class CollectionView : public KListView, public DropProxyTarget
{
Q_OBJECT
TQ_OBJECT
friend class CollectionBrowser;
public:
@ -199,7 +201,7 @@ class CollectionView : public KListView, public DropProxyTarget
friend class CollectionItem; // for access to m_cat2
friend class ContextBrowser; // for setupDirs()
CollectionView( CollectionBrowser* parent );
CollectionView( CollectionBrowser* tqparent );
~CollectionView();
LIBAMAROK_EXPORT static CollectionView* instance() { return m_instance; }
@ -313,8 +315,8 @@ class CollectionView : public KListView, public DropProxyTarget
void cacheView();
void restoreView();
//Used to store the name of an item (and its parents), so it can be recalled later
//even if the pointer to the item has been invalidated.
//Used to store the name of an item (and its tqparents), so it can be recalled later
//even if the pointer to the item has been tqinvalidated.
TQStringList makeStructuredNameList( TQListViewItem* ) const;
TQListViewItem* findFromStructuredNameList( const TQStringList& ) const;
@ -341,7 +343,7 @@ class CollectionView : public KListView, public DropProxyTarget
//attributes:
LIBAMAROK_EXPORT static CollectionView* m_instance;
CollectionBrowser* m_parent;
CollectionBrowser* m_tqparent;
TQString m_filter;
uint m_timeFilter;
@ -379,11 +381,12 @@ class CollectionView : public KListView, public DropProxyTarget
class OrganizeCollectionDialogBase : public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
OrganizeCollectionDialogBase( TQWidget *parent=0, const char *name=0, bool modal=true,
const TQString &caption=TQString::null,
OrganizeCollectionDialogBase( TQWidget *tqparent=0, const char *name=0, bool modal=true,
const TQString &caption=TQString(),
int buttonMask=Ok|Apply|Cancel )
: KDialogBase( parent, name, modal, caption, buttonMask )
: KDialogBase( tqparent, name, modal, caption, buttonMask )
{
}

File diff suppressed because it is too large Load Diff

@ -195,6 +195,7 @@ class PostgresqlConnection : public DbConnection
class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
friend class SimilarArtistsInsertionJob;
@ -246,9 +247,9 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
#ifdef USE_MYSQL
// We have to escape "\" for mysql, but can't do so for sqlite
( m_dbConnType == DbConnection::mysql )
? string.replace("\\", "\\\\").replace( '\'', "''" ) :
? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" ) :
#endif
string.replace( '\'', "''" );
string.tqreplace( '\'', "''" );
}
TQString boolT() const { if (getDbConnectionType() == DbConnection::postgresql) return "true"; else return "1"; }
@ -256,13 +257,13 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
inline bool boolFromSql( const TQString &b ) { return ( b == boolT() || b == "t" ); }
//textColumnType should be used for normal strings, which need to be compared
//either case-sensitively or -insensitively
TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").arg(length); }
TQString textColumnType( int length=255 ) const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").tqarg(length); }
//exactTextColumnType should be used for strings that must be stored exactly, such
//as URLs (necessary for holding control chars etc. if present in URL), except for
//trailing spaces. Comparisions should always be done case-sensitively.
//As we create indices on these columns, we have to restrict them to
//<= 255 chars for mysql < 5.0.3
TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).arg( length>255 ? 255 : length ); else return textColumnType( length ); }
TQString exactTextColumnType( int length=1024 ) const { if ( getDbConnectionType() == DbConnection::mysql ) return TQString( "VARBINARY(%1)" ).tqarg( length>255 ? 255 : length ); else return textColumnType( length ); }
// We might consider using LONGTEXT type, as some lyrics could be VERY long..???
TQString longTextColumnType() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; }
TQString randomFunc() const { if ( getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; }
@ -328,10 +329,10 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void aftCheckPermanentTables( const TQString &currdeviceid, const TQString &currid, const TQString &currurl );
void doAFTStuff( MetaBundle *bundle, const bool tempTables = true );
void emitFileAdded( const TQString &absPath,
const TQString &uniqueid = TQString::null );
const TQString &uniqueid = TQString() );
void emitFilesAdded( const TQMap<TQString,TQString> &map ) { emit filesAdded( map ); }
void emitFileDeleted( const TQString &absPath,
const TQString &uniqueid = TQString::null );
const TQString &uniqueid = TQString() );
bool newUniqueIdForFile( const TQString &path );
bool removeUniqueIdFromFile( const TQString &path );
TQString urlFromUniqueId( const TQString &id );
@ -340,20 +341,20 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
//podcast methods
/// Insert a podcast channel into the database. If @param replace is true, replace the row
/// use updatePodcastChannel() always in preference
bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &replace=false );
bool addPodcastChannel( const PodcastChannelBundle &pcb, const bool &tqreplace=false );
/// Insert a podcast episode into the database. If @param idToUpdate is provided, replace the row
/// use updatePodcastEpisode() always in preference
int addPodcastEpisode( const PodcastEpisodeBundle &episode, const int idToUpdate=0 );
int addPodcastFolder( const TQString &name, const int parent_id=0, const bool isOpen=false );
int addPodcastFolder( const TQString &name, const int tqparent_id=0, const bool isOpen=false );
TQValueList<PodcastChannelBundle> getPodcastChannels();
PodcastEpisodeBundle getPodcastEpisodeById( int id );
TQValueList<PodcastEpisodeBundle> getPodcastEpisodes( const KURL &parent, bool newOnly=false, int limit=-1 );
TQValueList<PodcastEpisodeBundle> getPodcastEpisodes( const KURL &tqparent, bool newOnly=false, int limit=-1 );
void removePodcastChannel( const KURL &url ); // will remove all episodes too
void removePodcastEpisode( const int id );
void removePodcastFolder( const int id );
void updatePodcastChannel( const PodcastChannelBundle &b );
void updatePodcastEpisode( const int id, const PodcastEpisodeBundle &b );
void updatePodcastFolder( const int folder_id, const TQString &name, const int parent_id=0, const bool isOpen=false );
void updatePodcastFolder( const int folder_id, const TQString &name, const int tqparent_id=0, const bool isOpen=false );
// these return false when no bundle was available
bool getPodcastChannelBundle( const KURL &url, PodcastChannelBundle *channel );
bool getPodcastEpisodeBundle( const KURL &url, PodcastEpisodeBundle *channel );
@ -434,7 +435,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
/** Saves images located on the user's filesystem */
bool setAlbumImage( const TQString& artist, const TQString& album, const KURL& url );
/** Saves images obtained from CoverFetcher */
bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString::null, const TQString& asin = TQString::null );
bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString(), const TQString& asin = TQString() );
TQString findAmazonImage( const TQString &artist, const TQString &album, const uint width = 1 );
TQString findDirectoryImage( const TQString& artist, const TQString& album, uint width = 0 );
@ -442,8 +443,8 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
TQString findMetaBundleImage( const MetaBundle &trackInformation, const uint = 1 );
/// ensure the sql only return urls to tracks for efficiency
static TQPixmap createDragPixmapFromSQL( const TQString &sql, TQString textOverRide=TQString::null );
static TQPixmap createDragPixmap( const KURL::List &urls, TQString textOverRide=TQString::null );
static TQPixmap createDragPixmapFromSQL( const TQString &sql, TQString textOverRide=TQString() );
static TQPixmap createDragPixmap( const KURL::List &urls, TQString textOverRide=TQString() );
static const int DRAGPIXMAP_OFFSET_X = -12;
static const int DRAGPIXMAP_OFFSET_Y = -28;
@ -472,7 +473,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
static TQString makeShadowedImage( const TQString& albumImage, bool cache = true );
//local cover methods
void addImageToAlbum( const TQString& image, TQValueList< QPair<TQString, TQString> > info, const bool temporary );
void addImageToAlbum( const TQString& image, TQValueList< TQPair<TQString, TQString> > info, const bool temporary );
TQString notAvailCover( const bool withShadow = false, int width = 1 );
//embedded cover methods
@ -481,7 +482,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void applySettings();
void setLyrics( const TQString& url, const TQString& lyrics, const TQString &uniqueid = TQString::null );
void setLyrics( const TQString& url, const TQString& lyrics, const TQString &uniqueid = TQString() );
TQString getLyrics( const TQString& url );
/** Remove from the amazon table the item with the specified md5sum **/
@ -493,7 +494,7 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
bool isConnected();
void releasePreviousConnection(TQThread *currThread);
void invalidateArtistAlbumCache() { m_validArtistCache=false; m_validComposerCache=false; m_validAlbumCache=false; };
void tqinvalidateArtistAlbumCache() { m_validArtistCache=false; m_validComposerCache=false; m_validAlbumCache=false; };
void vacuum();
@ -503,13 +504,13 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
void cancelMovingFileJob();
protected:
TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString::null );
TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString() );
void engineTrackEnded( int finalPosition, int trackLength, const TQString &reason );
/** Manages regular folder monitoring scan */
void timerEvent( TQTimerEvent* e );
public slots:
void fetchCover( TQWidget* parent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item = 0 );
void fetchCover( TQWidget* tqparent, const TQString& artist, const TQString& album, bool noedit, TQListViewItem* item = 0 );
void scanMonitor();
void startScan();
void stopScan();
@ -645,12 +646,19 @@ class LIBAMAROK_EXPORT CollectionDB : public TQObject, public EngineObserver
TQMutex m_mutex;
};
#ifdef Q_MOC_RUN
// MOC_SKIP_BEGIN
class INotify : public JobBase
// MOC_SKIP_END
#else // Q_MOC_RUN
class INotify : public ThreadManager::DependentJob
#endif // Q_MOC_RUN
{
Q_OBJECT
TQ_OBJECT
public:
INotify( CollectionDB *parent, int fd );
INotify( CollectionDB *tqparent, int fd );
~INotify();
static INotify *instance() { return s_instance; }
@ -661,7 +669,7 @@ class INotify : public ThreadManager::DependentJob
private:
virtual bool doJob();
CollectionDB* m_parent;
CollectionDB* m_tqparent;
int m_fd;
static INotify* s_instance;
@ -681,53 +689,53 @@ class QueryBuilder
optRandomize = 8,
optShowAll = 16 /* get all songs, not just mounted ones */ };
/* This has been an enum in the past, but 32 bits wasn't enough anymore :-( */
static const Q_INT64 valDummy = 0;
static const Q_INT64 valID = 1LL << 0;
static const Q_INT64 valName = 1LL << 1;
static const Q_INT64 valURL = 1LL << 2;
static const Q_INT64 valTitle = 1LL << 3;
static const Q_INT64 valTrack = 1LL << 4;
static const Q_INT64 valScore = 1LL << 5;
static const Q_INT64 valComment = 1LL << 6;
static const Q_INT64 valBitrate = 1LL << 7;
static const Q_INT64 valLength = 1LL << 8;
static const Q_INT64 valSamplerate = 1LL << 9;
static const Q_INT64 valPlayCounter = 1LL << 10;
static const Q_INT64 valCreateDate = 1LL << 11;
static const Q_INT64 valAccessDate = 1LL << 12;
//static const Q_INT64 valPercentage = 1LL << 13; // same as valScore
static const Q_INT64 valArtistID = 1LL << 14;
static const Q_INT64 valAlbumID = 1LL << 15;
static const Q_INT64 valYearID = 1LL << 16;
static const Q_INT64 valGenreID = 1LL << 17;
static const Q_INT64 valDirectory = 1LL << 18;
static const Q_INT64 valLyrics = 1LL << 19;
static const Q_INT64 valRating = 1LL << 20;
static const Q_INT64 valComposerID = 1LL << 21;
static const Q_INT64 valDiscNumber = 1LL << 22;
static const Q_INT64 valFilesize = 1LL << 23;
static const Q_INT64 valFileType = 1LL << 24;
static const Q_INT64 valIsCompilation = 1LL << 25;
static const Q_INT64 valBPM = 1LL << 26;
static const TQ_INT64 valDummy = 0;
static const TQ_INT64 valID = 1LL << 0;
static const TQ_INT64 valName = 1LL << 1;
static const TQ_INT64 valURL = 1LL << 2;
static const TQ_INT64 valTitle = 1LL << 3;
static const TQ_INT64 valTrack = 1LL << 4;
static const TQ_INT64 valScore = 1LL << 5;
static const TQ_INT64 valComment = 1LL << 6;
static const TQ_INT64 valBitrate = 1LL << 7;
static const TQ_INT64 valLength = 1LL << 8;
static const TQ_INT64 valSamplerate = 1LL << 9;
static const TQ_INT64 valPlayCounter = 1LL << 10;
static const TQ_INT64 valCreateDate = 1LL << 11;
static const TQ_INT64 valAccessDate = 1LL << 12;
//static const TQ_INT64 valPercentage = 1LL << 13; // same as valScore
static const TQ_INT64 valArtistID = 1LL << 14;
static const TQ_INT64 valAlbumID = 1LL << 15;
static const TQ_INT64 valYearID = 1LL << 16;
static const TQ_INT64 valGenreID = 1LL << 17;
static const TQ_INT64 valDirectory = 1LL << 18;
static const TQ_INT64 valLyrics = 1LL << 19;
static const TQ_INT64 valRating = 1LL << 20;
static const TQ_INT64 valComposerID = 1LL << 21;
static const TQ_INT64 valDiscNumber = 1LL << 22;
static const TQ_INT64 valFilesize = 1LL << 23;
static const TQ_INT64 valFileType = 1LL << 24;
static const TQ_INT64 valIsCompilation = 1LL << 25;
static const TQ_INT64 valBPM = 1LL << 26;
// podcast relevant:
static const Q_INT64 valCopyright = 1LL << 27;
static const Q_INT64 valParent = 1LL << 28;
static const Q_INT64 valWeblink = 1LL << 29;
static const Q_INT64 valAutoscan = 1LL << 30;
static const Q_INT64 valFetchtype = 1LL << 31;
static const Q_INT64 valAutotransfer = 1LL << 32;
static const Q_INT64 valPurge = 1LL << 33;
static const Q_INT64 valPurgeCount = 1LL << 34;
static const Q_INT64 valIsNew = 1LL << 35;
static const TQ_INT64 valCopyright = 1LL << 27;
static const TQ_INT64 valParent = 1LL << 28;
static const TQ_INT64 valWeblink = 1LL << 29;
static const TQ_INT64 valAutoscan = 1LL << 30;
static const TQ_INT64 valFetchtype = 1LL << 31;
static const TQ_INT64 valAutotransfer = 1LL << 32;
static const TQ_INT64 valPurge = 1LL << 33;
static const TQ_INT64 valPurgeCount = 1LL << 34;
static const TQ_INT64 valIsNew = 1LL << 35;
// dynamic collection relevant:
static const Q_INT64 valDeviceId = 1LL << 36;
static const Q_INT64 valRelativePath = 1LL << 37;
static const Q_INT64 valDeviceLabel = 1LL << 38;
static const Q_INT64 valMountPoint = 1LL << 39;
static const TQ_INT64 valDeviceId = 1LL << 36;
static const TQ_INT64 valRelativePath = 1LL << 37;
static const TQ_INT64 valDeviceLabel = 1LL << 38;
static const TQ_INT64 valMountPoint = 1LL << 39;
//label relevant
static const Q_INT64 valType = 1LL << 40;
static const TQ_INT64 valType = 1LL << 40;
static Q_INT64 valForFavoriteSorting();
static TQ_INT64 valForFavoriteSorting();
void sortByFavorite();
// sortByFavoriteAvg() add the average rating, if enabled, the average score, if enabled,
@ -742,8 +750,8 @@ class QueryBuilder
QueryBuilder();
void addReturnValue( int table, Q_INT64 value, bool caseSensitive = false /* unless value refers to a string */ );
void addReturnFunctionValue( int function, int table, Q_INT64 value);
void addReturnValue( int table, TQ_INT64 value, bool caseSensitive = false /* unless value refers to a string */ );
void addReturnFunctionValue( int function, int table, TQ_INT64 value);
uint countReturnValues();
// Note: the filter chain begins in AND mode
@ -757,30 +765,30 @@ class QueryBuilder
void addURLFilters( const TQStringList& filter );
void addFilter( int tables, const TQString& filter);
void addFilter( int tables, Q_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void addFilter( int tables, TQ_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void addFilters( int tables, const TQStringList& filter );
void excludeFilter( int tables, const TQString& filter );
void excludeFilter( int tables, Q_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void excludeFilter( int tables, TQ_INT64 value, const TQString& filter, int mode = modeNormal, bool exact = false );
void addMatch( int tables, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
void addMatch( int tables, Q_INT64 value, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
void addMatch( int tables, TQ_INT64 value, const TQString& match, bool interpretUnknown = true, bool caseSensitive = true );
void addMatches( int tables, const TQStringList& match, bool interpretUnknown = true, bool caseSensitive = true );
void excludeMatch( int tables, const TQString& match );
void having( int table, Q_INT64 value, int function, int mode, const TQString& match );
void having( int table, TQ_INT64 value, int function, int mode, const TQString& match );
void exclusiveFilter( int tableMatching, int tableNotMatching, Q_INT64 value );
void exclusiveFilter( int tableMatching, int tableNotMatching, TQ_INT64 value );
// For numeric filters:
// modeNormal means strict equality; modeBeginMatch and modeEndMatch are not
// allowed; modeBetween needs a second value endRange
void addNumericFilter(int tables, Q_INT64 value, const TQString &n,
void addNumericFilter(int tables, TQ_INT64 value, const TQString &n,
int mode = modeNormal,
const TQString &endRange = TQString::null);
const TQString &endRange = TQString());
void setOptions( int options );
void sortBy( int table, Q_INT64 value, bool descending = false );
void sortByFunction( int function, int table, Q_INT64 value, bool descending = false );
void groupBy( int table, Q_INT64 value );
void sortBy( int table, TQ_INT64 value, bool descending = false );
void sortByFunction( int function, int table, TQ_INT64 value, bool descending = false );
void groupBy( int table, TQ_INT64 value );
void setLimit( int startPos, int length );
// Returns the results in random order.
@ -788,16 +796,16 @@ class QueryBuilder
// that field.
// The shuffle is cumulative with other sorts, but any sorts after this are
// pointless because of the precision of the random function.
void shuffle( int table = 0, Q_INT64 value = 0 );
void shuffle( int table = 0, TQ_INT64 value = 0 );
static const int dragFieldCount;
static TQString dragSQLFields();
void initSQLDrag();
static TQString dragSTQLFields();
void initSTQLDrag();
void buildQuery( bool withDeviceidPlaceholder = false );
TQString getQuery();
//use withDeviceidPlaceholder = false if the query isn't run immediately (*CurrentTimeT*)
//and replace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
//and tqreplace (*MountedDeviceSelection*) with CollectionDB::instance()->deviceIdSelection()
TQString query( bool withDeviceidPlaceholder = false ) { buildQuery( withDeviceidPlaceholder ); return m_query; };
void clear();
@ -805,16 +813,16 @@ class QueryBuilder
// Transform a string table.value "field" into enum values
// @return true if we succeeded
bool getField(const TQString &tableValue, int *table, Q_INT64 *value);
bool getField(const TQString &tableValue, int *table, TQ_INT64 *value);
private:
TQString tableName( int table );
const TQString &valueName( Q_INT64 value );
const TQString &valueName( TQ_INT64 value );
TQString functionName( int functions );
bool coalesceField( int table, Q_INT64 value );
bool coalesceField( int table, TQ_INT64 value );
int getTableByName(const TQString &name);
Q_INT64 getValueByName(const TQString &field);
TQ_INT64 getValueByName(const TQString &field);
TQStringList cleanURL( TQStringList result );

@ -56,7 +56,7 @@ CollectionScanner::CollectionScanner( const TQStringList& folders,
, m_recursively( recursive )
, m_incremental( incremental )
, m_restart( restart )
, m_logfile( Amarok::saveLocation( TQString::null ) + "collection_scan.log" )
, m_logfile( Amarok::saveLocation( TQString() ) + "collection_scan.log" )
, m_pause( false )
{
DcopCollectionScannerHandler* dcsh = new DcopCollectionScannerHandler();
@ -108,31 +108,31 @@ CollectionScanner::doJob() //SLOT
<< endl;
else {
TQTextStream logStream;
logStream.setDevice(&logFile);
logStream.setDevice(TQT_TQIODEVICE(&logFile));
logStream.setEncoding(TQTextStream::UnicodeUTF8);
lastFile = logStream.read();
logFile.close();
}
TQFile folderFile( Amarok::saveLocation( TQString::null ) + "collection_scan.files" );
TQFile folderFile( Amarok::saveLocation( TQString() ) + "collection_scan.files" );
if ( !folderFile.open( IO_ReadOnly ) )
warning() << "Failed to open folder file " << folderFile.name()
<< " read-only" << endl;
else {
TQTextStream folderStream;
folderStream.setDevice(&folderFile);
folderStream.setDevice(TQT_TQIODEVICE(&folderFile));
folderStream.setEncoding(TQTextStream::UnicodeUTF8);
entries = TQStringList::split( "\n", folderStream.read() );
}
for( int count = entries.findIndex( lastFile ) + 1; count; --count )
for( int count = entries.tqfindIndex( lastFile ) + 1; count; --count )
entries.pop_front();
}
else {
foreachType( TQStringList, m_folders ) {
if( (*it).isEmpty() )
//apparently somewhere empty strings get into the mix
//aptqparently somewhere empty strings get into the mix
//which results in a full-system scan! Which we can't allow
continue;
@ -143,7 +143,7 @@ CollectionScanner::doJob() //SLOT
readDir( dir, entries );
}
TQFile folderFile( Amarok::saveLocation( TQString::null ) + "collection_scan.files" );
TQFile folderFile( Amarok::saveLocation( TQString() ) + "collection_scan.files" );
if ( !folderFile.open( IO_WriteOnly ) )
warning() << "Failed to open folder file " << folderFile.name()
<< " read-only" << endl;
@ -213,7 +213,7 @@ CollectionScanner::readDir( const TQString& dir, TQStringList& entries )
f = i; break;
}
#else
f = m_processedDirs.find( de );
f = m_processedDirs.tqfind( de );
#endif
if ( ! S_ISDIR( statBuf.st_mode ) || f != -1 ) {
@ -280,7 +280,7 @@ CollectionScanner::scanFiles( const TQStringList& entries )
{
DEBUG_BLOCK
typedef QPair<TQString, TQString> CoverBundle;
typedef TQPair<TQString, TQString> CoverBundle;
TQStringList validImages; validImages << "jpg" << "png" << "gif" << "jpeg";
TQStringList validPlaylists; validPlaylists << "m3u" << "pls";
@ -309,10 +309,10 @@ CollectionScanner::scanFiles( const TQStringList& entries )
}
}
if( validImages.contains( ext ) )
if( validImages.tqcontains( ext ) )
images += path;
else if( m_importPlaylists && validPlaylists.contains( ext ) ) {
else if( m_importPlaylists && validPlaylists.tqcontains( ext ) ) {
AttributeMap attributes;
attributes["path"] = path;
writeElement( "playlist", attributes );
@ -328,7 +328,7 @@ CollectionScanner::scanFiles( const TQStringList& entries )
CoverBundle cover( attributes["artist"], attributes["album"] );
if( !covers.contains( cover ) )
if( !covers.tqcontains( cover ) )
covers += cover;
foreachType( MetaBundle::EmbeddedImageList, images ) {
@ -447,7 +447,7 @@ CollectionScanner::writeElement( const TQString& name, const AttributeMap& attri
foreachType( AttributeMap, attributes )
{
// There are at least some characters that Qt cannot categorize which make the resulting
// There are at least some characters that TQt cannot categorize which make the resulting
// xml document ill-formed and prevent the parser from processing the remaining document.
// Because of this we skip attributes containing characters not belonging to any category.
TQString data = it.data();
@ -472,7 +472,7 @@ CollectionScanner::writeElement( const TQString& name, const AttributeMap& attri
TQTextStream stream( &text, IO_WriteOnly );
element.save( stream, 0 );
std::cout << text.utf8() << std::endl;
std::cout << text.utf8().data() << std::endl;
}

@ -42,6 +42,7 @@ typedef TQMap<TQString, TQString> AttributeMap;
class CollectionScanner : public KApplication
{
Q_OBJECT
TQ_OBJECT
public:
CollectionScanner( const TQStringList& folders,
@ -84,7 +85,7 @@ private:
*/
inline TQString extension( const TQString &fileName )
{
return fileName.contains( '.' ) ? fileName.mid( fileName.findRev( '.' ) + 1 ).lower() : "";
return fileName.tqcontains( '.' ) ? fileName.mid( fileName.tqfindRev( '.' ) + 1 ).lower() : "";
}
/**

@ -27,6 +27,7 @@
class DcopCollectionScannerHandler : public TQObject, virtual public CollectionScannerInterface
{
Q_OBJECT
TQ_OBJECT
public:
DcopCollectionScannerHandler();

@ -27,7 +27,7 @@
namespace Amarok {
class Color : public QColor
class Color : public TQColor
{
static const int CONTRAST = 130;
static const int SATURATION_TARGET = 30;

@ -31,7 +31,7 @@
#include "columnlist.h"
class MyCheckListItem: public QCheckListItem
class MyCheckListItem: public TQCheckListItem
{
typedef TQCheckListItem super;
ColumnList *m_list;
@ -56,18 +56,18 @@ public:
MyCheckListItem *itemBelow() { return static_cast<MyCheckListItem*>( TQCheckListItem::itemBelow() ); }
};
ColumnList::ColumnList( TQWidget *parent, const char *name )
: TQHBox( parent, name ), m_changed( true )
ColumnList::ColumnList( TQWidget *tqparent, const char *name )
: TQHBox( tqparent, name ), m_changed( true )
{
setSpacing( 5 );
TQVBox *buttonbox = new TQVBox( this );
m_up = new KPushButton( KGuiItem( TQString::null, "up" ), buttonbox );
m_up = new KPushButton( KGuiItem( TQString(), "up" ), buttonbox );
TQToolTip::add( m_up, i18n( "Move column up" ) );
connect( m_up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveUp() ) );
m_down = new KPushButton( KGuiItem( TQString::null, "down" ), buttonbox );
m_down = new KPushButton( KGuiItem( TQString(), "down" ), buttonbox );
TQToolTip::add( m_down, i18n( "Move column down" ) );
connect( m_down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( moveDown() ) );

@ -27,11 +27,12 @@ class KListView;
class KPushButton;
template<class T> class TQValueList;
class ColumnList: public QHBox
class ColumnList: public TQHBox
{
Q_OBJECT
TQ_OBJECT
public:
ColumnList( TQWidget *parent = 0, const char *name = 0 );
ColumnList( TQWidget *tqparent = 0, const char *name = 0 );
TQValueList<int> visibleColumns() const;
TQValueList<int> columnOrder() const;
bool isChanged() const;
@ -56,6 +57,7 @@ private:
class ColumnsDialog: public KDialogBase
{
Q_OBJECT
TQ_OBJECT
public:
static void display();

@ -79,8 +79,8 @@ int AmarokConfigDialog::s_currentPage = 0;
// PUBLIC
//////////////////////////////////////////////////////////////////////////////////////////
AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config )
: KConfigDialog( parent, name, config )
AmarokConfigDialog::AmarokConfigDialog( TQWidget *tqparent, const char* name, KConfigSkeleton *config )
: KConfigDialog( tqparent, name, config )
, m_engineConfig( 0 )
, m_opt4( 0 )
{
@ -88,7 +88,7 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
// IMPORTANT Don't simply change the page names, they are used as identifiers in other parts of the app.
m_opt1 = new Options1( 0, "General" );
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
m_opt1->kcfg_ShowSplashscreen->setEnabled(false);
m_opt1->kcfg_ShowTrayIcon->setEnabled(false);
m_opt1->kcfg_AnimateTrayIcon->setEnabled(false);
@ -96,7 +96,7 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
#endif
m_opt2 = new Options2( 0, "Appearance" );
m_opt4 = new Options4( 0, "Playback" );
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
Options5 *opt5 = new Options5( 0, "OSD" );
#endif
TQVBox *opt6 = new TQVBox;
@ -153,29 +153,29 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
TQVBox *topbox = new TQVBox( opt9 );
topbox->setSpacing( KDialog::spacingHint() );
TQGroupBox *mediaBox = new TQGroupBox( 2, Qt::Horizontal, i18n("Media Devices"), topbox );
mediaBox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
mediaBox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
TQVBox *vbox = new TQVBox( mediaBox );
vbox->setSpacing( KDialog::spacingHint() );
m_deviceManager = new MediumPluginManager( vbox );
TQHBox *hbox = new TQHBox( topbox );
hbox->setSpacing( KDialog::spacingHint() );
hbox->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
hbox->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
KPushButton *autodetect = new KPushButton( i18n( "Autodetect Devices" ), hbox );
autodetect->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
autodetect->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( autodetect, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(redetectDevices()) );
KPushButton *add = new KPushButton( i18n( "Add Device..." ), hbox );
add->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
add->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ) );
connect( add, TQT_SIGNAL(clicked()), m_deviceManager, TQT_SLOT(newDevice()) );
TQFrame *frame = new TQFrame( topbox );
frame->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
frame->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
// add pages
addPage( m_opt1, i18n( "General" ), Amarok::icon( "settings_general" ), i18n( "Configure General Options" ) );
addPage( m_opt2, i18n( "Appearance" ), Amarok::icon( "settings_view" ), i18n( "Configure Amarok's Appearance" ) );
addPage( m_opt4, i18n( "Playback" ), Amarok::icon( "settings_playback" ), i18n( "Configure Playback" ) );
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
addPage( opt5, i18n( "OSD" ), Amarok::icon( "settings_indicator" ), i18n( "Configure On-Screen-Display" ) );
#endif
addPage( opt6, i18n( "Engine" ), Amarok::icon( "settings_engine" ), i18n( "Configure Engine" ) );
@ -187,19 +187,19 @@ AmarokConfigDialog::AmarokConfigDialog( TQWidget *parent, const char* name, KCon
TQObjectList *list = queryList( TQLABEL_OBJECT_NAME_STRING, "infoPixmap" );
TQPixmap const info = KGlobal::iconLoader()->iconPath( "messagebox_info", -KIcon::SizeHuge );
for( TQObject *label = list->first(); label; label = list->next() )
static_cast<TQLabel*>(label)->setPixmap( info );
static_cast<TQLabel*>(TQT_TQWIDGET(label))->setPixmap( info );
delete list;
//stop KFont Requesters getting stupidly large
list = queryList( TQLABEL_OBJECT_NAME_STRING, "m_sampleLabel" );
for( TQObject *label = list->first(); label; label = list->next() )
static_cast<TQLabel*>(label)->setMaximumWidth( 250 );
static_cast<TQLabel*>(TQT_TQWIDGET(label))->setMaximumWidth( 250 );
delete list;
connect( m_deviceManager, TQT_SIGNAL(changed()), TQT_SLOT(updateButtons()) );
connect( m_soundSystem, TQT_SIGNAL(activated( int )), TQT_SLOT(updateButtons()) );
connect( aboutEngineButton, TQT_SIGNAL(clicked()), TQT_SLOT(aboutEngine()) );
#ifdef Q_WS_X11
#ifdef TQ_WS_X11
connect( opt5, TQT_SIGNAL(settingsChanged()), TQT_SLOT(updateButtons()) ); //see options5.ui.h
#endif
connect( m_opt2->styleComboBox, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateButtons() ) );
@ -262,14 +262,14 @@ void AmarokConfigDialog::updateButtons()
*/
void AmarokConfigDialog::updateSettings()
{
#ifdef Q_WS_X11
OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( child( "osdpreview" ) );
AmarokConfig::setOsdAlignment( osd->alignment() );
#ifdef TQ_WS_X11
OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( TQT_TQWIDGET(child( "osdpreview" )) );
AmarokConfig::setOsdAlignment( osd->tqalignment() );
AmarokConfig::setOsdYOffset( osd->y() );
Amarok::OSD::instance()->applySettings();
#endif
static_cast<CollectionSetup*>(child("CollectionSetup"))->writeConfig();
static_cast<CollectionSetup*>(TQT_TQWIDGET(child("CollectionSetup")))->writeConfig();
if ( m_engineConfig ) m_engineConfig->save();
@ -351,14 +351,14 @@ void AmarokConfigDialog::updateWidgetsDefault()
*/
bool AmarokConfigDialog::hasChanged()
{
#ifdef Q_WS_X11
OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( child( "osdpreview" ) );
#ifdef TQ_WS_X11
OSDPreviewWidget *osd = static_cast<OSDPreviewWidget*>( TQT_TQWIDGET(child( "osdpreview" )) );
#endif
return m_soundSystem->currentText() != m_pluginAmarokName[AmarokConfig::soundSystem()] ||
#ifdef Q_WS_X11
osd->alignment() != AmarokConfig::osdAlignment() ||
osd->alignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
#ifdef TQ_WS_X11
osd->tqalignment() != AmarokConfig::osdAlignment() ||
osd->tqalignment() != OSDWidget::Center && osd->y() != AmarokConfig::osdYOffset() ||
#endif
m_opt2->styleComboBox->currentText() != AmarokConfig::contextBrowserStyleSheet() ||
Amarok::databaseTypeCode( m_opt7->dbSetupFrame->databaseEngine->currentText() ) != AmarokConfig::databaseEngine().toInt() ||
@ -385,7 +385,7 @@ bool AmarokConfigDialog::isDefault()
void AmarokConfigDialog::aboutEngine() //SLOT
{
PluginManager::showAbout( TQString( "Name == '%1'" ).arg( m_soundSystem->currentText() ) );
PluginManager::showAbout( TQString( "Name == '%1'" ).tqarg( m_soundSystem->currentText() ) );
}
@ -407,7 +407,7 @@ void AmarokConfigDialog::soundSystemChanged()
m_engineConfig = EngineController::engine()->configure();
m_engineConfig->view()->reparent( m_engineConfigFrame, TQPoint() );
m_engineConfig->view()->show();
m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).arg( m_soundSystem->currentText() ) );
m_engineConfigFrame->setTitle( i18n( "to change settings", "Configure %1" ).tqarg( m_soundSystem->currentText() ) );
m_engineConfigFrame->show();
connect( m_engineConfig, TQT_SIGNAL(viewChanged()), TQT_SLOT(updateButtons()) );
@ -434,7 +434,7 @@ void AmarokConfigDialog::soundSystemChanged()
TQString AmarokConfigDialog::externalBrowser() const
{
return m_opt1->kComboBox_browser->isEnabled() ?
#ifdef Q_WS_MAC
#ifdef TQ_WS_MAC
m_opt1->kComboBox_browser->currentText() == i18n( "Default Browser" ) ?
"open" :
#else

@ -34,13 +34,14 @@ class MediumPluginManager;
class AmarokConfigDialog : public KConfigDialog
{
Q_OBJECT
TQ_OBJECT
public:
AmarokConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config );
AmarokConfigDialog( TQWidget *tqparent, const char* name, KConfigSkeleton *config );
~AmarokConfigDialog();
void addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName,
const TQString &header=TQString::null, bool manage=true);
const TQString &header=TQString(), bool manage=true);
void showPageByName( const TQCString& page );

File diff suppressed because it is too large Load Diff

@ -39,6 +39,7 @@ namespace KIO { class Job; class TransferJob; }
class ContextBrowser : public KTabWidget, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
friend class CurrentTrackJob;
friend class Amarok::DcopContextBrowserHandler;
@ -80,8 +81,8 @@ class ContextBrowser : public KTabWidget, public EngineObserver
void slotContextMenu( const TQString& urlString, const TQPoint& point );
void showContext( const KURL& url, bool fromHistory = false );
void showCurrentTrack();
void showLyrics( const TQString& url = TQString::null );
void showWikipedia( const TQString& url = TQString::null, bool fromHistory = false, bool replaceHistory = false );
void showLyrics( const TQString& url = TQString() );
void showWikipedia( const TQString& url = TQString(), bool fromHistory = false, bool replaceHistory = false );
void showWikipediaEntry( const TQString& entry, bool replaceHistory = false );
void reloadWikipedia();
void showLabelsDialog();

@ -35,7 +35,7 @@
void
Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artist, const TQString &album, bool showCoverManager )
Amarok::coverContextMenu( TQWidget *tqparent, TQPoint point, const TQString &artist, const TQString &album, bool showCoverManager )
{
KPopupMenu menu;
enum { SHOW, FETCH, CUSTOM, DELETE, MANAGER };
@ -43,7 +43,7 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
menu.insertTitle( i18n( "Cover Image" ) );
menu.insertItem( SmallIconSet( Amarok::icon( "zoom" ) ), i18n( "&Show Fullsize" ), SHOW );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).arg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).tqarg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Set &Custom Cover" ), CUSTOM );
bool disable = !album.isEmpty(); // disable setting covers for unknown albums
menu.setItemEnabled( FETCH, disable );
@ -58,21 +58,21 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
#ifndef AMAZON_SUPPORT
menu.setItemEnabled( FETCH, false );
#endif
disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).contains( "nocover" );
disable = !CollectionDB::instance()->albumImage( artist, album, 0 ).tqcontains( "nocover" );
menu.setItemEnabled( SHOW, disable );
menu.setItemEnabled( DELETE, disable );
switch( menu.exec( point ) )
{
case SHOW:
CoverManager::viewCover( artist, album, parent );
CoverManager::viewCover( artist, album, tqparent );
break;
case DELETE:
{
const int button = KMessageBox::warningContinueCancel( parent,
const int button = KMessageBox::warningContinueCancel( tqparent,
i18n( "Are you sure you want to remove this cover from the Collection?" ),
TQString::null,
TQString(),
KStdGuiItem::del() );
if ( button == KMessageBox::Continue )
@ -82,7 +82,7 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
case FETCH:
#ifdef AMAZON_SUPPORT
CollectionDB::instance()->fetchCover( parent, artist, album, false );
CollectionDB::instance()->fetchCover( tqparent, artist, album, false );
break;
#endif
@ -99,7 +99,7 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
startPath = url.directory();
}
KURL file = KFileDialog::getImageOpenURL( startPath, parent, i18n("Select Cover Image File") );
KURL file = KFileDialog::getImageOpenURL( startPath, tqparent, i18n("Select Cover Image File") );
if ( !file.isEmpty() )
CollectionDB::instance()->setAlbumImage( artist, album, file );
break;
@ -113,21 +113,21 @@ Amarok::coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artis
CoverLabel::CoverLabel ( TQWidget * parent, const char * name, WFlags f )
: TQLabel( parent, name, f)
CoverLabel::CoverLabel ( TQWidget * tqparent, const char * name, WFlags f )
: TQLabel( tqparent, name, f)
{}
void CoverLabel::mouseReleaseEvent(TQMouseEvent *pEvent) {
if (pEvent->button() == LeftButton || pEvent->button() == RightButton)
if (pEvent->button() == Qt::LeftButton || pEvent->button() == Qt::RightButton)
{
Amarok::coverContextMenu( this, pEvent->globalPos(), m_artist, m_album, false );
}
}
CoverFetcher::CoverFetcher( TQWidget *parent, const TQString &artist, TQString album )
: TQObject( parent, "CoverFetcher" )
CoverFetcher::CoverFetcher( TQWidget *tqparent, const TQString &artist, TQString album )
: TQObject( tqparent, "CoverFetcher" )
, m_artist( artist )
, m_album( album )
, m_size( 2 )
@ -143,7 +143,7 @@ CoverFetcher::CoverFetcher( TQWidget *parent, const TQString &artist, TQString a
//the others have the above strings removed with the following regex, as this can increase hit-rate
const TQString template1 = " ?-? ?[(^{]* ?%1 ?\\d*[)^}\\]]* *$"; //eg album - [disk 1] -> album
foreach( extensions ) {
TQRegExp regexp( template1.arg( *it ) );
TQRegExp regexp( template1.tqarg( *it ) );
regexp.setCaseSensitive( false );
album.remove( regexp );
}
@ -201,7 +201,7 @@ CoverFetcher::startFetch()
m_coverAsins.clear();
m_coverUrls.clear();
m_coverNames.clear();
m_xml = TQString::null;
m_xml = TQString();
m_size = 2;
if ( m_queries.isEmpty() ) {
@ -459,8 +459,8 @@ CoverFetcher::attemptAnotherFetch()
class EditSearchDialog : public KDialog
{
public:
EditSearchDialog( TQWidget* parent, const TQString &text, const TQString &keyword, CoverFetcher *fetcher )
: KDialog( parent )
EditSearchDialog( TQWidget* tqparent, const TQString &text, const TQString &keyword, CoverFetcher *fetcher )
: KDialog( tqparent )
{
setCaption( i18n( "Amazon Query Editor" ) );
@ -508,10 +508,10 @@ CoverFetcher::attemptAnotherFetch()
connect( cancelButton, TQT_SIGNAL(clicked()), TQT_SLOT(reject()) );
}
TQString query() { return static_cast<KLineEdit*>(child( "Query" ))->text(); }
TQString query() { return static_cast<KLineEdit*>(TQT_TQWIDGET(child( "Query" )))->text(); }
};
QString
TQString
CoverFetcher::localeIDToString( int id )//static
{
switch ( id )
@ -561,7 +561,7 @@ CoverFetcher::getUserQuery( TQString explanation )
explanation = i18n("Ask Amazon for covers using this query:");
EditSearchDialog dialog(
static_cast<TQWidget*>( parent() ),
TQT_TQWIDGET( tqparent() ),
explanation,
m_userQuery,
this );
@ -582,8 +582,8 @@ CoverFetcher::getUserQuery( TQString explanation )
class CoverFoundDialog : public KDialog
{
public:
CoverFoundDialog( TQWidget *parent, const TQImage &cover, const TQString &productname )
: KDialog( parent )
CoverFoundDialog( TQWidget *tqparent, const TQImage &cover, const TQString &productname )
: KDialog( tqparent )
{
// Gives the window a small title bar, and skips a taskbar entry
KWin::setType( winId(), NET::Utility );
@ -599,13 +599,13 @@ CoverFetcher::getUserQuery( TQString explanation )
KPushButton *nextcover = new KPushButton( i18n( "&Next Cover" ), buttons, "NextCover" );
KPushButton *cancel = new KPushButton( KStdGuiItem::cancel(), buttons );
labelPix ->setAlignment( Qt::AlignHCenter );
labelName->setAlignment( Qt::AlignHCenter );
labelPix ->tqsetAlignment( TQt::AlignHCenter );
labelName->tqsetAlignment( TQt::AlignHCenter );
labelPix ->setPixmap( cover );
labelName->setText( productname );
save->setDefault( true );
this->setFixedSize( sizeHint() );
this->setFixedSize( tqsizeHint() );
this->setCaption( i18n("Cover Found") );
connect( save, TQT_SIGNAL(clicked()), TQT_SLOT(accept()) );
@ -616,9 +616,9 @@ CoverFetcher::getUserQuery( TQString explanation )
virtual void accept()
{
if( qstrcmp( sender()->name(), "NewSearch" ) == 0 )
if( tqstrcmp( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(), "NewSearch" ) == 0 )
done( 1000 );
else if( qstrcmp( sender()->name(), "NextCover" ) == 0 )
else if( tqstrcmp( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name(), "NextCover" ) == 0 )
done( 1001 );
else
KDialog::accept();
@ -629,7 +629,7 @@ CoverFetcher::getUserQuery( TQString explanation )
void
CoverFetcher::showCover()
{
CoverFoundDialog dialog( static_cast<TQWidget*>( parent() ), m_image, m_currentCoverName );
CoverFoundDialog dialog( TQT_TQWIDGET( tqparent() ), m_image, m_currentCoverName );
switch( dialog.exec() )
{

@ -12,13 +12,13 @@
#include <tqdom.h> //stack allocated
namespace Amarok {
void coverContextMenu( TQWidget *parent, TQPoint point, const TQString &artist, const TQString &album, bool showCoverManager = true );
void coverContextMenu( TQWidget *tqparent, TQPoint point, const TQString &artist, const TQString &album, bool showCoverManager = true );
}
class CoverLabel : public TQLabel {
public:
CoverLabel ( TQWidget * parent, const char * name = 0, WFlags f = 0 );
CoverLabel ( TQWidget * tqparent, const char * name = 0, WFlags f = 0 );
void setInformation( const TQString artist, const TQString album ) {
m_artist = artist;
@ -37,15 +37,16 @@ class CoverLabel : public TQLabel {
namespace KIO { class Job; }
class CoverFetcher : public QObject
class CoverFetcher : public TQObject
{
friend class EditSearchDialog;
Q_OBJECT
TQ_OBJECT
static const uint MAX_COVERS_CHOICE = 10;
public:
CoverFetcher( TQWidget *parent, const TQString &artist, TQString album );
CoverFetcher( TQWidget *tqparent, const TQString &artist, TQString album );
~CoverFetcher();
/// allow the user to edit the query?
@ -109,7 +110,7 @@ private:
void finishWithError( const TQString &message, KIO::Job *job = 0 );
/// Prompt the user for a query
void getUserQuery( TQString explanation = TQString::null );
void getUserQuery( TQString explanation = TQString() );
/// Will try all available queries, and then prompt the user, if allowed
void attemptAnotherFetch();

@ -73,9 +73,9 @@ class ArtistItem : public KListViewItem
TQString a = text(0);
TQString b = i->text(0);
if ( a.startsWith( "the ", false ) )
if ( a.tqstartsWith( "the ", false ) )
CollectionView::manipulateThe( a, true );
if ( b.startsWith( "the ", false ) )
if ( b.tqstartsWith( "the ", false ) )
CollectionView::manipulateThe( b, true );
return TQString::localeAwareCompare( a.lower(), b.lower() );
@ -270,26 +270,26 @@ void CoverManager::init()
}
CoverViewDialog::CoverViewDialog( const TQString& artist, const TQString& album, TQWidget *parent )
: TQDialog( parent, 0, false, WDestructiveClose | WType_TopLevel | WNoAutoErase )
CoverViewDialog::CoverViewDialog( const TQString& artist, const TQString& album, TQWidget *tqparent )
: TQDialog( tqparent, 0, false, WDestructiveClose | WType_TopLevel | WNoAutoErase )
, m_pixmap( CollectionDB::instance()->albumImage( artist, album, false, 0 ) )
{
KWin::setType( winId(), NET::Utility );
kapp->setTopWidget( this );
setCaption( kapp->makeStdCaption( i18n("%1 - %2").arg( artist, album ) ) );
setCaption( kapp->makeStdCaption( i18n("%1 - %2").tqarg( artist, album ) ) );
m_layout = new TQHBoxLayout( this );
m_layout->setAutoAdd( true );
m_tqlayout = new TQHBoxLayout( this );
m_tqlayout->setAutoAdd( true );
m_pixmapViewer = new PixmapViewer( this, m_pixmap );
setFixedSize( m_pixmapViewer->maximalSize() );
}
void CoverManager::viewCover( const TQString& artist, const TQString& album, TQWidget *parent ) //static
void CoverManager::viewCover( const TQString& artist, const TQString& album, TQWidget *tqparent ) //static
{
//TQDialog means "escape" works as expected
TQDialog *dialog = new CoverViewDialog( artist, album, parent );
TQDialog *dialog = new CoverViewDialog( artist, album, tqparent );
dialog->show();
}
@ -394,9 +394,9 @@ void CoverManager::slotArtistSelected( TQListViewItem *item ) //SLOT
progress.TQDialog::setCaption( i18n("...") );
//NOTE we MUST show the dialog, otherwise the closeEvents get processed
// in the processEvents() calls below, GRUMBLE! Qt sux0rs
// in the processEvents() calls below, GRUMBLE! TQt sux0rs
progress.show();
progress.repaint( false ); //ensures the dialog isn't blank
progress.tqrepaint( false ); //ensures the dialog isn't blank
//this is an extra processEvent call for the sake of init() and aesthetics
//it isn't necessary
@ -456,8 +456,8 @@ void CoverManager::slotArtistSelected( TQListViewItem *item ) //SLOT
m_coverItems.append( new CoverViewItem( m_coverView, m_coverView->lastItem(), artist, album ) );
if ( ++x % 50 == 0 ) {
progress.setProgress( x / 5 ); // we do it less often due to bug in Qt, ask Max
kapp->processEvents(); // TQProgressDialog also calls this, but not always due to Qt bug!
progress.setProgress( x / 5 ); // we do it less often due to bug in TQt, ask Max
kapp->processEvents(); // TQProgressDialog also calls this, but not always due to TQt bug!
//only worth testing for after processEvents() is called
if( progress.wasCancelled() )
@ -499,7 +499,7 @@ void CoverManager::showCoverMenu( TQIconViewItem *item, const TQPoint &p ) //SLO
}
else {
menu.insertItem( SmallIconSet( Amarok::icon( "zoom" ) ), i18n( "&Show Fullsize" ), SHOW );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).arg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "download" ) ), i18n( "&Fetch From amazon.%1" ).tqarg( CoverManager::amazonTld() ), FETCH );
menu.insertItem( SmallIconSet( Amarok::icon( "files" ) ), i18n( "Set &Custom Cover" ), CUSTOM );
menu.insertItem( SmallIconSet( Amarok::icon( "add_playlist" ) ), i18n( "&Append to Playlist" ), APPEND );
menu.insertSeparator();
@ -586,7 +586,7 @@ void CoverManager::slotSetFilter() //SLOT
for( TQIconViewItem *item = m_coverItems.first(); item; item = m_coverItems.next() )
{
CoverViewItem *coverItem = static_cast<CoverViewItem*>(item);
if( coverItem->album().contains( m_filter, false ) || coverItem->artist().contains( m_filter, false ) )
if( coverItem->album().tqcontains( m_filter, false ) || coverItem->artist().tqcontains( m_filter, false ) )
m_coverView->insertItem( item, m_coverView->lastItem() );
}
m_coverView->setAutoArrange( true );
@ -621,7 +621,7 @@ void CoverManager::changeView( int id ) //SLOT
bool show = false;
CoverViewItem *coverItem = static_cast<CoverViewItem*>(item);
if( !m_filter.isEmpty() ) {
if( !coverItem->album().contains( m_filter, false ) && !coverItem->artist().contains( m_filter, false ) )
if( !coverItem->album().tqcontains( m_filter, false ) && !coverItem->artist().tqcontains( m_filter, false ) )
continue;
}
@ -729,7 +729,7 @@ void CoverManager::setCustomSelectedCovers()
}
KURL file = KFileDialog::getImageOpenURL( startPath, this, i18n( "Select Cover Image File" ) );
if ( !file.isEmpty() ) {
qApp->processEvents(); //it may takes a while so process pending events
tqApp->processEvents(); //it may takes a while so process pending events
TQString tmpFile;
TQImage image = CollectionDB::fetchImage(file, tmpFile);
for ( CoverViewItem* item = selected.first(); item; item = selected.next() ) {
@ -763,12 +763,12 @@ void CoverManager::deleteSelectedCovers()
i18n( "Are you sure you want to remove this cover from the Collection?",
"Are you sure you want to delete these %n covers from the Collection?",
selected.count() ),
TQString::null,
TQString(),
KStdGuiItem::del() );
if ( button == KMessageBox::Continue ) {
for ( CoverViewItem* item = selected.first(); item; item = selected.next() ) {
qApp->processEvents();
tqApp->processEvents();
if ( CollectionDB::instance()->removeAlbumImage( item->artist(), item->album() ) ) //delete selected cover
coverRemoved( item->artist(), item->album() );
}
@ -817,9 +817,9 @@ void CoverManager::updateStatusBar()
if ( values.count() >= 2 )
{
if( values[0].isEmpty() )
text = i18n( "Fetching cover for %1..." ).arg( values[1] );
text = i18n( "Fetching cover for %1..." ).tqarg( values[1] );
else
text = i18n( "Fetching cover for %1 - %2..." ).arg( values[0], values[1] );
text = i18n( "Fetching cover for %1 - %2..." ).tqarg( values[0], values[1] );
}
}
else if( m_fetchingCovers ) {
@ -851,7 +851,7 @@ void CoverManager::updateStatusBar()
}
if( !m_filter.isEmpty() )
text = i18n( "1 result for \"%1\"", "%n results for \"%1\"", totalCounter ).arg( m_filter );
text = i18n( "1 result for \"%1\"", "%n results for \"%1\"", totalCounter ).tqarg( m_filter );
else if( m_artistView->selectedItem() ) {
text = i18n( "1 album", "%n albums", totalCounter );
if( m_artistView->selectedItem() != m_artistView->firstChild() ) //showing albums by an artist
@ -864,7 +864,7 @@ void CoverManager::updateStatusBar()
}
if( missingCounter )
text += i18n(" - ( <b>%1</b> without cover )" ).arg( missingCounter );
text += i18n(" - ( <b>%1</b> without cover )" ).tqarg( missingCounter );
#ifdef AMAZON_SUPPORT
m_fetchButton->setEnabled( missingCounter );
@ -884,8 +884,8 @@ void CoverManager::setStatusText( TQString text )
// CLASS CoverView
/////////////////////////////////////////////////////////////////////
CoverView::CoverView( TQWidget *parent, const char *name, WFlags f )
: KIconView( parent, name, f )
CoverView::CoverView( TQWidget *tqparent, const char *name, WFlags f )
: KIconView( tqparent, name, f )
{
Debug::Block block( __PRETTY_FUNCTION__ );
@ -912,7 +912,7 @@ TQDragObject *CoverView::dragObject()
return 0;
const TQString sql = "SELECT tags.url FROM tags, album WHERE album.name %1 AND tags.album = album.id ORDER BY tags.track;";
const TQStringList values = CollectionDB::instance()->query( sql.arg( CollectionDB::likeCondition( item->album() ) ) );
const TQStringList values = CollectionDB::instance()->query( sql.tqarg( CollectionDB::likeCondition( item->album() ) ) );
KURL::List urls;
for( TQStringList::ConstIterator it = values.begin(), end = values.end(); it != end; ++it )
@ -939,8 +939,8 @@ void CoverView::setStatusText( TQIconViewItem *item )
//FIXME: Don't rely on other independent code, use an sql query
if( item->artist().isEmpty() ) sampler = true;
TQString tipContent = i18n( "%1 - %2" ).arg( sampler ? i18n("Various Artists") : item->artist() )
.arg( item->album() );
TQString tipContent = i18n( "%1 - %2" ).tqarg( sampler ? i18n("Various Artists") : item->artist() )
.tqarg( item->album() );
CoverManager::instance()->setStatusText( tipContent );
@ -951,8 +951,8 @@ void CoverView::setStatusText( TQIconViewItem *item )
// CLASS CoverViewItem
/////////////////////////////////////////////////////////////////////
CoverViewItem::CoverViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &artist, const TQString &album )
: KIconViewItem( parent, after, album )
CoverViewItem::CoverViewItem( TQIconView *tqparent, TQIconViewItem *after, const TQString &artist, const TQString &album )
: KIconViewItem( tqparent, after, album )
, m_artist( artist )
, m_album( album )
, m_coverImagePath( CollectionDB::instance()->albumImage( m_artist, m_album, false, 0, &m_embedded ) )
@ -973,7 +973,7 @@ void CoverViewItem::loadCover()
m_coverImagePath = CollectionDB::instance()->albumImage( m_artist, m_album, false, 1, &m_embedded );
m_coverPixmap = TQPixmap( m_coverImagePath ); //create the scaled cover
repaint();
tqrepaint();
}
@ -983,27 +983,27 @@ void CoverViewItem::calcRect( const TQString& )
TQFontMetrics fm = iconView()->fontMetrics();
TQRect itemPixmapRect( 5, 1, thumbWidth, thumbWidth );
TQRect itemRect = rect();
itemRect.setWidth( thumbWidth + 10 );
itemRect.setHeight( thumbWidth + fm.lineSpacing() + 2 );
TQRect itemTextRect( 0, thumbWidth+2, itemRect.width(), fm.lineSpacing() );
TQRect tqitemRect = rect();
tqitemRect.setWidth( thumbWidth + 10 );
tqitemRect.setHeight( thumbWidth + fm.lineSpacing() + 2 );
TQRect itemTextRect( 0, thumbWidth+2, tqitemRect.width(), fm.lineSpacing() );
setPixmapRect( itemPixmapRect );
setTextRect( itemTextRect );
setItemRect( itemRect );
setItemRect( tqitemRect );
}
void CoverViewItem::paintItem(TQPainter* p, const TQColorGroup& cg)
{
TQRect itemRect = rect();
TQRect tqitemRect = rect();
p->save();
p->translate( itemRect.x(), itemRect.y() );
p->translate( tqitemRect.x(), tqitemRect.y() );
// draw the border
p->setPen( cg.mid() );
p->drawRect( 0, 0, itemRect.width(), pixmapRect().height()+2 );
p->drawRect( 0, 0, tqitemRect.width(), pixmapRect().height()+2 );
// draw the cover image
if( !m_coverPixmap.isNull() )
@ -1019,7 +1019,7 @@ void CoverViewItem::paintItem(TQPainter* p, const TQColorGroup& cg)
str = KStringHandler::rPixelSqueeze( str, p->fontMetrics(), textRect().width() );
}
p->setPen( cg.text() );
p->drawText( textRect(), Qt::AlignCenter, str );
p->drawText( textRect(), TQt::AlignCenter, str );
if( isSelected() ) {
p->setPen( cg.highlight() );

@ -25,9 +25,10 @@ class KProgress;
class TQHBoxLayout;
class PixmapViewer;
class CoverManager : public QSplitter
class CoverManager : public TQSplitter
{
Q_OBJECT
TQ_OBJECT
static CoverManager *s_instance;
@ -37,8 +38,8 @@ class CoverManager : public QSplitter
static CoverManager *instance() { return s_instance; }
static void showOnce( const TQString &artist = TQString::null );
static void viewCover( const TQString& artist, const TQString& album, TQWidget *parent=0 );
static void showOnce( const TQString &artist = TQString() );
static void viewCover( const TQString& artist, const TQString& album, TQWidget *tqparent=0 );
void setStatusText( TQString text );
@ -110,9 +111,10 @@ class CoverManager : public QSplitter
class CoverView : public KIconView
{
Q_OBJECT
TQ_OBJECT
public:
CoverView( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 );
CoverView( TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0 );
protected:
TQDragObject *dragObject();
@ -124,7 +126,7 @@ class CoverView : public KIconView
class CoverViewItem : public KIconViewItem
{
public:
CoverViewItem( TQIconView *parent, TQIconViewItem *after, const TQString &artist, const TQString &album );
CoverViewItem( TQIconView *tqparent, TQIconViewItem *after, const TQString &artist, const TQString &album );
void loadCover();
bool hasCover() const;
@ -134,12 +136,12 @@ class CoverViewItem : public KIconViewItem
TQPixmap coverPixmap() const { return m_coverPixmap; }
protected:
void paintItem(TQPainter* painter, const TQColorGroup& colorGroup);
void paintItem(TQPainter* painter, const TQColorGroup& tqcolorGroup);
void paintFocus(TQPainter *, const TQColorGroup &) { }
void dropped( TQDropEvent *, const TQValueList<TQIconDragItem> & );
void dragEntered();
void dragLeft();
void calcRect( const TQString& text_=TQString::null );
void calcRect( const TQString& text_=TQString() );
private:
TQString m_artist;
@ -152,12 +154,13 @@ class CoverViewItem : public KIconViewItem
class CoverViewDialog : public TQDialog {
Q_OBJECT
TQ_OBJECT
public:
CoverViewDialog(const TQString& artist, const TQString& album, TQWidget *parent);
CoverViewDialog(const TQString& artist, const TQString& album, TQWidget *tqparent);
private:
TQHBoxLayout *m_layout;
TQHBoxLayout *m_tqlayout;
TQPixmap m_pixmap;
PixmapViewer *m_pixmapViewer;
TQLabel *m_label;

@ -68,10 +68,10 @@ bool CueFile::load(int mediaLength)
{
TQFile file( m_cueFileName );
int track = 0;
TQString defaultArtist = TQString::null;
TQString defaultAlbum = TQString::null;
TQString artist = TQString::null;
TQString title = TQString::null;
TQString defaultArtist = TQString();
TQString defaultAlbum = TQString();
TQString artist = TQString();
TQString title = TQString();
long length = 0;
long prevIndex = -1;
bool index00Present = false;
@ -87,33 +87,33 @@ bool CueFile::load(int mediaLength)
{
line = stream.readLine().simplifyWhiteSpace();
if( line.startsWith( "title", false ) )
if( line.tqstartsWith( "title", false ) )
{
title = line.mid( 6 ).remove( '"' );
if( mode == BEGIN )
{
defaultAlbum = title;
title = TQString::null;
title = TQString();
debug() << "Album: " << defaultAlbum << endl;
}
else
debug() << "Title: " << title << endl;
}
else if( line.startsWith( "performer", false ))
else if( line.tqstartsWith( "performer", false ))
{
artist = line.mid( 10 ).remove( '"' );
if( mode == BEGIN )
{
defaultArtist = artist;
artist = TQString::null;
artist = TQString();
debug() << "Album Artist: " << defaultArtist << endl;
}
else
debug() << "Artist: " << artist << endl;
}
else if( line.startsWith( "track", false ) )
else if( line.tqstartsWith( "track", false ) )
{
if( mode == TRACK_FOUND )
{
@ -131,15 +131,15 @@ bool CueFile::load(int mediaLength)
// add previous entry to map
insert( index, CueFileItem( title, artist, defaultAlbum, track, index ) );
prevIndex = index;
title = TQString::null;
artist = TQString::null;
title = TQString();
artist = TQString();
track = 0;
}
track = line.section (' ',1,1).toInt();
debug() << "Track: " << track << endl;
mode = TRACK_FOUND;
}
else if( line.startsWith( "index", false ) )
else if( line.tqstartsWith( "index", false ) )
{
if( mode == TRACK_FOUND)
{

@ -52,6 +52,7 @@ class CueFileItem {
class CueFile : public TQObject, public TQMap<long, CueFileItem>, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
public:
static CueFile *instance();

@ -81,7 +81,7 @@ CollectionDB::CollectionDB()
// Load DBEngine plugin
TQString query = "[X-KDE-Amarok-plugintype] == 'dbengine' and [X-KDE-Amarok-name] != '%1'";
KTrader::OfferList offers = PluginManager::query( query.arg( "sqlite-dbengine" ) );
KTrader::OfferList offers = PluginManager::query( query.tqarg( "sqlite-dbengine" ) );
m_dbEngine = (DBEngine*) PluginManager::createFromService( offers.first() );
//<OPEN DATABASE>
@ -137,7 +137,7 @@ CollectionDB::returnStaticDbConnection( DbConnection *conn )
* @param statement SQL program to execute. Only one SQL statement is allowed.
* @return The queried data, or TQStringList() on error.
*/
QStringList
TQStringList
CollectionDB::query( const TQString& statement, DbConnection *conn )
{
if ( DEBUG )
@ -272,8 +272,8 @@ CollectionDB::createTables( DbConnection *conn )
"length INTEGER,"
"samplerate INTEGER,"
"sampler BOOL );" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
TQString albumAutoIncrement = "";
TQString artistAutoIncrement = "";
@ -302,59 +302,59 @@ CollectionDB::createTables( DbConnection *conn )
query( TQString( "CREATE %1 TABLE album%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( albumAutoIncrement ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( albumAutoIncrement ), conn );
//create artist table
query( TQString( "CREATE %1 TABLE artist%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( artistAutoIncrement ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( artistAutoIncrement ), conn );
//create genre table
query( TQString( "CREATE %1 TABLE genre%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() +");" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( genreAutoIncrement ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( genreAutoIncrement ), conn );
//create year table
query( TQString( "CREATE %1 TABLE year%2 ("
"id INTEGER PRIMARY KEY %3,"
"name " + textColumnType() + ");" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" )
.arg( yearAutoIncrement ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" )
.tqarg( yearAutoIncrement ), conn );
//create images table
query( TQString( "CREATE %1 TABLE images%2 ("
"path " + textColumnType() + ","
"artist " + textColumnType() + ","
"album " + textColumnType() + ");" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
// create directory statistics table
query( TQString( "CREATE %1 TABLE directories%2 ("
"dir " + textColumnType() + " UNIQUE,"
"dir " + textColumnType() + " UNITQUE,"
"changedate INTEGER );" )
.arg( conn ? "TEMPORARY" : "" )
.arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "TEMPORARY" : "" )
.tqarg( conn ? "_temp" : "" ), conn );
//create indexes
query( TQString( "CREATE INDEX album_idx%1 ON album%2( name );" )
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX artist_idx%1 ON artist%2( name );" )
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX genre_idx%1 ON genre%2( name );" )
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "CREATE INDEX year_idx%1 ON year%2( name );" )
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );
.tqarg( conn ? "_temp" : "" ).tqarg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
@ -385,13 +385,13 @@ CollectionDB::dropTables( DbConnection *conn )
{
DEBUG_FUNC_INFO
query( TQString( "DROP TABLE tags%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE album%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE artist%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE genre%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE year%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE images%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE directories%1;" ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE tags%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE album%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE artist%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE genre%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE year%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE images%1;" ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "DROP TABLE directories%1;" ).tqarg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
query( TQString( "DROP TABLE related_artists;" ) );
@ -421,16 +421,16 @@ CollectionDB::clearTables( DbConnection *conn )
clearCommand = "TRUNCATE TABLE";
}
query( TQString( "%1 tags%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 album%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 artist%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 genre%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 year%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 images%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 directories%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 tags%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 album%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 artist%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 genre%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 year%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 images%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
query( TQString( "%1 directories%2;" ).tqarg( clearCommand ).tqarg( conn ? "_temp" : "" ), conn );
if ( !conn )
{
query( TQString( "%1 related_artists;" ).arg( clearCommand ) );
query( TQString( "%1 related_artists;" ).tqarg( clearCommand ) );
}
}
@ -455,7 +455,7 @@ CollectionDB::createStatsTable()
// create music statistics database
query( TQString( "CREATE TABLE statistics ("
"url " + textColumnType() + " UNIQUE,"
"url " + textColumnType() + " UNITQUE,"
"createdate INTEGER,"
"accessdate INTEGER,"
"percentage FLOAT,"
@ -493,7 +493,7 @@ CollectionDB::artistID( TQString value, bool autocreate, const bool temporary, c
}
QString
TQString
CollectionDB::artistValue( uint id )
{
// lookup cache
@ -528,7 +528,7 @@ CollectionDB::albumID( TQString value, bool autocreate, const bool temporary, co
}
QString
TQString
CollectionDB::albumValue( uint id )
{
// lookup cache
@ -552,7 +552,7 @@ CollectionDB::genreID( TQString value, bool autocreate, const bool temporary, co
}
QString
TQString
CollectionDB::genreValue( uint id )
{
return valueFromID( "genre", id );
@ -566,7 +566,7 @@ CollectionDB::yearID( TQString value, bool autocreate, const bool temporary, con
}
QString
TQString
CollectionDB::yearValue( uint id )
{
return valueFromID( "year", id );
@ -584,16 +584,16 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
TQStringList values =
query( TQString(
"SELECT id, name FROM %1 WHERE name LIKE '%2';" )
.arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), conn );
.tqarg( name )
.tqarg( CollectionDB::instance()->escapeString( value ) ), conn );
if ( updateSpelling && !values.isEmpty() && ( values[1] != value ) )
{
query( TQString( "UPDATE %1 SET id = %2, name = '%3' WHERE id = %4;" )
.arg( name )
.arg( values.first() )
.arg( CollectionDB::instance()->escapeString( value ) )
.arg( values.first() ), conn );
.tqarg( name )
.tqarg( values.first() )
.tqarg( CollectionDB::instance()->escapeString( value ) )
.tqarg( values.first() ), conn );
}
//check if item exists. if not, should we autocreate it?
@ -601,8 +601,8 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
if ( values.isEmpty() && autocreate )
{
id = insert( TQString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" )
.arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), name, conn );
.tqarg( name )
.tqarg( CollectionDB::instance()->escapeString( value ) ), name, conn );
return id;
}
@ -611,28 +611,28 @@ CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const
}
QString
TQString
CollectionDB::valueFromID( TQString table, uint id )
{
TQStringList values =
query( TQString(
"SELECT name FROM %1 WHERE id=%2;" )
.arg( table )
.arg( id ) );
.tqarg( table )
.tqarg( id ) );
return values.isEmpty() ? 0 : values.first();
}
QString
TQString
CollectionDB::albumSongCount( const TQString &artist_id, const TQString &album_id )
{
TQStringList values =
query( TQString(
"SELECT COUNT( url ) FROM tags WHERE album = %1 AND artist = %2;" )
.arg( album_id )
.arg( artist_id ) );
.tqarg( album_id )
.tqarg( artist_id ) );
return values.first();
}
@ -642,52 +642,52 @@ CollectionDB::albumIsCompilation( const TQString &album_id )
TQStringList values =
query( TQString(
"SELECT sampler FROM tags WHERE sampler=%1 AND album=%2" )
.arg( CollectionDB::instance()->boolT() )
.arg( album_id ) );
.tqarg( CollectionDB::instance()->boolT() )
.tqarg( album_id ) );
return (values.count() != 0);
}
QStringList
TQStringList
CollectionDB::albumTracks( const TQString &artist_id, const TQString &album_id )
{
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
return query( TQString( "SELECT tags.url, tags.track AS __discard FROM tags, year WHERE tags.album = %1 AND "
"( tags.sampler = %2 OR tags.artist = %3 ) AND year.id = tags.year "
"ORDER BY tags.track;" )
.arg( album_id )
.arg( boolT() )
.arg( artist_id ) );
.tqarg( album_id )
.tqarg( boolT() )
.tqarg( artist_id ) );
}
else
{
return query( TQString( "SELECT tags.url FROM tags, year WHERE tags.album = %1 AND "
"( tags.sampler = 1 OR tags.artist = %2 ) AND year.id = tags.year "
"ORDER BY tags.track;" )
.arg( album_id )
.arg( artist_id ) );
.tqarg( album_id )
.tqarg( artist_id ) );
}
}
void
CollectionDB::addImageToAlbum( const TQString& image, TQValueList< QPair<TQString, TQString> > info, DbConnection *conn )
CollectionDB::addImageToAlbum( const TQString& image, TQValueList< TQPair<TQString, TQString> > info, DbConnection *conn )
{
for ( TQValueList< QPair<TQString, TQString> >::ConstIterator it = info.begin(); it != info.end(); ++it )
for ( TQValueList< TQPair<TQString, TQString> >::ConstIterator it = info.begin(); it != info.end(); ++it )
{
if ( (*it).first.isEmpty() || (*it).second.isEmpty() )
continue;
debug() << "Added image for album: " << (*it).first << " - " << (*it).second << ": " << image << endl;
insert( TQString( "INSERT INTO images%1 ( path, artist, album ) VALUES ( '%1', '%2', '%3' );" )
.arg( conn ? "_temp" : "" )
.arg( escapeString( image ) )
.arg( escapeString( (*it).first ) )
.arg( escapeString( (*it).second ) ), NULL, conn );
.tqarg( conn ? "_temp" : "" )
.tqarg( escapeString( image ) )
.tqarg( escapeString( (*it).first ) )
.tqarg( escapeString( (*it).second ) ), NULL, conn );
}
}
QImage
TQImage
CollectionDB::fetchImage(const KURL& url, TQString &/*tmpFile*/)
{
if(url.protocol() != "file")
@ -734,7 +734,7 @@ CollectionDB::setAlbumImage( const TQString& artist, const TQString& album, TQIm
}
QString
TQString
CollectionDB::findImageByMetabundle( MetaBundle trackInformation, uint width )
{
if( width == 1 ) width = AmarokConfig::coverPreviewSize();
@ -791,7 +791,7 @@ CollectionDB::findImageByMetabundle( MetaBundle trackInformation, uint width )
}
QString
TQString
CollectionDB::findImageByArtistAlbum( const TQString &artist, const TQString &album, uint width )
{
TQCString widthKey = makeWidthKey( width );
@ -827,7 +827,7 @@ CollectionDB::findImageByArtistAlbum( const TQString &artist, const TQString &al
}
QString
TQString
CollectionDB::albumImage( const TQString &artist, const TQString &album, uint width )
{
TQString s;
@ -842,14 +842,14 @@ CollectionDB::albumImage( const TQString &artist, const TQString &album, uint wi
}
QString
TQString
CollectionDB::albumImage( const uint artist_id, const uint album_id, const uint width )
{
return albumImage( artistValue( artist_id ), albumValue( album_id ), width );
}
QString
TQString
CollectionDB::albumImage( MetaBundle trackInformation, uint width )
{
TQString path = findImageByMetabundle( trackInformation, width );
@ -860,14 +860,14 @@ CollectionDB::albumImage( MetaBundle trackInformation, uint width )
}
QCString
TQCString
CollectionDB::makeWidthKey( uint width )
{
return TQString::number( width ).local8Bit() + "@";
}
// get image from path
QString
TQString
CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, uint width )
{
if ( width == 1 ) width = AmarokConfig::coverPreviewSize();
@ -879,8 +879,8 @@ CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, u
TQStringList values =
query( TQString(
"SELECT path FROM images WHERE artist LIKE '%1' AND album LIKE '%2' ORDER BY path;" )
.arg( escapeString( artist ) )
.arg( escapeString( album ) ) );
.tqarg( escapeString( artist ) )
.tqarg( escapeString( album ) ) );
if ( !values.isEmpty() )
{
@ -889,7 +889,7 @@ CollectionDB::getImageForAlbum( const TQString& artist, const TQString& album, u
uint maxmatches = 0;
for ( uint i = 0; i < values.count(); i++ )
{
matches = values[i].contains( "front", false ) + values[i].contains( "cover", false ) + values[i].contains( "folder", false );
matches = values[i].tqcontains( "front", false ) + values[i].tqcontains( "cover", false ) + values[i].tqcontains( "folder", false );
if ( matches > maxmatches )
{
image = values[i];
@ -949,7 +949,7 @@ CollectionDB::removeAlbumImage( const uint artist_id, const uint album_id )
}
QString
TQString
CollectionDB::notAvailCover( int width )
{
if ( !width ) width = AmarokConfig::coverPreviewSize();
@ -966,7 +966,7 @@ CollectionDB::notAvailCover( int width )
}
QStringList
TQStringList
CollectionDB::artistList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@ -983,7 +983,7 @@ CollectionDB::artistList( bool withUnknowns, bool withCompilations )
}
QStringList
TQStringList
CollectionDB::albumList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@ -1000,7 +1000,7 @@ CollectionDB::albumList( bool withUnknowns, bool withCompilations )
}
QStringList
TQStringList
CollectionDB::genreList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@ -1017,7 +1017,7 @@ CollectionDB::genreList( bool withUnknowns, bool withCompilations )
}
QStringList
TQStringList
CollectionDB::yearList( bool withUnknowns, bool withCompilations )
{
QueryBuilder qb;
@ -1034,7 +1034,7 @@ CollectionDB::yearList( bool withUnknowns, bool withCompilations )
}
QStringList
TQStringList
CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool withCompilations )
{
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql)
@ -1042,8 +1042,8 @@ CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool
return query( "SELECT DISTINCT album.name, lower( album.name ) AS __discard FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id "
"AND artist.name = '" + escapeString( artist ) + "' " +
( withUnknown ? TQString::null : "AND album.name <> '' " ) +
( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) +
( withUnknown ? TQString() : "AND album.name <> '' " ) +
( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) +
" ORDER BY lower( album.name );" );
}
else
@ -1051,30 +1051,30 @@ CollectionDB::albumListOfArtist( const TQString &artist, bool withUnknown, bool
return query( "SELECT DISTINCT album.name FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id "
"AND artist.name = '" + escapeString( artist ) + "' " +
( withUnknown ? TQString::null : "AND album.name <> '' " ) +
( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) +
( withUnknown ? TQString() : "AND album.name <> '' " ) +
( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) +
" ORDER BY lower( album.name );" );
}
}
QStringList
TQStringList
CollectionDB::artistAlbumList( bool withUnknown, bool withCompilations )
{
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql)
{
return query( "SELECT DISTINCT artist.name, album.name, lower( album.name ) AS __discard FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id " +
( withUnknown ? TQString::null : "AND album.name <> '' AND artist.name <> '' " ) +
( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) +
( withUnknown ? TQString() : "AND album.name <> '' AND artist.name <> '' " ) +
( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) +
" ORDER BY lower( album.name );" );
}
else
{
return query( "SELECT DISTINCT artist.name, album.name FROM tags, album, artist WHERE "
"tags.album = album.id AND tags.artist = artist.id " +
( withUnknown ? TQString::null : "AND album.name <> '' AND artist.name <> '' " ) +
( withCompilations ? TQString::null : "AND tags.sampler = " + boolF() ) +
( withUnknown ? TQString() : "AND album.name <> '' AND artist.name <> '' " ) +
( withCompilations ? TQString() : "AND tags.sampler = " + boolF() ) +
" ORDER BY lower( album.name );" );
}
}
@ -1094,11 +1094,11 @@ CollectionDB::addSong( MetaBundle* bundle, const bool incremental, DbConnection
if ( title.isEmpty() )
{
title = bundle->url().fileName();
if ( bundle->url().fileName().find( '-' ) > 0 )
if ( bundle->url().fileName().tqfind( '-' ) > 0 )
{
if ( artist.isEmpty() ) artist = bundle->url().fileName().section( '-', 0, 0 ).stripWhiteSpace();
title = bundle->url().fileName().section( '-', 1 ).stripWhiteSpace();
title = title.left( title.findRev( '.' ) ).stripWhiteSpace();
title = title.left( title.tqfindRev( '.' ) ).stripWhiteSpace();
if ( title.isEmpty() ) title = bundle->url().fileName();
}
}
@ -1165,7 +1165,7 @@ CollectionDB::bundleForUrl( MetaBundle* bundle )
"FROM tags, album, artist, genre, year "
"WHERE album.id = tags.album AND artist.id = tags.artist AND "
"genre.id = tags.genre AND year.id = tags.year AND tags.url = '%1';" )
.arg( escapeString( bundle->url().path() ) ) );
.tqarg( escapeString( bundle->url().path() ) ) );
if ( !values.empty() )
fillInBundle( values, *bundle );
@ -1260,10 +1260,10 @@ void
CollectionDB::addAudioproperties( const MetaBundle& bundle )
{
query( TQString( "UPDATE tags SET bitrate='%1', length='%2', samplerate='%3' WHERE url='%4';" )
.arg( bundle.bitrate() )
.arg( bundle.length() )
.arg( bundle.sampleRate() )
.arg( escapeString( bundle.url().path() ) ) );
.tqarg( bundle.bitrate() )
.tqarg( bundle.length() )
.tqarg( bundle.sampleRate() )
.tqarg( escapeString( bundle.url().path() ) ) );
}
@ -1275,7 +1275,7 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
query( TQString(
"SELECT playcounter, createdate, percentage FROM statistics "
"WHERE url = '%1';" )
.arg( escapeString( url ) ) );
.tqarg( escapeString( url ) ) );
// check boundaries
if ( percentage > 100 ) percentage = 100;
@ -1288,19 +1288,19 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE statistics SET percentage=%1, playcounter=%2+1 WHERE url='%3';" )
.arg( score )
.arg( values[0] + " + 1" )
.arg( escapeString( url ) ) );
.tqarg( score )
.tqarg( values[0] + " + 1" )
.tqarg( escapeString( url ) ) );
}
else
{
query( TQString( "REPLACE INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, %5 );" )
.arg( escapeString( url ) )
.arg( values[1] )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( score )
.arg( values[0] + " + 1" ) );
.tqarg( escapeString( url ) )
.tqarg( values[1] )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( score )
.tqarg( values[0] + " + 1" ) );
}
}
else
@ -1310,10 +1310,10 @@ CollectionDB::addSongPercentage( const TQString &url, int percentage )
insert( TQString( "INSERT INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, 1 );" )
.arg( escapeString( url ) )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( score ), NULL );
.tqarg( escapeString( url ) )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( score ), NULL );
}
int iscore = getSongPercentage( url );
@ -1326,7 +1326,7 @@ int
CollectionDB::getSongPercentage( const TQString &url )
{
TQStringList values = query( TQString( "SELECT round( percentage + 0.4 ) FROM statistics WHERE url = '%1';" )
.arg( escapeString( url ) ) );
.tqarg( escapeString( url ) ) );
if( values.count() )
return values.first().toInt();
@ -1341,7 +1341,7 @@ CollectionDB::setSongPercentage( const TQString &url , int percentage )
TQStringList values =
query( TQString(
"SELECT playcounter, createdate, accessdate FROM statistics WHERE url = '%1';" )
.arg( escapeString( url ) ) );
.tqarg( escapeString( url ) ) );
// check boundaries
if ( percentage > 100 ) percentage = 100;
@ -1351,29 +1351,29 @@ CollectionDB::setSongPercentage( const TQString &url , int percentage )
{
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE statistics SET percentage=%1 WHERE url='%2';" )
.arg( percentage )
.arg( escapeString( url ) ) );
.tqarg( percentage )
.tqarg( escapeString( url ) ) );
}
else
{
// entry exists
query( TQString( "REPLACE INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', '%2', '%3', %4, %5 );" )
.arg( escapeString( url ) )
.arg( values[1] )
.arg( values[2] )
.arg( percentage )
.arg( values[0] ) );
.tqarg( escapeString( url ) )
.tqarg( values[1] )
.tqarg( values[2] )
.tqarg( percentage )
.tqarg( values[0] ) );
}
}
else
{
insert( TQString( "INSERT INTO statistics ( url, createdate, accessdate, percentage, playcounter ) "
"VALUES ( '%1', %2, %3, %4, 0 );" )
.arg( escapeString( url ) )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( TQDateTime::currentDateTime().toTime_t() )
.arg( percentage ), NULL );
.tqarg( escapeString( url ) )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( TQDateTime::tqcurrentDateTime().toTime_t() )
.tqarg( percentage ), NULL );
}
emit scoreChanged( url, percentage );
@ -1388,16 +1388,16 @@ CollectionDB::updateDirStats( TQString path, const long datetime, DbConnection *
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
query( TQString( "UPDATE directories%1 SET changedate=%2 WHERE dir='%3';")
.arg( conn ? "_temp" : "" )
.arg( datetime )
.arg( escapeString( path ) ), conn );
.tqarg( conn ? "_temp" : "" )
.tqarg( datetime )
.tqarg( escapeString( path ) ), conn );
}
else
{
query( TQString( "REPLACE INTO directories%1 ( dir, changedate ) VALUES ( '%3', %2 );" )
.arg( conn ? "_temp" : "" )
.arg( datetime )
.arg( escapeString( path ) ),
.tqarg( conn ? "_temp" : "" )
.tqarg( datetime )
.tqarg( escapeString( path ) ),
conn );
}
}
@ -1410,7 +1410,7 @@ CollectionDB::removeSongsInDir( TQString path )
path = path.left( path.length() - 1 );
query( TQString( "DELETE FROM tags WHERE dir = '%1';" )
.arg( escapeString( path ) ) );
.tqarg( escapeString( path ) ) );
}
@ -1422,7 +1422,7 @@ CollectionDB::isDirInCollection( TQString path )
TQStringList values =
query( TQString( "SELECT changedate FROM directories WHERE dir = '%1';" )
.arg( escapeString( path ) ) );
.tqarg( escapeString( path ) ) );
return !values.isEmpty();
}
@ -1433,7 +1433,7 @@ CollectionDB::isFileInCollection( const TQString &url )
{
TQStringList values =
query( TQString( "SELECT url FROM tags WHERE url = '%1';" )
.arg( escapeString( url ) ) );
.tqarg( escapeString( url ) ) );
return !values.isEmpty();
}
@ -1445,24 +1445,24 @@ CollectionDB::removeSongs( const KURL::List& urls )
for( KURL::List::ConstIterator it = urls.begin(), end = urls.end(); it != end; ++it )
{
query( TQString( "DELETE FROM tags WHERE url = '%1';" )
.arg( escapeString( (*it).path() ) ) );
.tqarg( escapeString( (*it).path() ) ) );
}
}
QStringList
TQStringList
CollectionDB::similarArtists( const TQString &artist, uint count )
{
TQStringList values;
if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) {
values = query( TQString( "SELECT suggestion FROM related_artists WHERE artist = '%1' OFFSET 0 LIMIT %2;" )
.arg( escapeString( artist ) ).arg( count ) );
.tqarg( escapeString( artist ) ).tqarg( count ) );
}
else
{
values = query( TQString( "SELECT suggestion FROM related_artists WHERE artist = '%1' LIMIT 0, %2;" )
.arg( escapeString( artist ) ).arg( count ) );
.tqarg( escapeString( artist ) ).tqarg( count ) );
}
if ( values.isEmpty() )
@ -1480,8 +1480,8 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary, DbC
TQStringList dirs;
albums = query( TQString( "SELECT DISTINCT album.name FROM tags_temp, album%1 AS album WHERE tags_temp.dir = '%2' AND album.id = tags_temp.album;" )
.arg( temporary ? "_temp" : "" )
.arg( escapeString( path ) ), conn );
.tqarg( temporary ? "_temp" : "" )
.tqarg( escapeString( path ) ), conn );
for ( uint i = 0; i < albums.count(); i++ )
{
@ -1489,16 +1489,16 @@ CollectionDB::checkCompilations( const TQString &path, const bool temporary, DbC
const uint album_id = albumID( albums[ i ], false, temporary, false, conn );
artists = query( TQString( "SELECT DISTINCT artist.name FROM tags_temp, artist%1 AS artist WHERE tags_temp.album = '%2' AND tags_temp.artist = artist.id;" )
.arg( temporary ? "_temp" : "" )
.arg( album_id ), conn );
.tqarg( temporary ? "_temp" : "" )
.tqarg( album_id ), conn );
dirs = query( TQString( "SELECT DISTINCT dir FROM tags_temp WHERE album = '%1';" )
.arg( album_id ), conn );
.tqarg( album_id ), conn );
if ( artists.count() > dirs.count() )
{
debug() << "Detected compilation: " << albums[ i ] << " - " << artists.count() << ":" << dirs.count() << endl;
query( TQString( "UPDATE tags_temp SET sampler = %1 WHERE album = '%2';" )
.arg(boolT()).arg( album_id ), conn );
.tqarg(boolT()).tqarg( album_id ), conn );
}
}
}
@ -1508,8 +1508,8 @@ void
CollectionDB::setCompilation( const TQString &album, const bool enabled, const bool updateView )
{
query( TQString( "UPDATE tags, album SET tags.sampler = %1 WHERE tags.album = album.id AND album.name = '%2';" )
.arg( enabled ? "1" : "0" )
.arg( escapeString( album ) ) );
.tqarg( enabled ? "1" : "0" )
.tqarg( escapeString( album ) ) );
// Update the Collection-Browser view,
// using TQTimer to make sure we don't manipulate the GUI from a thread
@ -1525,7 +1525,7 @@ CollectionDB::removeDirFromCollection( TQString path )
path = path.left( path.length() - 1 );
query( TQString( "DELETE FROM directories WHERE dir = '%1';" )
.arg( escapeString( path ) ) );
.tqarg( escapeString( path ) ) );
}
@ -1631,7 +1631,7 @@ CollectionDB::applySettings()
// PROTECTED
//////////////////////////////////////////////////////////////////////////////////////////
QCString
TQCString
CollectionDB::md5sum( const TQString& artist, const TQString& album, const TQString& file )
{
KMD5 context( artist.lower().local8Bit() + album.lower().local8Bit() + file.local8Bit() );
@ -1675,12 +1675,12 @@ CollectionDB::timerEvent( TQTimerEvent* )
//////////////////////////////////////////////////////////////////////////////////////////
void
CollectionDB::fetchCover( TQWidget* parent, const TQString& artist, const TQString& album, bool noedit ) //SLOT
CollectionDB::fetchCover( TQWidget* tqparent, const TQString& artist, const TQString& album, bool noedit ) //SLOT
{
#ifdef AMAZON_SUPPORT
debug() << "Fetching cover for " << artist << " - " << album << endl;
CoverFetcher* fetcher = new CoverFetcher( parent, artist, album );
CoverFetcher* fetcher = new CoverFetcher( tqparent, artist, album );
connect( fetcher, TQT_SIGNAL(result( CoverFetcher* )), TQT_SLOT(coverFetcherResult( CoverFetcher* )) );
fetcher->setUserCanEditQuery( !noedit );
fetcher->startFetch();
@ -1755,13 +1755,13 @@ class SimilarArtistsInsertionJob : public ThreadWeaver::DependentJob
{
virtual bool doJob()
{
CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).arg( escapedArtist ) );
CollectionDB::instance()->query( TQString( "DELETE FROM related_artists WHERE artist = '%1';" ).tqarg( escapedArtist ) );
const TQString sql = "INSERT INTO related_artists ( artist, suggestion, changedate ) VALUES ( '%1', '%2', 0 );";
foreach( suggestions )
CollectionDB::instance()->insert( sql
.arg( escapedArtist )
.arg( CollectionDB::instance()->escapeString( *it ) ), NULL );
.tqarg( escapedArtist )
.tqarg( CollectionDB::instance()->escapeString( *it ) ), NULL );
return true;
}
@ -1773,10 +1773,10 @@ class SimilarArtistsInsertionJob : public ThreadWeaver::DependentJob
const TQStringList suggestions;
public:
SimilarArtistsInsertionJob( CollectionDB *parent, const TQString &s, const TQStringList &list )
: ThreadWeaver::DependentJob( parent, "SimilarArtistsInsertionJob" )
SimilarArtistsInsertionJob( CollectionDB *tqparent, const TQString &s, const TQStringList &list )
: ThreadWeaver::DependentJob( tqparent, "SimilarArtistsInsertionJob" )
, artist( s )
, escapedArtist( parent->escapeString( s ) )
, escapedArtist( tqparent->escapeString( s ) )
, suggestions( list )
{}
};

@ -44,6 +44,7 @@ class DbConnectionPool : TQPtrQueue<DbConnection>
class CollectionDB : public TQObject, public EngineObserver
{
Q_OBJECT
TQ_OBJECT
friend class SimilarArtistsInsertionJob;
@ -155,7 +156,7 @@ class CollectionDB : public TQObject, public EngineObserver
/** Saves images located on the user's filesystem */
bool setAlbumImage( const TQString& artist, const TQString& album, const KURL& url );
/** Saves images obtained from CoverFetcher */
bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString::null );
bool setAlbumImage( const TQString& artist, const TQString& album, TQImage img, const TQString& amazonUrl = TQString() );
TQString findImageByMetabundle( MetaBundle trackInformation, const uint = 1 );
TQString findImageByArtistAlbum( const TQString &artist, const TQString &album, const uint width = 1 );
@ -167,7 +168,7 @@ class CollectionDB : public TQObject, public EngineObserver
bool removeAlbumImage( const TQString &artist, const TQString &album );
//local cover methods
void addImageToAlbum( const TQString& image, TQValueList< QPair<TQString, TQString> > info, DbConnection *conn = NULL );
void addImageToAlbum( const TQString& image, TQValueList< TQPair<TQString, TQString> > info, DbConnection *conn = NULL );
TQString getImageForAlbum( const TQString& artist, const TQString& album, uint width = 0 );
TQString notAvailCover( int width = 0 );
@ -177,13 +178,13 @@ class CollectionDB : public TQObject, public EngineObserver
CollectionDB();
~CollectionDB();
TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString::null );
TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString() );
void engineTrackEnded( int finalPosition, int trackLength );
/** Manages regular folder monitoring scan */
void timerEvent( TQTimerEvent* e );
public slots:
void fetchCover( TQWidget* parent, const TQString& artist, const TQString& album, bool noedit );
void fetchCover( TQWidget* tqparent, const TQString& artist, const TQString& album, bool noedit );
void scanMonitor();
void startScan();
void stopScan();

@ -216,10 +216,10 @@ QueryBuilder::addMatch( int tables, int value, const TQString& match )
if ( !match.isEmpty() )
{
m_where += "AND ( true ";
m_where += TQString( "OR %1.%2 LIKE '" ).arg( tableName( tables ) ).arg( valueName( value ) ) + escapeString( match ) + "' ";
m_where += TQString( "OR %1.%2 LIKE '" ).tqarg( tableName( tables ) ).tqarg( valueName( value ) ) + escapeString( match ) + "' ";
if ( ( value & valName ) && match == i18n( "Unknown" ) )
m_where += TQString( "OR %1.%2 = '' " ).arg( tableName( tables ) ).arg( valueName( value ) );
m_where += TQString( "OR %1.%2 = '' " ).tqarg( tableName( tables ) ).tqarg( valueName( value ) );
m_where += " ) ";
}
@ -410,12 +410,12 @@ QueryBuilder::groupBy( int table, int value )
void
QueryBuilder::setLimit( int startPos, int length )
{
m_limit = TQString( " LIMIT %1, %2 " ).arg( startPos ).arg( length );
m_limit = TQString( " LIMIT %1, %2 " ).tqarg( startPos ).tqarg( length );
}
void
QueryBuilder::initSQLDrag()
QueryBuilder::initSTQLDrag()
{
clear();
addReturnValue( QueryBuilder::tabAlbum, QueryBuilder::valName );
@ -448,7 +448,7 @@ QueryBuilder::buildQuery()
}
// get the builded SQL-Query (used in smartplaylisteditor soon)
QString
TQString
QueryBuilder::getQuery()
{
if ( m_query.isEmpty())
@ -458,7 +458,7 @@ QueryBuilder::getQuery()
return m_query;
}
QStringList
TQStringList
QueryBuilder::run()
{
buildQuery();
@ -484,7 +484,7 @@ QueryBuilder::clear()
}
QString
TQString
QueryBuilder::tableName( int table )
{
TQString tables;
@ -501,7 +501,7 @@ QueryBuilder::tableName( int table )
}
QString
TQString
QueryBuilder::valueName( int value )
{
TQString values;
@ -528,7 +528,7 @@ QueryBuilder::valueName( int value )
return values;
}
QString
TQString
QueryBuilder::functionName( int value )
{
TQString function;

@ -72,10 +72,10 @@ class QueryBuilder
#ifdef USE_MYSQL
// We have to escape "\" for mysql, but can't do so for sqlite
(m_dbConnType == DbConnection::mysql)
? string.replace("\\", "\\\\").replace( '\'', "''" )
? string.tqreplace("\\", "\\\\").tqreplace( '\'', "''" )
:
#endif
string.replace( '\'', "''" );
string.tqreplace( '\'', "''" );
}
void addReturnValue( int table, int value );
@ -101,7 +101,7 @@ class QueryBuilder
void groupBy( int table, int value );
void setLimit( int startPos, int length );
void initSQLDrag();
void initSTQLDrag();
void buildQuery();
TQString getQuery();
TQString query() { buildQuery(); return m_query; };

@ -4,7 +4,7 @@
// (c) 2005 Ian Monroe <ian@monroe.nu>
// See COPYING file for licensing information.
#define DEBUG_PREFIX "SQLite-DBEngine"
#define DEBUG_PREFIX "STQLite-DBEngine"
#include "app.h"
#include "amarok.h"
@ -43,11 +43,11 @@ SqliteDbEngine::SqliteDbEngine()
{
TQString format;
file.readLine( format, 50 );
if ( !format.startsWith( "SQLite format 3" ) )
if ( !format.startsWith( "STQLite format 3" ) )
{
warning() << "Database versions incompatible. Removing and rebuilding database.\n";
}
else if ( sqlite3_open( path, &m_db ) != SQLITE_OK )
else if ( sqlite3_open( path, &m_db ) != STQLITE_OK )
{
warning() << "Database file corrupt. Removing and rebuilding database.\n";
sqlite3_close( m_db );
@ -60,20 +60,20 @@ SqliteDbEngine::SqliteDbEngine()
{
// Remove old db file; create new
TQFile::remove( path );
if ( sqlite3_open( path, &m_db ) == SQLITE_OK )
if ( sqlite3_open( path, &m_db ) == STQLITE_OK )
{
m_initialized = true;
}
}
if ( m_initialized )
{
if( sqlite3_create_function(m_db, "rand", 0, SQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != SQLITE_OK )
if( sqlite3_create_function(m_db, "rand", 0, STQLITE_UTF8, NULL, sqlite_rand, NULL, NULL) != STQLITE_OK )
m_initialized = false;
if( sqlite3_create_function(m_db, "power", 2, SQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != SQLITE_OK )
if( sqlite3_create_function(m_db, "power", 2, STQLITE_UTF8, NULL, sqlite_power, NULL, NULL) != STQLITE_OK )
m_initialized = false;
}
//optimization for speeding up SQLite
//optimization for speeding up STQLite
query( "PRAGMA default_synchronous = OFF;" );
}
@ -94,7 +94,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
//compile SQL program to virtual machine
error = sqlite3_prepare( m_db, statement.utf8(), statement.length(), &stmt, &tail );
if ( error != SQLITE_OK )
if ( error != STQLITE_OK )
{
Debug::error() << k_funcinfo << " sqlite3_compile error:" << endl;
Debug::error() << sqlite3_errmsg( m_db ) << endl;
@ -110,7 +110,7 @@ TQStringList SqliteDbEngine::query( const TQString& statement )
{
error = sqlite3_step( stmt );
if ( error == SQLITE_BUSY )
if ( error == STQLITE_BUSY )
{
if ( busyCnt++ > 20 ) {