/***************************************************************************
                          dcoptions.h  -  description
                             -------------------
    begin                : Sun Feb 24 2002
    copyright            : (C) 2002 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef DCOPTIONS_H
#define DCOPTIONS_H

/**
  *@author Mathias Küster
  */

#include "dcconfig.h"
#include "DCDialogOptions.h"

#include <QHttp>

class DCOptions : public QDialog, private Ui::DCDialogOptions  {
Q_OBJECT

public:
	/** construtor */
	DCOptions();
	/** destructor */
	virtual ~DCOptions();

	/** */
	void InitDocument();
	/** */
	void SetValues();
	/** */
	void GetValues();

private:
	/** */
	void BrowseSoundFile(eUserSound);
	/** */
	void PreviewSoundFile(eUserSound);
	/** */
	void SaveSharedFolders();
	/** */
	void SaveUserMenuCommands();
	/** */
	void SaveUserChatCommands();
	/** */
	void SaveAutoResponses();
	/** */
	void SetUserPhoto( QString filename );
	/** */
	void setupIconThemeComboBoxes();
	/** */
	void connectOptionsTreeWidget();
	/** */
	void disconnectOptionsTreeWidget();

	/** */
	QTreeWidgetItem * plviDCGUI;
	/** */
	QTreeWidgetItem * plviDCGUIIdentify;
	/** */
	QTreeWidgetItem * plviConnection;
	/** */
	QTreeWidgetItem * plviConnectionMode;
	/** */
	QTreeWidgetItem * plviConnectionSettings;
	/** */
	QTreeWidgetItem * plviTransfer;
	/** */
	QTreeWidgetItem * plviTransferFolder;
	/** */
	QTreeWidgetItem * plviTransferSettings;
	/** */
	QTreeWidgetItem * plviGUI;
	/** */
	QTreeWidgetItem * plviGUIUser;
	/** */
	QTreeWidgetItem * plviGUIChat;
	/** */
	QTreeWidgetItem * plviGUICommands;
	/** */
	QTreeWidgetItem * plviGUIMenus;
	/** */
	QTreeWidgetItem * plviGUITransfer;
	/** */
	QTreeWidgetItem * plviGUIGeneral;
	/** */
	QTreeWidgetItem * plviGUIIcons;
	/** */
	QTreeWidgetItem * plviGUIFilelistBrowser;
	/** */
	QTreeWidgetItem * plviSound;
	/** */
	QTreeWidgetItem * plviSoundGeneral;
	/** */
	QTreeWidgetItem * plviSoundFiles;
	/** */
	QTreeWidgetItem * plviLog;
	/** */
	QTreeWidgetItem * plviHubLists;
	/** */
	QTreeWidgetItem * plviSecurity;
	/** List view item for auto responses tab */
	QTreeWidgetItem * plviAutoResponse;
	/** List view item for other tab */
	QTreeWidgetItem * plviOther;
	/** QHttp for getting external IP */
	QHttp * http;

private slots:
	/** */
	void slotBrowseSoundFileConnect();
	/** */
	void slotBrowseSoundFileDisconnect();
	/** */
	void slotBrowseSoundFileSend();
	/** */
	void slotBrowseSoundFileReceive();
	/** */
	void slotBrowseSoundFileFirstReceive();
	/** */
	void slotBrowseSoundFileNickMentioned();

	/** */
	void slotLogChatEnableLogging();
	/** */
	void slotLogChatEnableNickNameFilter();
	/** */
	void slotLogChatAddNickNameFilter();
	/** */
	void slotLogChatDelNickNameFilter();

	/** */
	void slotDisableSound();
	/** */
	void slotExternalPlayer();
	/** */
	void slotSoundPlayConnect();
	/** */
	void slotSoundPlayDisconnect();
	/** */
	void slotSoundPlaySend();
	/** */
	void slotSoundPlayRecieve();
	/** */
	void slotSoundPlayFirstReceive();
	/** */
	void slotSoundPlayNickMentioned();
	/** */
	void slotPreviewSoundFileConnect();
	/** */
	void slotPreviewSoundFileDisconnect();
	/** */
	void slotPreviewSoundFileSend();
	/** */
	void slotPreviewSoundFileReceive();
	/** */
	void slotPreviewSoundFileFirstReceive();
	/** */
	void slotPreviewSoundFileNickMentioned();

	/** */
	void slotBrowseSoundPlayer();
	/** */
	void slotBrowseDownloadFolder();
	/** */
	void slotBrowseDownloadFinishedFolder();
	/** */
	void slotBrowseShareList();
	/** */
	void slotBrowseDataFolder();
	/** */
	void slotAddSharedFolder();
	/** */
	void slotRemoveSharedFolder();
	/** */
	void slotEditSharedFolder();
	/** */
	void slotCreateShareList();
	/** */
	void slotShareListInfo();
	/** */
	void slotSave();
	/** */
	void slotModeActiveChange(bool);
	/** */
	void slotModePassiveChange(bool);
	/** */
	void slotIPHOSTNAMEChange(bool);
	/** */
	void slotINTERFACEChange(bool);
	/** */
	void slotTestHost();
	/** */
	void slotGetInterface();
	/** */
	void slotGetInternetIP();
	/** */
	void slotGotInternetIP( bool error );
	/** */
	void slotSetTheme();
	/** */
	void slotBrowseLanguageFile();
	/** */
	void slotSelectLanguage();
	/** */
	void slotBrowseAppFont();
	/** */
	void slotCustomFontChecked();
	/** */
	void slotBrowseTransferCert();
	/** */
	void slotBrowseTransferKey();
	/** */
	void slotBrowseDclibPluginFolder();
	/** */
	void slotAddHubListUrl();
	/** */
	void slotEditHubListUrl();
	/** */
	void slotRemoveHubListUrl();
	/** */
	void slotBrowseLogFile();
	/** */
	void slotBrowseBrowser();
	/** */
	void slotTreeWidgetOptionTreeCurrentChanged( QTreeWidgetItem * current, QTreeWidgetItem * previous );
	/** */
	void slotTabWidgetDCGUICurrentChanged( int index );
	/** */
	void slotTabWidgetTransferCurrentChanged( int index );
	/** */
	void slotTabWidgetConnectionCurrentChanged( int index );
	/** */
	void slotTabWidgetGUICurrentChanged( int index );
	/** */
	void slotDoubleClickedChatColor( QListWidgetItem * );
	/** */
	void slotAutoAwayMode();
	/** */
	void slotChangePhoto();
	/** */
	void slotEnableShowJoinsParts();
	/** */
	void slotContextMenuUserMenuCommands( const QPoint & pos );
	/** */
	void slotContextMenuUserChatCommands( const QPoint & pos );
	/** */
	void slotContextMenuAutoResponses( const QPoint & pos );
	/** */
	void slotDontShareDotFilesChanged();
	/** Generates a new key and certificate for SSL transfers */
	void slotGenerateKeyCert();
	/** Enables or disables allowed unknown commands linedit */
	void slotSendUnknownCommandsChecked();
};

/** */
inline void DCOptions::slotBrowseSoundFileConnect()
{ BrowseSoundFile(eusCONNECT); }
/** */
inline void DCOptions::slotBrowseSoundFileDisconnect()
{ BrowseSoundFile(eusDISCONNECT); }
/** */
inline void DCOptions::slotBrowseSoundFileSend()
{ BrowseSoundFile(eusSEND); }
/** */
inline void DCOptions::slotBrowseSoundFileReceive()
{ BrowseSoundFile(eusRECEIVE); }
/** */
inline void DCOptions::slotBrowseSoundFileFirstReceive()
{ BrowseSoundFile(eusFIRSTRECEIVE); }
/** */
inline void DCOptions::slotBrowseSoundFileNickMentioned()
{ BrowseSoundFile(eusNICKMENTIONED); }
/** */
inline void DCOptions::slotPreviewSoundFileConnect()
{ PreviewSoundFile(eusCONNECT); }
/** */
inline void DCOptions::slotPreviewSoundFileDisconnect()
{ PreviewSoundFile(eusDISCONNECT); }
/** */
inline void DCOptions::slotPreviewSoundFileSend()
{ PreviewSoundFile(eusSEND); }
/** */
inline void DCOptions::slotPreviewSoundFileReceive()
{ PreviewSoundFile(eusRECEIVE); }
/** */
inline void DCOptions::slotPreviewSoundFileFirstReceive()
{ PreviewSoundFile(eusFIRSTRECEIVE); }
/** */
inline void DCOptions::slotPreviewSoundFileNickMentioned()
{ PreviewSoundFile(eusNICKMENTIONED); }

#endif
