Logo Search packages:      
Sourcecode: kmess version File versions


                          settingsdialog.h  -  description
    begin                : Sat Jan 11 2003
    copyright            : (C) 2003 by Mike K. Bennett
    email                : mkb137b@hotmail.com

 *                                                                         *
 *   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.                                   *
 *                                                                         *


#include <qwidget.h>
#include <kdialogbase.h>

// Forward declarations
class Account;
class AccountsWidget;
class AlertsWidget;
class ChattingWidget;
class ChatLoggingWidget;
class EmailWidget;
class EmoticonWidget;
class KConfig;
class ProxyWidget;
class ChatMessage;
class ChatMessageStyle;
class ChatMessageView;

  *@author Mike K. Bennett

00042 class SettingsDialog : public KDialogBase

    // The constructor
                         SettingsDialog(QWidget *parent=0, const char *name=0);
    // The destructor
    // Show the settings dialog for the given account
    void               changeAccountSettings(Account *account, bool isCurrentAccount);

  private: // Private methods
    // Get a font and cleaned-up font family from a dialog
    bool               getFont(QFont &font, QString &fontFamily) const;
    // Load account information into the account widget
    void               loadAccountsSettings(Account *account, bool isCurrentAccount);
    // Load account information into the alerts widget
    void               loadAlertsSettings(Account *account);
    // Load account information into the chatting widget
    void               loadChattingSettings(Account *account);
    // Load account information into the chat logging widget
    void               loadChatLoggingSettings(Account *account);
    // Load account information into the email widget
    void               loadEmailSettings(Account *account);
    // Load account information into the emoticon widget
    void               loadEmoticonSettings(Account *account);
    //Load account info for proxy
    void               loadProxySettings(Account *account);
    // Read options from the configuration file.
    void               readOptions();
    // Save account information from the account widget
    void               saveAccountsSettings(Account *account);
    // Save account information from the alerts widget
    void               saveAlertsSettings(Account *account);
    // Save account information from the chatting widget
    void               saveChattingSettings(Account *account);
    // Save account information from the chat logging widget
    void               saveChatLoggingSettings(Account *account);
    // Save account information from the email widget
    void               saveEmailSettings(Account *account);
    // Save account information from the emoticon widget
    void               saveEmoticonSettings(Account *account);
    // Save account information from the proxy widget
    void               saveProxySettings(Account *account);
    // Save the options.
    void               saveOptions();
    // Save all widget settings
    void               saveAccountSettings();

  private slots: // Private slots
    // Get a directory from the user.
    void               chooseDirectory();
    // Save the window options before closing.
    void               closeEvent(QCloseEvent *event);
    // The contact font button was pressed.  Show a font dialog to get a new font.
    void               contactFontClicked();
    // The font button was pressed.  Show a font dialog to get a new font.
    void               fontClicked();
    // The apply button was clicked.  Apply the changes.
    void               slotApply();
    // The cancel button was clicked.  Close the dialog.
    void               slotCancel();
    // The chat style was changed.
    void               slotChatStyleChanged(const QString &style);
    // The OK button was pressed.  Apply the changes and close.
    void               slotOk();
    // The delete button was pressed.
    void               slotUser1();
    // Update the chat style preview
    void               updatePreview();
    // Enable or disable the contact font and color selectors.
    void               useContactFontToggled(bool checked);
    // Enable or disable the sub-notification depending on the overall notification.
    void               useNotificationsToggled(bool checked);

  private: // Private attributes
    // The account being edited
    Account           *account_;
    // The configuration file from which window size is loaded from and saved to
    KConfig           *config_;
    // The chat message preview
    ChatMessageView   *chatMessageView_;
    // The XSL transformation handler
    ChatMessageStyle  *chatStyle_;
    // The widget for entering profile data (handle, name, password).
    AccountsWidget    *accountsWidget_;
    // The widget for selecting idle timer and notification timer durations.
    AlertsWidget      *alertsWidget_;
    // The widget for selecting the user's font.
    ChattingWidget    *chattingWidget_;
    // A widget for chat logging settings
    ChatLoggingWidget *chatLoggingWidget_;
    // The widget for selecting information about email notifications
    EmailWidget       *emailWidget_;
    // The widget for selecting emoticon styles
    EmoticonWidget    *emoticonWidget_;
    // The widget for changing proxy settings
    ProxyWidget       *proxyWidget_;
    // Request that the given account be deleted
    void               deleteAccount(Account *account);


Generated by  Doxygen 1.6.0   Back to index