--0015175cae183ed4ab047261efa2 Content-Type: text/plain; charset=ISO-8859-1 Urghh... magic prefixes. My fault for allowing the two to get confused though. If I understand this correctly now, this should be fixable by simply renaming the editable dialog items to remove the "kcfg_" at the start. Then it should read/write using normal KConfig. Also, I create do a patch to use KConfigXT properly. That's what most of the other configuration dialogs seem to use. - John 2009/8/30 Mark Kretschmann > I'm sorry, but this patch seems badly broken. It's using config > options that don't exist, and mixes KConfigXT with classic KConfig. I > can't really see how that's supposed to work. > > The whole "MySQL" group is missing in amarokconfig.kcfg. > > Users with debug builds of KDElibs are getting an instant crash when > opening the dialog: > > amarok(4185)/kdecore (KConfigDialogManager) > KConfigDialogManager::parseChildren: A widget named ' > "kcfg_UseInternalDB" ' was found but there is no setting named ' > "UseInternalDB" ' > > > Here's some documentation on KConfigXT: > http://developer.kde.org/documentation/tutorials/kconfigxt/kconfigxt.html > > > > On Sun, Aug 30, 2009 at 3:24 AM, Seb Ruiz wrote: > > commit 698fd3c2b47f876b5ef053d0028d594ca8e34df9 > > Author: Seb Ruiz > > AuthorDate: Sun Aug 30 10:44:52 2009 +1000 > > Commit: Seb Ruiz > > CommitDate: Sun Aug 30 10:44:52 2009 +1000 > > > > MySQL database configuration support. Thanks to John Atkinson for the > patch! > > CCMAIL: john@fauxnetic.co.uk > > > > diff --git a/ChangeLog b/ChangeLog > > index 5a268f6..cc9efe6 100644 > > --- a/ChangeLog > > +++ b/ChangeLog > > @@ -62,8 +62,7 @@ VERSION 2.2-beta1 > > The video can be appended to the playlist, and rendered within the > applet. > > * Photo applet to show images from Flickr, with customizable > animations. > > * Customizable user interface using dock widgets. > > - * Support for external MySQL database. See > > - http://amarok.kde.org/wiki/MySQL_Server. > > + * Support for external MySQL database. > > * GHNS integration for downloading and installing Context applets. > > * Support for Context applets to be written in QtScript. > > * Custom Dynamic Playlists using Last.fm. > > diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt > > index 323fe0d..cab1d28 100644 > > --- a/src/CMakeLists.txt > > +++ b/src/CMakeLists.txt > > @@ -187,6 +187,7 @@ set(libconfigdialog_SRCS > > configdialog/dialogs/OsdConfig.cpp > > configdialog/dialogs/PlaybackConfig.cpp > > configdialog/dialogs/ServiceConfig.cpp > > + configdialog/dialogs/DatabaseConfig.cpp > > ) > > > > kde4_add_ui_files(libconfigdialog_SRCS > > @@ -194,6 +195,7 @@ kde4_add_ui_files(libconfigdialog_SRCS > > configdialog/dialogs/GeneralConfig.ui > > configdialog/dialogs/OsdConfig.ui > > configdialog/dialogs/PlaybackConfig.ui > > + configdialog/dialogs/DatabaseConfig.ui > > ) > > > > set(libbrowserframework_SRCS > > diff --git a/src/configdialog/ConfigDialog.cpp > b/src/configdialog/ConfigDialog.cpp > > index c18239d..b53ae4f 100644 > > --- a/src/configdialog/ConfigDialog.cpp > > +++ b/src/configdialog/ConfigDialog.cpp > > @@ -27,6 +27,7 @@ > > #include "OsdConfig.h" > > #include "PlaybackConfig.h" > > #include "ServiceConfig.h" > > +#include "DatabaseConfig.h" > > > > #include > > > > @@ -47,6 +48,7 @@ Amarok2ConfigDialog::Amarok2ConfigDialog( QWidget > *parent, const char* name, KCo > > ConfigDialogBase* services = new ServiceConfig( this ); > > ConfigDialogBase* playback = new PlaybackConfig( this ); > > ConfigDialogBase* osd = new OsdConfig( this ); > > + ConfigDialogBase* database = new DatabaseConfig( this ); > > > > connect( general, SIGNAL( lockLayout( bool ) ), The::mainWindow(), > SLOT ( setLayoutLocked( bool ) ) ); > > > > @@ -57,6 +59,7 @@ Amarok2ConfigDialog::Amarok2ConfigDialog( QWidget > *parent, const char* name, KCo > > addPage( services, i18n( "Internet Services" ), "services-amarok", > i18n( "Configure Services" ) ); > > addPage( playback, i18n( "Playback" ), > "preferences-media-playback-amarok", i18n( "Configure Playback" ) ); > > addPage( osd, i18n( "On Screen Display" ), > "preferences-indicator-amarok", i18n( "Configure On-Screen-Display" ) ); > > + addPage( database, i18n( "Database" ), > "preferences-database-amarok", i18n( "Configure Database" ) ); > > // addPage( mediadevice, i18n( "Media Devices" ), > "preferences-multimedia-player-amarok", i18n( "Configure Portable Player > Support" ) ); > > > > setButtons( Help | Ok | Apply | Cancel ); > > diff --git a/src/configdialog/dialogs/DatabaseConfig.cpp > b/src/configdialog/dialogs/DatabaseConfig.cpp > > new file mode 100644 > > index 0000000..8088d8e > > --- /dev/null > > +++ b/src/configdialog/dialogs/DatabaseConfig.cpp > > @@ -0,0 +1,159 @@ > > > +/**************************************************************************************** > > + * Copyright (c) 2009 John Atkinson > * > > + * > * > > + * This program is free software; you can redistribute it and/or modify > it under * > > + * the terms of the GNU General Public License as published by the Free > Software * > > + * Foundation; either version 2 of the License, or (at your option) any > later * > > + * version. > * > > + * > * > > + * This program is distributed in the hope that it will be useful, but > WITHOUT ANY * > > + * WARRANTY; without even the implied warranty of MERCHANTABILITY or > FITNESS FOR A * > > + * PARTICULAR PURPOSE. See the GNU General Pulic License for more > details. * > > + * > * > > + * You should have received a copy of the GNU General Public License > along with * > > + * this program. If not, see . > * > > + > ****************************************************************************************/ > > + > > +#include "DatabaseConfig.h" > > + > > +#include "Amarok.h" > > +#include "Debug.h" > > + > > +#include > > + > > + > > +DatabaseConfig::DatabaseConfig( QWidget* parent ) > > + : ConfigDialogBase( parent ) > > +{ > > + setupUi( this ); > > + readConfiguration(); > > + > > + connect( kcfg_UseInternalDB, SIGNAL( stateChanged(int) ), SLOT( > toggleExternalConfigAvailable(int) ) ); > > + > > + connect( kcfg_DBName, SIGNAL( editingFinished() ), SLOT( > updateSQLQuery() ) ); > > + connect( kcfg_Username, SIGNAL( editingFinished() ), SLOT( > updateSQLQuery() ) ); > > + connect( kcfg_Server, SIGNAL( editingFinished() ), SLOT( > updateSQLQuery() ) ); > > + > > +} > > + > > +DatabaseConfig::~DatabaseConfig() > > +{} > > + > > + > > +/////////////////////////////////////////////////////////////// > > +// REIMPLEMENTED METHODS from ConfigDialogBase > > +/////////////////////////////////////////////////////////////// > > + > > +bool > > +DatabaseConfig::hasChanged() > > +{ > > + return false; > > +} > > + > > +bool > > +DatabaseConfig::isDefault() > > +{ > > + return false; > > +} > > + > > +void > > +DatabaseConfig::updateSettings() > > +{ > > + writeConfiguration(); > > +} > > + > > + > > +/////////////////////////////////////////////////////////////// > > +// PRIVATE METHODS > > +/////////////////////////////////////////////////////////////// > > + > > +void > > +DatabaseConfig::readConfiguration() > > +{ > > + KConfigGroup config = Amarok::config( "MySQL" ); > > + > > + kcfg_UseInternalDB->setChecked( !config.readEntry( "UseServer", > false ) ); > > + > > + kcfg_Server->setText( config.readEntry( "Host", "localhost" > ).toUtf8() ); > > + kcfg_Port->setValue( config.readEntry( "Port", "3306" ).toInt() ); > > + kcfg_DBName->setText( config.readEntry( "Database", "amarokdb" > ).toUtf8() ); > > + > > + kcfg_Username->setText( config.readEntry( "User", "amarokuser" > ).toUtf8() ); > > + kcfg_Password->setText( config.readEntry( "Password", "" ).toUtf8() > ); > > + > > + > > + toggleExternalConfigAvailable(kcfg_UseInternalDB->checkState()); > > + updateSQLQuery(); > > +} > > + > > +void > > +DatabaseConfig::writeConfiguration() > > +{ > > + KConfigGroup config = Amarok::config( "MySQL" ); > > + > > + bool useExternal = (kcfg_UseInternalDB->checkState() != > Qt::Checked); > > + > > + config.writeEntry( "UseServer", useExternal ); > > + > > + if(useExternal) > > + { > > + config.writeEntry( "Host", kcfg_Server->text() ); > > + config.writeEntry( "Port", kcfg_Port->value() ); > > + config.writeEntry( "Database", kcfg_DBName->text() ); > > + config.writeEntry( "User", kcfg_Username->text() ); > > + config.writeEntry( "Password", kcfg_Password->text() ); > > + } > > +} > > + > > + > > +void > > +DatabaseConfig::toggleExternalConfigAvailable( int checkBoxState ) > //SLOT > > +{ > > + bool enableExternalConfig = (checkBoxState != Qt::Checked); > > + > > + kcfg_DatabaseEngine->setEnabled( enableExternalConfig ); > > + group_Connection->setVisible( enableExternalConfig ); > > + > > +} > > + > > +void > > +DatabaseConfig::updateSQLQuery() //SLOT > > +{ > > + if(isSQLInfoPresent()) > > + { > > + // Query template: > > + // GRANT ALL ON amarokdb.* TO 'amarokuser'@'localhost' > IDENTIFIED BY 'mypassword'; FLUSH PRIVILEGES; > > + > > + // Don't print the actual password! > > + QString examplePassword = i18nc( "A default password for > insertion into an example SQL command (so as not to print the real one). To > be manually replaced by the user.", > > + "password" ); > > + > > + text_SQL->setPlainText( "GRANT ALL ON " + kcfg_DBName->text() + > ".* " + > > + "TO '" + kcfg_Username->text() + "'@'" + > kcfg_Server->text() + "' " + > > + "IDENTIFIED BY '" + examplePassword + > "';\n" + > > + "FLUSH PRIVILEGES;" > > + ); > > + } > > + else > > + { > > + text_SQL->setPlainText(""); > > + } > > + > > +} > > + > > + > > +bool > > +DatabaseConfig::isSQLInfoPresent() > > +{ > > + if( kcfg_DBName->text().isEmpty() || kcfg_Username->text().isEmpty() > || kcfg_Server->text().isEmpty() ) > > + { > > + return false; > > + } > > + > > + return true; > > +} > > + > > + > > +#include "DatabaseConfig.moc" > > + > > + > > diff --git a/src/configdialog/dialogs/DatabaseConfig.h > b/src/configdialog/dialogs/DatabaseConfig.h > > new file mode 100644 > > index 0000000..d7e1b1d > > --- /dev/null > > +++ b/src/configdialog/dialogs/DatabaseConfig.h > > @@ -0,0 +1,51 @@ > > > +/**************************************************************************************** > > + * Copyright (c) 2009 John Atkinson > * > > + * > * > > + * This program is free software; you can redistribute it and/or modify > it under * > > + * the terms of the GNU General Public License as published by the Free > Software * > > + * Foundation; either version 2 of the License, or (at your option) any > later * > > + * version. > * > > + * > * > > + * This program is distributed in the hope that it will be useful, but > WITHOUT ANY * > > + * WARRANTY; without even the implied warranty of MERCHANTABILITY or > FITNESS FOR A * > > + * PARTICULAR PURPOSE. See the GNU General Pulic License for more > details. * > > + * > * > > + * You should have received a copy of the GNU General Public License > along with * > > + * this program. If not, see . > * > > + > ****************************************************************************************/ > > + > > +#ifndef DATABASECONFIG_H > > +#define DATABASECONFIG_H > > + > > +#include "ui_DatabaseConfig.h" > > +#include "ConfigDialogBase.h" > > + > > + > > +class DatabaseConfig : public ConfigDialogBase, public Ui_DatabaseConfig > > +{ > > + Q_OBJECT > > + > > + public: > > + DatabaseConfig( QWidget* parent ); > > + virtual ~DatabaseConfig(); > > + > > + virtual bool hasChanged(); > > + virtual bool isDefault(); > > + virtual void updateSettings(); > > + > > + protected: > > + void readConfiguration(); > > + void writeConfiguration(); > > + > > + private Q_SLOTS: > > + void toggleExternalConfigAvailable( int checkBoxState ); > > + void updateSQLQuery(); > > + > > + private: > > + bool isSQLInfoPresent(); > > +}; > > + > > + > > +#endif > > + > > + > > diff --git a/src/configdialog/dialogs/DatabaseConfig.ui > b/src/configdialog/dialogs/DatabaseConfig.ui > > new file mode 100644 > > index 0000000..f874364 > > --- /dev/null > > +++ b/src/configdialog/dialogs/DatabaseConfig.ui > > @@ -0,0 +1,282 @@ > > + > > + > > + DatabaseConfig > > + > > + > > + > > + 0 > > + 0 > > + 440 > > + 426 > > + > > + > > + > > + > > + > > + > > + Use &internal database (default) > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + 0 > > + 0 > > + > > + > > + > > + > > + MySQL > > + > > + > > + > > + > > + > > + > > + > > + &External database engine: > > + > > + > > + kcfg_DatabaseEngine > > + > > + > > + > > + > > + > > + > > + > > + > > + Connection Settings > > + > > + > > + > > + > > + > > + > > + > > + &Server: > > + > > + > > + Qt::AutoText > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + kcfg_Server > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + P&ort: > > + > > + > > + Qt::AutoText > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + kcfg_Port > > + > > + > > + > > + > > + > > + > > + 65535 > > + > > + > > + > > + > > + > > + > > + &Username: > > + > > + > > + Qt::AutoText > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + kcfg_Username > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + QLineEdit::Password > > + > > + > > + > > + > > + > > + > > + &Password: > > + > > + > > + Qt::AutoText > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + kcfg_Password > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + &Database: > > + > > + > > + Qt::AutoText > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + kcfg_DBName > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + QFrame::StyledPanel > > + > > + > > + QFrame::Raised > > + > > + > > + > > + > > + > > + > > + 8 > > + > > + > > + > > + Amarok expects the above database and user account > to already exist. This user also requires full access to the > database. > > + > > + > > + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter > > + > > + > > + true > > + > > + > > + > > + > > + > > + > > + > > + 8 > > + > > + > > + > > + Access rights can be assigned with the following > S&QL commands (after replacing the password with the correct > one): > > + > > + > > + true > > + > > + > > + text_SQL > > + > > + > > + > > + > > + > > + > > + > > + 0 > > + 0 > > + > > + > > + > > + > > + 16777215 > > + 50 > > + > > + > > + > > + > > + 6 > > + > > + > > + > > + IBeamCursor > > + > > + > > + false > > + > > + > > + true > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + > > + Qt::Vertical > > + > > + > > + > > + 20 > > + 40 > > + > > + > > + > > + > > + > > + > > + > > + > > + > > > > > > > > > -- > Mark Kretschmann > Amarok Developer > www.kde.org - amarok.kde.org > --0015175cae183ed4ab047261efa2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Urghh... magic prefixes. My fault for allowing the two to get confused = though.
If I understand this correctly now, this should be fixable by si= mply renaming the editable dialog items to remove the "kcfg_" at = the start. Then it should read/write using normal KConfig.

Also, I create do a patch to use KConfigXT properly. That's what mo= st of the other configuration dialogs seem to use.

- John

2009/8/30 Mark Kretschmann &l= t;kretschmann@kde.org>=
I'm sorry, bu= t this patch seems badly broken. It's using config
options that don't exist, and mixes KConfigXT with classic KConfig. I can't really see how that's supposed to work.

The whole "MySQL" group is missing in amarokconfig.kcfg.

Users with debug builds of KDElibs are getting an instant crash when
opening the dialog:

amarok(4185)/kdecore (KConfigDialogManager)
KConfigDialogManager::parseChildren: A widget named '
"kcfg_UseInternalDB" ' was found but there is no setting name= d '
"UseInternalDB" '


Here's some documentation on KConfigXT:
http://developer.kde.org/documentation/tutoria= ls/kconfigxt/kconfigxt.html



On Sun, Aug 30, 2009 at 3:24 AM, Seb Ruiz<ruiz@kde.org> wrote:
> commit 698fd3c2b47f876b5ef053d0028d594ca8e34df9
> Author: =A0 =A0 Seb Ruiz <ruiz@kde.= org>
> AuthorDate: Sun Aug 30 10:44:52 2009 +1000
> Commit: =A0 =A0 Seb Ruiz <ruiz@kde.= org>
> CommitDate: Sun Aug 30 10:44:52 2009 +1000
>
> =A0 =A0MySQL database configuration support. Thanks to John Atkinson f= or the patch!
> =A0 =A0CCMAIL: john@fauxnetic.= co.uk
>
> diff --git a/ChangeLog b/ChangeLog
> index 5a268f6..cc9efe6 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -62,8 +62,7 @@ VERSION 2.2-beta1
> =A0 =A0 =A0 The video can be appended to the playlist, and rendered wi= thin the applet.
> =A0 =A0 * Photo applet to show images from Flickr, with customizable a= nimations.
> =A0 =A0 * Customizable user interface using dock widgets.
> - =A0 =A0* Support for external MySQL database. See
> - =A0 =A0 =A0http://amarok.kde.org/wiki/MySQL_Server.
> + =A0 =A0* Support for external MySQL database.
> =A0 =A0 * GHNS integration for downloading and installing Context appl= ets.
> =A0 =A0 * Support for Context applets to be written in QtScript.
> =A0 =A0 * Custom Dynamic Playlists using Last.fm.
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index 323fe0d..cab1d28 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -187,6 +187,7 @@ set(libconfigdialog_SRCS
> =A0 =A0 configdialog/dialogs/OsdConfig.cpp
> =A0 =A0 configdialog/dialogs/PlaybackConfig.cpp
> =A0 =A0 configdialog/dialogs/ServiceConfig.cpp
> + =A0 =A0configdialog/dialogs/DatabaseConfig.cpp
> =A0)
>
> =A0kde4_add_ui_files(libconfigdialog_SRCS
> @@ -194,6 +195,7 @@ kde4_add_ui_files(libconfigdialog_SRCS
> =A0 =A0 configdialog/dialogs/GeneralConfig.ui
> =A0 =A0 configdialog/dialogs/OsdConfig.ui
> =A0 =A0 configdialog/dialogs/PlaybackConfig.ui
> + =A0 =A0configdialog/dialogs/DatabaseConfig.ui
> =A0)
>
> =A0set(libbrowserframework_SRCS
> diff --git a/src/configdialog/ConfigDialog.cpp b/src/configdialog/Conf= igDialog.cpp
> index c18239d..b53ae4f 100644
> --- a/src/configdialog/ConfigDialog.cpp
> +++ b/src/configdialog/ConfigDialog.cpp
> @@ -27,6 +27,7 @@
> =A0#include "OsdConfig.h"
> =A0#include "PlaybackConfig.h"
> =A0#include "ServiceConfig.h"
> +#include "DatabaseConfig.h"
>
> =A0#include <KLocale>
>
> @@ -47,6 +48,7 @@ Amarok2ConfigDialog::Amarok2ConfigDialog( QWidget *p= arent, const char* name, KCo
> =A0 =A0 ConfigDialogBase* services =A0 =A0=3D new ServiceConfig( this = );
> =A0 =A0 ConfigDialogBase* playback =A0 =A0=3D new PlaybackConfig( this= );
> =A0 =A0 ConfigDialogBase* osd =A0 =A0 =A0 =A0 =3D new OsdConfig( this = );
> + =A0 =A0ConfigDialogBase* database =A0 =A0=3D new DatabaseConfig( thi= s );
>
> =A0 =A0 connect( general, SIGNAL( lockLayout( bool ) ), The::mainWindo= w(), SLOT ( setLayoutLocked( bool ) ) );
>
> @@ -57,6 +59,7 @@ Amarok2ConfigDialog::Amarok2ConfigDialog( QWidget *p= arent, const char* name, KCo
> =A0 =A0 addPage( services, =A0 =A0i18n( "Internet Services" = ), "services-amarok", i18n( "Configure Services" ) ); > =A0 =A0 addPage( playback, =A0 =A0i18n( "Playback" ), "= preferences-media-playback-amarok", i18n( "Configure Playback&quo= t; ) );
> =A0 =A0 addPage( osd, =A0 =A0 =A0 =A0 i18n( "On Screen Display&qu= ot; ), "preferences-indicator-amarok", i18n( "Configure On-S= creen-Display" ) );
> + =A0 =A0addPage( database, =A0 =A0i18n( "Database" ), "= ;preferences-database-amarok", i18n( "Configure Database" ) = );
> =A0// =A0 =A0addPage( mediadevice, i18n( "Media Devices" ), = "preferences-multimedia-player-amarok", i18n( "Configure Por= table Player Support" ) );
>
> =A0 =A0 setButtons( Help | Ok | Apply | Cancel );
> diff --git a/src/configdialog/dialogs/DatabaseConfig.cpp b/src/configd= ialog/dialogs/DatabaseConfig.cpp
> new file mode 100644
> index 0000000..8088d8e
> --- /dev/null
> +++ b/src/configdialog/dialogs/DatabaseConfig.cpp
> @@ -0,0 +1,159 @@
> +/********************************************************************= ********************
> + * Copyright (c) 2009 John Atkinson <john@fauxnetic.co.uk> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0*
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * This program is free software; you can redistribute it and/or modi= fy it under =A0 =A0 =A0 =A0*
> + * the terms of the GNU General Public License as published by the Fr= ee Software =A0 =A0 =A0 =A0*
> + * Foundation; either version 2 of the License, or (at your option) a= ny later =A0 =A0 =A0 =A0 =A0 *
> + * version. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 *
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * This program is distributed in the hope that it will be useful, bu= t WITHOUT ANY =A0 =A0 =A0*
> + * WARRANTY; without even the implied warranty of MERCHANTABILITY or = FITNESS FOR A =A0 =A0 =A0*
> + * PARTICULAR PURPOSE. See the GNU General Pulic License for more det= ails. =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * You should have received a copy of the GNU General Public License = along with =A0 =A0 =A0 =A0 *
> + * this program. =A0If not, see <http://www.gnu.org/licenses/>. =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 *
> + ********************************************************************= ********************/
> +
> +#include "DatabaseConfig.h"
> +
> +#include "Amarok.h"
> +#include "Debug.h"
> +
> +#include <KCMultiDialog>
> +
> +
> +DatabaseConfig::DatabaseConfig( QWidget* parent )
> + =A0 =A0: ConfigDialogBase( parent )
> +{
> + =A0 =A0setupUi( this );
> + =A0 =A0readConfiguration();
> +
> + =A0 =A0connect( kcfg_UseInternalDB, SIGNAL( stateChanged(int) ), SLO= T( toggleExternalConfigAvailable(int) ) );
> +
> + =A0 =A0connect( kcfg_DBName, =A0 SIGNAL( editingFinished() ), SLOT( = updateSQLQuery() ) );
> + =A0 =A0connect( kcfg_Username, SIGNAL( editingFinished() ), SLOT( up= dateSQLQuery() ) );
> + =A0 =A0connect( kcfg_Server, =A0 SIGNAL( editingFinished() ), SLOT( = updateSQLQuery() ) );
> +
> +}
> +
> +DatabaseConfig::~DatabaseConfig()
> +{}
> +
> +
> +///////////////////////////////////////////////////////////////
> +// REIMPLEMENTED METHODS from ConfigDialogBase
> +///////////////////////////////////////////////////////////////
> +
> +bool
> +DatabaseConfig::hasChanged()
> +{
> + =A0 =A0return false;
> +}
> +
> +bool
> +DatabaseConfig::isDefault()
> +{
> + =A0 =A0return false;
> +}
> +
> +void
> +DatabaseConfig::updateSettings()
> +{
> + =A0 =A0writeConfiguration();
> +}
> +
> +
> +///////////////////////////////////////////////////////////////
> +// PRIVATE METHODS
> +///////////////////////////////////////////////////////////////
> +
> +void
> +DatabaseConfig::readConfiguration()
> +{
> + =A0 =A0KConfigGroup config =3D Amarok::config( "MySQL" );<= br> > +
> + =A0 =A0kcfg_UseInternalDB->setChecked( !config.readEntry( "U= seServer", false ) );
> +
> + =A0 =A0kcfg_Server->setText( config.readEntry( "Host", = "localhost" ).toUtf8() );
> + =A0 =A0kcfg_Port->setValue( config.readEntry( "Port", &= quot;3306" ).toInt() );
> + =A0 =A0kcfg_DBName->setText( config.readEntry( "Database&quo= t;, "amarokdb" ).toUtf8() );
> +
> + =A0 =A0kcfg_Username->setText( config.readEntry( "User"= , "amarokuser" ).toUtf8() );
> + =A0 =A0kcfg_Password->setText( config.readEntry( "Password&q= uot;, "" ).toUtf8() );
> +
> +
> + =A0 =A0toggleExternalConfigAvailable(kcfg_UseInternalDB->checkSta= te());
> + =A0 =A0updateSQLQuery();
> +}
> +
> +void
> +DatabaseConfig::writeConfiguration()
> +{
> + =A0 =A0KConfigGroup config =3D Amarok::config( "MySQL" );<= br> > +
> + =A0 =A0bool useExternal =3D (kcfg_UseInternalDB->checkState() != =3D Qt::Checked);
> +
> + =A0 =A0config.writeEntry( "UseServer", useExternal );
> +
> + =A0 =A0if(useExternal)
> + =A0 =A0{
> + =A0 =A0 =A0 =A0config.writeEntry( "Host", =A0 =A0 =A0kcfg_= Server->text() );
> + =A0 =A0 =A0 =A0config.writeEntry( "Port", =A0 =A0 =A0kcfg_= Port->value() );
> + =A0 =A0 =A0 =A0config.writeEntry( "Database", =A0kcfg_DBNa= me->text() );
> + =A0 =A0 =A0 =A0config.writeEntry( "User", =A0 =A0 =A0kcfg_= Username->text() );
> + =A0 =A0 =A0 =A0config.writeEntry( "Password", =A0kcfg_Pass= word->text() );
> + =A0 =A0}
> +}
> +
> +
> +void
> +DatabaseConfig::toggleExternalConfigAvailable( int checkBoxState ) //= SLOT
> +{
> + =A0 =A0bool enableExternalConfig =3D (checkBoxState !=3D Qt::Checked= );
> +
> + =A0 =A0kcfg_DatabaseEngine->setEnabled( enableExternalConfig ); > + =A0 =A0group_Connection->setVisible( enableExternalConfig );
> +
> +}
> +
> +void
> +DatabaseConfig::updateSQLQuery() //SLOT
> +{
> + =A0 =A0if(isSQLInfoPresent())
> + =A0 =A0{
> + =A0 =A0 =A0 =A0// Query template:
> + =A0 =A0 =A0 =A0// GRANT ALL ON amarokdb.* TO 'amarokuser'@&#= 39;localhost' IDENTIFIED BY 'mypassword'; FLUSH PRIVILEGES;
> +
> + =A0 =A0 =A0 =A0// Don't print the actual password!
> + =A0 =A0 =A0 =A0QString examplePassword =3D i18nc( "A default pa= ssword for insertion into an example SQL command (so as not to print the re= al one). To be manually replaced by the user.",
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 "password" );
> +
> + =A0 =A0 =A0 =A0text_SQL->setPlainText( "GRANT ALL ON " = + kcfg_DBName->text() + ".* " +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"= ;TO '" + kcfg_Username->text() + "'@'" + kcfg= _Server->text() + "' " +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"= ;IDENTIFIED BY '" + examplePassword + "';\n" +
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"= ;FLUSH PRIVILEGES;"
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0); > + =A0 =A0}
> + =A0 =A0else
> + =A0 =A0{
> + =A0 =A0 =A0 =A0text_SQL->setPlainText("");
> + =A0 =A0}
> +
> +}
> +
> +
> +bool
> +DatabaseConfig::isSQLInfoPresent()
> +{
> + =A0 =A0if( kcfg_DBName->text().isEmpty() || kcfg_Username->tex= t().isEmpty() || kcfg_Server->text().isEmpty() )
> + =A0 =A0{
> + =A0 =A0 =A0 =A0return false;
> + =A0 =A0}
> +
> + =A0 =A0return true;
> +}
> +
> +
> +#include "DatabaseConfig.moc"
> +
> +
> diff --git a/src/configdialog/dialogs/DatabaseConfig.h b/src/configdia= log/dialogs/DatabaseConfig.h
> new file mode 100644
> index 0000000..d7e1b1d
> --- /dev/null
> +++ b/src/configdialog/dialogs/DatabaseConfig.h
> @@ -0,0 +1,51 @@
> +/********************************************************************= ********************
> + * Copyright (c) 2009 John Atkinson <john@fauxnetic.co.uk> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0*
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * This program is free software; you can redistribute it and/or modi= fy it under =A0 =A0 =A0 =A0*
> + * the terms of the GNU General Public License as published by the Fr= ee Software =A0 =A0 =A0 =A0*
> + * Foundation; either version 2 of the License, or (at your option) a= ny later =A0 =A0 =A0 =A0 =A0 *
> + * version. =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 *
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * This program is distributed in the hope that it will be useful, bu= t WITHOUT ANY =A0 =A0 =A0*
> + * WARRANTY; without even the implied warranty of MERCHANTABILITY or = FITNESS FOR A =A0 =A0 =A0*
> + * PARTICULAR PURPOSE. See the GNU General Pulic License for more det= ails. =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*
> + * You should have received a copy of the GNU General Public License = along with =A0 =A0 =A0 =A0 *
> + * this program. =A0If not, see <http://www.gnu.org/licenses/>. =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 *
> + ********************************************************************= ********************/
> +
> +#ifndef DATABASECONFIG_H
> +#define DATABASECONFIG_H
> +
> +#include "ui_DatabaseConfig.h"
> +#include "ConfigDialogBase.h"
> +
> +
> +class DatabaseConfig : public ConfigDialogBase, public Ui_DatabaseCon= fig
> +{
> + =A0 =A0Q_OBJECT
> +
> + =A0 =A0public:
> + =A0 =A0 =A0 =A0DatabaseConfig( QWidget* parent );
> + =A0 =A0 =A0 =A0virtual ~DatabaseConfig();
> +
> + =A0 =A0 =A0 =A0virtual bool hasChanged();
> + =A0 =A0 =A0 =A0virtual bool isDefault();
> + =A0 =A0 =A0 =A0virtual void updateSettings();
> +
> + =A0 =A0protected:
> + =A0 =A0 =A0 =A0void readConfiguration();
> + =A0 =A0 =A0 =A0void writeConfiguration();
> +
> + =A0 =A0private Q_SLOTS:
> + =A0 =A0 =A0 =A0void toggleExternalConfigAvailable( int checkBoxState= );
> + =A0 =A0 =A0 =A0void updateSQLQuery();
> +
> + =A0 =A0private:
> + =A0 =A0 =A0 =A0bool isSQLInfoPresent();
> +};
> +
> +
> +#endif
> +
> +
> diff --git a/src/configdialog/dialogs/DatabaseConfig.ui b/src/configdi= alog/dialogs/DatabaseConfig.ui
> new file mode 100644
> index 0000000..f874364
> --- /dev/null
> +++ b/src/configdialog/dialogs/DatabaseConfig.ui
> @@ -0,0 +1,282 @@
> +<?xml version=3D"1.0" encoding=3D"UTF-8"?><= br> > +<ui version=3D"4.0">
> + <class>DatabaseConfig</class>
> + <widget class=3D"QWidget" name=3D"DatabaseConfig&q= uot;>
> + =A0<property name=3D"geometry">
> + =A0 <rect>
> + =A0 =A0<x>0</x>
> + =A0 =A0<y>0</y>
> + =A0 =A0<width>440</width>
> + =A0 =A0<height>426</height>
> + =A0 </rect>
> + =A0</property>
> + =A0<layout class=3D"QVBoxLayout" name=3D"verticalL= ayout_2">
> + =A0 <item>
> + =A0 =A0<widget class=3D"QCheckBox" name=3D"kcfg_Us= eInternalDB">
> + =A0 =A0 <property name=3D"text">
> + =A0 =A0 =A0<string>Use &amp;internal database (default)<= ;/string>
> + =A0 =A0 </property>
> + =A0 =A0</widget>
> + =A0 </item>
> + =A0 <item>
> + =A0 =A0<layout class=3D"QGridLayout" name=3D"gridL= ayout_4">
> + =A0 =A0 <item row=3D"0" column=3D"1">
> + =A0 =A0 =A0<widget class=3D"QComboBox" name=3D"kcf= g_DatabaseEngine">
> + =A0 =A0 =A0 <property name=3D"sizePolicy">
> + =A0 =A0 =A0 =A0<sizepolicy hsizetype=3D"Expanding" vsiz= etype=3D"Fixed">
> + =A0 =A0 =A0 =A0 <horstretch>0</horstretch>
> + =A0 =A0 =A0 =A0 <verstretch>0</verstretch>
> + =A0 =A0 =A0 =A0</sizepolicy>
> + =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 <item>
> + =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 <string>MySQL</string>
> + =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 </item>
> + =A0 =A0 =A0</widget>
> + =A0 =A0 </item>
> + =A0 =A0 <item row=3D"0" column=3D"0">
> + =A0 =A0 =A0<widget class=3D"QLabel" name=3D"label_= DatabaseEngine">
> + =A0 =A0 =A0 <property name=3D"text">
> + =A0 =A0 =A0 =A0<string>&amp;External database engine:</= string>
> + =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 <property name=3D"buddy">
> + =A0 =A0 =A0 =A0<cstring>kcfg_DatabaseEngine</cstring> > + =A0 =A0 =A0 </property>
> + =A0 =A0 =A0</widget>
> + =A0 =A0 </item>
> + =A0 =A0</layout>
> + =A0 </item>
> + =A0 <item>
> + =A0 =A0<widget class=3D"QGroupBox" name=3D"group_C= onnection">
> + =A0 =A0 <property name=3D"title">
> + =A0 =A0 =A0<string>Connection Settings</string>
> + =A0 =A0 </property>
> + =A0 =A0 <layout class=3D"QVBoxLayout" name=3D"vert= icalLayout_3">
> + =A0 =A0 =A0<item>
> + =A0 =A0 =A0 <layout class=3D"QGridLayout" name=3D"= gridLayout_3">
> + =A0 =A0 =A0 =A0<item row=3D"0" column=3D"0"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QLabel" name=3D"l= abel_Server">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string>&amp;Server:</string> > + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"textFormat"> > + =A0 =A0 =A0 =A0 =A0 <enum>Qt::AutoText</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"alignment">
> + =A0 =A0 =A0 =A0 =A0 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::Al= ignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 <cstring>kcfg_Server</cstring>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"0" column=3D"1" c= olspan=3D"3">
> + =A0 =A0 =A0 =A0 <widget class=3D"QLineEdit" name=3D&quo= t;kcfg_Server">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"0" column=3D"4"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QLabel" name=3D"l= abel_Port">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string>P&amp;ort:</string>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"textFormat"> > + =A0 =A0 =A0 =A0 =A0 <enum>Qt::AutoText</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"alignment">
> + =A0 =A0 =A0 =A0 =A0 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::Al= ignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 <cstring>kcfg_Port</cstring>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"0" column=3D"5"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QSpinBox" name=3D"= ;kcfg_Port">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"maximum">
> + =A0 =A0 =A0 =A0 =A0 <number>65535</number>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"1" column=3D"0"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QLabel" name=3D"l= abel_Username">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string>&amp;Username:</string><= br> > + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"textFormat"> > + =A0 =A0 =A0 =A0 =A0 <enum>Qt::AutoText</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"alignment">
> + =A0 =A0 =A0 =A0 =A0 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::Al= ignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 <cstring>kcfg_Username</cstring>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"2" column=3D"1" c= olspan=3D"5">
> + =A0 =A0 =A0 =A0 <widget class=3D"QLineEdit" name=3D&quo= t;kcfg_Password">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"inputMask">
> + =A0 =A0 =A0 =A0 =A0 <string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"echoMode">
> + =A0 =A0 =A0 =A0 =A0 <enum>QLineEdit::Password</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"2" column=3D"0"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QLabel" name=3D"l= abel_Password">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string>&amp;Password:</string><= br> > + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"textFormat"> > + =A0 =A0 =A0 =A0 =A0 <enum>Qt::AutoText</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"alignment">
> + =A0 =A0 =A0 =A0 =A0 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::Al= ignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 <cstring>kcfg_Password</cstring>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"1" column=3D"1" c= olspan=3D"5">
> + =A0 =A0 =A0 =A0 <widget class=3D"QLineEdit" name=3D&quo= t;kcfg_Username">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"3" column=3D"0"&g= t;
> + =A0 =A0 =A0 =A0 <widget class=3D"QLabel" name=3D"l= abel_DBName">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string>&amp;Database:</string><= br> > + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"textFormat"> > + =A0 =A0 =A0 =A0 =A0 <enum>Qt::AutoText</enum>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"alignment">
> + =A0 =A0 =A0 =A0 =A0 <set>Qt::AlignLeading|Qt::AlignLeft|Qt::Al= ignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 =A0<property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 <cstring>kcfg_DBName</cstring>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 =A0<item row=3D"3" column=3D"1" c= olspan=3D"5">
> + =A0 =A0 =A0 =A0 <widget class=3D"QLineEdit" name=3D&quo= t;kcfg_DBName">
> + =A0 =A0 =A0 =A0 =A0<property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 <string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0 =A0</item>
> + =A0 =A0 =A0 </layout>
> + =A0 =A0 =A0</item>
> + =A0 =A0 =A0<item>
> + =A0 =A0 =A0 <widget class=3D"QFrame" name=3D"frame= _info">
> + =A0 =A0 =A0 =A0<property name=3D"frameShape">
> + =A0 =A0 =A0 =A0 <enum>QFrame::StyledPanel</enum>
> + =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0<property name=3D"frameShadow">
> + =A0 =A0 =A0 =A0 <enum>QFrame::Raised</enum>
> + =A0 =A0 =A0 =A0</property>
> + =A0 =A0 =A0 =A0<layout class=3D"QVBoxLayout" name=3D&qu= ot;verticalLayout">
> + =A0 =A0 =A0 =A0 <item>
> + =A0 =A0 =A0 =A0 =A0<widget class=3D"QLabel" name=3D&quo= t;label_Info">
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"font">
> + =A0 =A0 =A0 =A0 =A0 =A0<font>
> + =A0 =A0 =A0 =A0 =A0 =A0 <pointsize>8</pointsize>
> + =A0 =A0 =A0 =A0 =A0 =A0</font>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 =A0<string>Amarok expects the above databa= se and user account to already exist. This user also requires full access t= o the database.</string>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"alignment"> > + =A0 =A0 =A0 =A0 =A0 =A0<set>Qt::AlignLeading|Qt::AlignLeft|Qt:= :AlignVCenter</set>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"wordWrap">
> + =A0 =A0 =A0 =A0 =A0 =A0<bool>true</bool>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0</widget>
> + =A0 =A0 =A0 =A0 </item>
> + =A0 =A0 =A0 =A0 <item>
> + =A0 =A0 =A0 =A0 =A0<widget class=3D"QLabel" name=3D&quo= t;label_SQL">
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"font">
> + =A0 =A0 =A0 =A0 =A0 =A0<font>
> + =A0 =A0 =A0 =A0 =A0 =A0 <pointsize>8</pointsize>
> + =A0 =A0 =A0 =A0 =A0 =A0</font>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"text">
> + =A0 =A0 =A0 =A0 =A0 =A0<string>Access rights can be assigned w= ith the following S&amp;QL commands (after replacing the password with = the correct one):</string>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"wordWrap">
> + =A0 =A0 =A0 =A0 =A0 =A0<bool>true</bool>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"buddy">
> + =A0 =A0 =A0 =A0 =A0 =A0<cstring>text_SQL</cstring>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0</widget>
> + =A0 =A0 =A0 =A0 </item>
> + =A0 =A0 =A0 =A0 <item>
> + =A0 =A0 =A0 =A0 =A0<widget class=3D"QPlainTextEdit" nam= e=3D"text_SQL">
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"sizePolicy"> > + =A0 =A0 =A0 =A0 =A0 =A0<sizepolicy hsizetype=3D"Expanding&qu= ot; vsizetype=3D"Fixed">
> + =A0 =A0 =A0 =A0 =A0 =A0 <horstretch>0</horstretch>
> + =A0 =A0 =A0 =A0 =A0 =A0 <verstretch>0</verstretch>
> + =A0 =A0 =A0 =A0 =A0 =A0</sizepolicy>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"maximumSize"><= br> > + =A0 =A0 =A0 =A0 =A0 =A0<size>
> + =A0 =A0 =A0 =A0 =A0 =A0 <width>16777215</width>
> + =A0 =A0 =A0 =A0 =A0 =A0 <height>50</height>
> + =A0 =A0 =A0 =A0 =A0 =A0</size>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"font">
> + =A0 =A0 =A0 =A0 =A0 =A0<font>
> + =A0 =A0 =A0 =A0 =A0 =A0 <pointsize>6</pointsize>
> + =A0 =A0 =A0 =A0 =A0 =A0</font>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"cursor" stdset=3D= "0">
> + =A0 =A0 =A0 =A0 =A0 =A0<cursorShape>IBeamCursor</cursorShap= e>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"acceptDrops"><= br> > + =A0 =A0 =A0 =A0 =A0 =A0<bool>false</bool>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"readOnly">
> + =A0 =A0 =A0 =A0 =A0 =A0<bool>true</bool>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0 <property name=3D"plainText"> > + =A0 =A0 =A0 =A0 =A0 =A0<string notr=3D"true"/>
> + =A0 =A0 =A0 =A0 =A0 </property>
> + =A0 =A0 =A0 =A0 =A0</widget>
> + =A0 =A0 =A0 =A0 </item>
> + =A0 =A0 =A0 =A0</layout>
> + =A0 =A0 =A0 </widget>
> + =A0 =A0 =A0</item>
> + =A0 =A0 </layout>
> + =A0 =A0</widget>
> + =A0 </item>
> + =A0 <item>
> + =A0 =A0<spacer name=3D"verticalSpacer">
> + =A0 =A0 <property name=3D"orientation">
> + =A0 =A0 =A0<enum>Qt::Vertical</enum>
> + =A0 =A0 </property>
> + =A0 =A0 <property name=3D"sizeHint" stdset=3D"0&qu= ot;>
> + =A0 =A0 =A0<size>
> + =A0 =A0 =A0 <width>20</width>
> + =A0 =A0 =A0 <height>40</height>
> + =A0 =A0 =A0</size>
> + =A0 =A0 </property>
> + =A0 =A0</spacer>
> + =A0 </item>
> + =A0</layout>
> + </widget>
> + <resources/>
> + <connections/>
> +</ui>
>
>
>


--
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org

--0015175cae183ed4ab047261efa2--