add mp3 and ogg torrent url info to JamendoAlbum
[amarok.git] / src / dbsetup.ui.h
blob95cdf72c31ceca1d1d3de3116263f97854c0a4c2
1 #//(c) 2005 Ian Monroe see COPYING
2 /****************************************************************************
3 ** ui.h extension file, included from the uic-generated form implementation.
4 **
5 ** If you want to add, delete, or rename functions or slots, use
6 ** Qt Designer to update this file, preserving your code.
7 **
8 ** You should not define a constructor or destructor in this file.
9 ** Instead, write your code in functions called init() and destroy().
10 ** These will automatically be called by the form's constructor and
11 ** destructor.
12 *****************************************************************************/
13 #include "config-amarok.h"
14 #include "amarokconfig.h"
15 #include "collectiondb.h"
17 void DbSetup::init()
19 configStack->raiseWidget( 0 );
20 #ifdef USE_MYSQL
21 databaseEngine->addItem( "MySQL", -1 );
22 if (AmarokConfig::databaseEngine() == QString::number(DbConnection::mysql))
24 databaseEngine->setCurrentItem("MySQL");
25 configStack->raiseWidget( 1 );
27 #endif
29 #ifdef USE_POSTGRESQL
30 databaseEngine->addItem( "Postgresql", -1 );
31 if (AmarokConfig::databaseEngine() == QString::number(DbConnection::postgresql))
33 databaseEngine->setCurrentItem("Postgresql");
34 configStack->raiseWidget( 2 );
36 #endif
39 void DbSetup::databaseEngine_activated( int item )
41 if( item == 0 )
42 configStack->raiseWidget( 0 );
44 // If built with MySQL support, the PostgreSQL config widget is #2
45 // Without MySQL it's #1
46 #ifdef USE_MYSQL
47 else if( item == 1 )
48 configStack->raiseWidget( 1 );
49 else if( item == 2 )
50 configStack->raiseWidget( 2 );
51 #elif defined(USE_POSTGRESQL)
52 else if( item == 1 )
53 configStack->raiseWidget( 2 );
54 #endif