diff -r c48470be1ba7 -r adbe7d5ba2f5 mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mediasettings/videosettingsplugin/inc/videosettingsaccesspointentry.h Wed Jun 23 18:14:16 2010 +0300 @@ -0,0 +1,118 @@ +/* + * 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: + * + */ +#ifndef VIDEOSETTINGSACCESSPOINTENTRY_H +#define VIDEOSETTINGSACCESSPOINTENTRY_H + +#include +#include + +class VideoSettingsGroup; +class CmConnectionMethodShim; +class CmManagerShim; + +class VideoSettingsAccessPointEntry : public CpSettingFormEntryItemData +{ + Q_OBJECT +public: + + /** + * Constructor + */ + VideoSettingsAccessPointEntry(CpItemDataHelper &itemDataHelper, + const QString& text = QString(), + VideoSettingsGroup *parent = 0); + + /** + * Destructor + */ + ~VideoSettingsAccessPointEntry(); + + /** + * sets the iap id. + * + * @param apId The iap id. + */ + void setIapId(const uint& apId); + +private: + + /** + * From CpSettingFormEntryItemData. + * + * Creates a view for this, if needed. In our case always + * returns 0 as we don't want a new view. + */ + virtual CpBaseSettingView *createSettingView() const; + + /** + * Convinience method for fetching a connection method + * with a given id. + * + * @param id Connection method id. + * @return The connection method object. + */ + CmConnectionMethodShim* getConnectionMethod(const uint& id); + + /** + * Fetches the connection name from the given connection method + * and sets it as the description for this. + */ + void setAccessPointName(CmConnectionMethodShim* connMethod); + +private slots: + + /** + * Slot that is called when the button is pressed. + * Opens the access point selection dialog. + */ + void openSelectionDialogSlot(); + + /** + * Slot that is called when the access point selection + * dialog closes. + * + * @param error Possible error code. One from enum + * CmApplSettingsUi::ApplSettingsError. + */ + void accessPointDialogFinished(uint error); + +private: + + /** + * The VideoSettingsGroup. + */ + VideoSettingsGroup* mParent; + + /** + * The access point selection dialog. + */ + CmApplSettingsUi* mApplSettings; + + /** + * The current access point selection. + */ + CmApplSettingsUi::SettingSelection mSelection; + + /** + * The manager that handles all destinations and connection methods. + * Used for getting the connection methods. + */ + CmManagerShim* mCmManager; + +}; + +#endif // VIDEOSETTINGSACCESSPOINTENTRY_H