1 /***************************************************************************
2 * copyright : (C) 2005 Ian Monroe <ian@monroe.nu>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License or (at your option) version 3 or any later version
8 * accepted by the membership of KDE e.V. (or its successor approved
9 * by the membership of KDE e.V.), which shall act as a proxy
10 * defined in Section 14 of version 3 of the license.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 **************************************************************************/
20 /****************************************************************************
21 ** ui.h extension file, included from the uic-generated form implementation.
23 ** If you want to add, delete, or rename functions or slots, use
24 ** Qt Designer to update this file, preserving your code.
26 ** You should not define a constructor or destructor in this file.
27 ** Instead, write your code in functions called init() and destroy().
28 ** These will automatically be called by the form's constructor and
30 *****************************************************************************/
31 #include "config-amarok.h"
32 #include "amarokconfig.h"
33 #include "collectiondb.h"
37 configStack
->raiseWidget( 0 );
39 databaseEngine
->addItem( "MySQL", -1 );
40 if (AmarokConfig::databaseEngine() == QString::number(DbConnection::mysql
))
42 databaseEngine
->setCurrentItem("MySQL");
43 configStack
->raiseWidget( 1 );
48 databaseEngine
->addItem( "Postgresql", -1 );
49 if (AmarokConfig::databaseEngine() == QString::number(DbConnection::postgresql
))
51 databaseEngine
->setCurrentItem("Postgresql");
52 configStack
->raiseWidget( 2 );
57 void DbSetup::databaseEngine_activated( int item
)
60 configStack
->raiseWidget( 0 );
62 // If built with MySQL support, the PostgreSQL config widget is #2
63 // Without MySQL it's #1
66 configStack
->raiseWidget( 1 );
68 configStack
->raiseWidget( 2 );
69 #elif defined(USE_POSTGRESQL)
71 configStack
->raiseWidget( 2 );