kpilot Library API Documentation

setupDialog.h

00001 #ifndef _POPMAIL_SETUPDIALOG_H 00002 #define _POPMAIL_SETUPDIALOG_H 00003 /* setupDialog.h KPilot 00004 ** 00005 ** Copyright (C) 1998-2001 Dan Pilone 00006 ** 00007 ** This file is part of the popmail conduit, a conduit for KPilot that 00008 ** synchronises the Pilot's email application with the outside world, 00009 ** which currently means: 00010 ** -- sendmail or SMTP for outgoing mail 00011 ** -- POP or mbox for incoming mail 00012 */ 00013 00014 /* 00015 ** This program is free software; you can redistribute it and/or modify 00016 ** it under the terms of the GNU General Public License as published by 00017 ** the Free Software Foundation; either version 2 of the License, or 00018 ** (at your option) any later version. 00019 ** 00020 ** This program is distributed in the hope that it will be useful, 00021 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 ** GNU General Public License for more details. 00024 ** 00025 ** You should have received a copy of the GNU General Public License 00026 ** along with this program in a file called COPYING; if not, write to 00027 ** the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00028 ** MA 02111-1307, USA. 00029 */ 00030 00031 /* 00032 ** Bug reports and questions can be sent to kde-pim@kde.org 00033 */ 00034 00035 00036 #include <qwidget.h> 00037 #include "plugin.h" 00038 class KConfig; 00039 class QLabel; 00040 class QLineEdit; 00041 class QCheckBox; 00042 class QPushButton; 00043 class QRadioButton; 00044 class QButtonGroup; 00045 00046 00047 #if 0 00048 // A standard dialog page with all the 00049 // settings used when sending mail, both 00050 // with SMTP and sendmail (in future via KMail 00051 // as well?) 00052 // 00053 // 00054 class PopMailSendPage : public QWidget 00055 { 00056 // Q_OBJECT 00057 00058 public: 00059 PopMailSendPage(QWidget *parent ); 00060 virtual int commitChanges(KConfig& ); 00061 void readSettings(KConfig &); 00062 00063 public /* slots */: 00067 void browseSignature(); 00073 void toggleMode(); 00074 00075 public: 00076 typedef enum { SEND_NONE=0, 00077 SEND_SENDMAIL=7, 00078 SEND_KMAIL=8, 00079 SEND_SMTP=12 00080 } SendMode ; 00081 00082 void setMode(SendMode m); 00083 SendMode getMode() const { return fMode; }; 00084 00085 private: 00086 SendMode fMode; 00087 00088 QButtonGroup *sendGroup; 00089 QRadioButton *fNoSend,*fSendmail,*fSMTP, *fKMail; 00090 00091 QLineEdit* fEmailFrom; 00092 QLineEdit *fHeaders; 00093 QLineEdit* fSignature; 00094 QPushButton *fSignatureBrowse; 00095 00096 QLineEdit* fSendmailCmd; 00097 QLineEdit* fSMTPServer; 00098 QLineEdit* fSMTPPort; 00099 QLineEdit* fFirewallFQDN; 00100 QCheckBox *fKMailSendImmediate; 00101 } ; 00102 00103 // A standard dialog page used when receiving 00104 // mail, both via POP and via UNIX mailboxes 00105 // (and in future from KMail?) 00106 // 00107 // 00108 class PopMailReceivePage : public QWidget 00109 { 00110 // Q_OBJECT 00111 00112 public: 00113 PopMailReceivePage(QWidget *); 00114 virtual int commitChanges(KConfig& ); 00115 void readSettings(KConfig &); 00116 00117 public /* slots */: 00118 void browseMailbox(); 00119 void togglePopPass(); 00120 void toggleMode(); 00121 00122 public: 00123 typedef enum { 00124 RECV_NONE=0, 00125 RECV_POP=1, 00126 RECV_UNIX=2 00127 } RetrievalMode ; 00128 00129 void setMode(RetrievalMode m); 00130 RetrievalMode getMode() const { return fMode; }; 00131 00132 private: 00133 QButtonGroup *methodGroup; 00134 QRadioButton *fNoReceive; 00135 QRadioButton *fReceivePOP,*fReceiveUNIX; 00136 00137 QLineEdit *fMailbox; 00138 QPushButton *fMailboxBrowse; 00139 00140 QLineEdit* fPopServer; 00141 QLineEdit* fPopPort; 00142 QLineEdit* fPopUser; 00143 QCheckBox* fLeaveMail; 00144 QCheckBox* fSyncIncoming; 00145 QLineEdit *fPopPass; 00146 QCheckBox *fStorePass; 00147 00148 RetrievalMode fMode; 00149 } ; 00150 #endif 00151 00152 00153 class PopMailWidget; // From setup-dialog.ui 00154 00155 class PopMailWidgetConfig : public ConduitConfigBase 00156 { 00157 Q_OBJECT 00158 public: 00159 PopMailWidgetConfig(QWidget *, const char *); 00160 virtual void load(KConfig *); 00161 virtual void commit(KConfig *); 00162 00163 static ConduitConfigBase *create(QWidget *w, const char *n) 00164 { return new PopMailWidgetConfig(w,n); } ; 00165 00166 // These enums must follow the order of items in the combo box 00167 enum RecvMode { NoRecv=0, RecvPOP=1, RecvMBOX=2 } ; 00168 enum SendMode { NoSend=0, SendSendmail=1, SendSMTP=2, SendKMail=3 } ; 00169 00170 protected: 00171 PopMailWidget *fConfigWidget; 00172 00173 public slots: 00174 void toggleRecvMode(int); 00175 void toggleSendMode(int); 00176 00177 signals: 00178 void moose(); 00179 } ; 00180 00181 00182 #endif
KDE Logo
This file is part of the documentation for kpilot Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jul 28 23:57:49 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003