File indexing completed on 2024-05-19 04:48:45
0001 0002 /**************************************************************************************** 0003 * Copyright (c) 2009 John Atkinson <john@fauxnetic.co.uk> * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify it under * 0006 * the terms of the GNU General Public License as published by the Free Software * 0007 * Foundation; either version 2 of the License, or (at your option) any later * 0008 * version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY * 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * 0012 * PARTICULAR PURPOSE. See the GNU General Pulic License for more details. * 0013 * * 0014 * You should have received a copy of the GNU General Public License along with * 0015 * this program. If not, see <http://www.gnu.org/licenses/>. * 0016 ****************************************************************************************/ 0017 0018 #ifndef DATABASECONFIG_H 0019 #define DATABASECONFIG_H 0020 0021 #include "ui_DatabaseConfig.h" 0022 #include "configdialog/ConfigDialogBase.h" 0023 0024 class KConfigDialogManager; 0025 class KCoreConfigSkeleton; 0026 0027 class DatabaseConfig : public ConfigDialogBase, public Ui_DatabaseConfig 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 DatabaseConfig( Amarok2ConfigDialog* parent, KCoreConfigSkeleton *config ); 0033 ~DatabaseConfig() override; 0034 0035 bool hasChanged() override; 0036 bool isDefault() override; 0037 void updateSettings() override; 0038 0039 public Q_SLOTS: 0040 void toggleExternalConfigAvailable( int checkBoxState ); 0041 void testDatabaseConnection(); 0042 0043 private Q_SLOTS: 0044 void updateSQLQuery(); 0045 0046 private: 0047 /** Returns true if the configuration is complete. 0048 * 0049 * Complete menas that the database, user and host are filled out. 0050 */ 0051 bool isSQLInfoPresent() const; 0052 0053 KConfigDialogManager* m_configManager; 0054 0055 }; 0056 0057 0058 #endif 0059 0060