diff -r 000000000000 -r ccd0fd43f247 searchui/stateproviders/searchstateprovider/inc/settingswidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/searchui/stateproviders/searchstateprovider/inc/settingswidget.h Mon Apr 19 14:40:05 2010 +0300 @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: Declaration of the settings widget + * + */ +#ifndef SETTINGSWIDGET_H_ +#define SETTINGSWIDGET_H_ + +#include +#include +#include +#include +class HbCheckBox; +class HbDialog; +class QSignalMapper; + +SEARCH_CLASS(SearchStateProviderTest) + +class SettingsWidget : public HbWidget + { +Q_OBJECT +public: + /** + * Construction + */ + SettingsWidget(); + /** + * destructor + */ + ~SettingsWidget(); +public: + /** + * Launching the settings widget + */ + void launchSettingWidget(); + /** + * Verifies internet selection + * + */ + bool isInternetSearchOptionSelected(); + /** + * unchecking subcategories under the main category once main category unchecked + */ + void unCheckSubCategories(int aUnCheckSubCategory); + /** + * checking subcategories under the main category once main category checked + */ + void checkSubCategories(int acheckSubCategory); + /** + * storing settings to application ini file + * + */ + void storeSettingsToiniFile(); + /** + * Load setting from application ini file + * + */ + void loadSettingsFrominiFile(); + /** + * make "OK" button visible + * + */ + void setActionVisibility(); + /** + * enable default settings in the application ini file + * + */ + void enableDefaultSettings(); +public slots: + /** + * will be called when settings OK is clicked + */ + void checkBoxOkEvent(); + /** + * will be called when setting cancel is called + */ + void checkBoxCancelEvent(); + /** + * will be called whenn any check box is checked + */ + void itemChecked(int); + /** + * will be called when change oin internet or device selectin + * + */ + void changeDeviceInternetCheck(); +signals: + /** + * Emitted when setting closed + * + */ + void settingsEvent(bool); + /** + * Emitted if settings changed for "go" button + * + */ + void settingsChanged(); + /** + * Emitted when categories selected or deselected + * + */ + void selectedItemCategory(int, bool); + +private: + /** + * for Device category list + */ + QList mDeviceCheckBoxList; + /** + * for Internet category list + */ + QList mInternetCheckBoxList; + /** + * mapper to map checkboxes + * + */ + QSignalMapper* signalMapper; + /** + * settings widget popup + */ + HbDialog *popup; + /** + * to indicate internet is selected or not + */ + bool isInternetSelected; + + /** + * list of hardcoded device categories + */ + QStringList deviceCategoryList; + + /** + * list of hardcoded service providers + */ + QStringList internetCategoryList; + /** + * for unit testing + */ +SEARCH_FRIEND_CLASS (SearchStateProviderTest) + }; +#endif