Blokkal
an Extendable KDE Blogging Client
SourceForge.net Logo

genericeditaccountwidget.h

00001 /***************************************************************************
00002  *   Copyright (C) 2006 by Martin Müller   *
00003  *   orvio@orvio.de   *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef BLOKKALUiGENERICEDITACCOUNTWIDGET_H
00021 #define BLOKKALUiGENERICEDITACCOUNTWIDGET_H
00022 
00023 #include "editaccountwidget.h"
00024 
00025 class QGroupBox;
00026 class QCheckBox;
00027 class KLineEdit;
00028 class QVBoxLayout;
00029 
00030 namespace Blokkal {
00031 class Account;
00032 class Protocol;
00033 
00034 namespace Ui {
00043 class BLOKKAL_EXPORT GenericEditAccountWidget : public EditAccountWidget
00044 {
00045 Q_OBJECT
00046 public:
00054         GenericEditAccountWidget( Blokkal::Protocol * protocol,
00055                                   Blokkal::Account * account,
00056                                   QWidget * parent = 0 );
00057 
00061         virtual ~GenericEditAccountWidget( void );
00062 
00071         virtual bool isValid( void ) const;
00072 
00077         virtual Blokkal::Account * apply( void );
00078         
00079 protected Q_SLOTS:
00085         virtual void setServerAddress( const QString & serverName ) = 0;
00086 
00090         virtual void emitValuesChanged( void );
00091 
00096         virtual void useStandardAddressToggled( void );
00097 
00098 protected:
00102         KLineEdit * serverNameLineEdit( void ) const;
00103         
00108         QCheckBox * useStandardAddressCheckBox( void ) const;
00109 
00114         KLineEdit * connectAddressLineEdit( void ) const;
00115 
00120         QGroupBox * networkGroupBox( void ) const;
00121 
00125         KLineEdit * userNameLineEdit( void ) const;
00126 
00131         QGroupBox * userGroupBox( void ) const;
00132 
00137         QGroupBox * accountGroupBox( void ) const;
00138 
00139 private:
00140         class Private;
00141         Private * d;
00142 };
00143 
00144 }
00145 }
00146 
00147 #endif