summaryrefslogtreecommitdiffabout
path: root/kaddressbook/secrecywidget.cpp
Unidiff
Diffstat (limited to 'kaddressbook/secrecywidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/secrecywidget.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp
index 4a2acc8..1c237c0 100644
--- a/kaddressbook/secrecywidget.cpp
+++ b/kaddressbook/secrecywidget.cpp
@@ -13,35 +13,37 @@
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qlayout.h> 24#include <qlayout.h>
25//Added by qt3to4:
26#include <Q3VBoxLayout>
25 27
26#include <kabc/secrecy.h> 28#include <kabc/secrecy.h>
27#include <kcombobox.h> 29#include <kcombobox.h>
28#include <kdialog.h> 30#include <kdialog.h>
29 31
30#include "secrecywidget.h" 32#include "secrecywidget.h"
31 33
32SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) 34SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name )
33 : QWidget( parent, name ) 35 : QWidget( parent, name )
34{ 36{
35 QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), 37 Q3VBoxLayout *layout = new Q3VBoxLayout( this, KDialog::marginHint(),
36 KDialog::spacingHint() ); 38 KDialog::spacingHint() );
37 mSecrecyCombo = new KComboBox( this ); 39 mSecrecyCombo = new KComboBox( this );
38 layout->addWidget( mSecrecyCombo ); 40 layout->addWidget( mSecrecyCombo );
39 41
40 KABC::Secrecy::TypeList list = KABC::Secrecy::typeList(); 42 KABC::Secrecy::TypeList list = KABC::Secrecy::typeList();
41 KABC::Secrecy::TypeList::Iterator it; 43 KABC::Secrecy::TypeList::Iterator it;
42 for ( it = list.begin(); it != list.end(); ++it ) 44 for ( it = list.begin(); it != list.end(); ++it )
43 mSecrecyCombo->insertItem( KABC::Secrecy::typeLabel( *it ), *it ); 45 mSecrecyCombo->insertItem( KABC::Secrecy::typeLabel( *it ), *it );
44 46
45 connect( mSecrecyCombo, SIGNAL( activated( const QString& ) ), 47 connect( mSecrecyCombo, SIGNAL( activated( const QString& ) ),
46 SIGNAL( changed() ) ); 48 SIGNAL( changed() ) );
47} 49}
@@ -56,15 +58,15 @@ void SecrecyWidget::setSecrecy( const KABC::Secrecy &secrecy )
56 if (secrecy.isValid()) 58 if (secrecy.isValid())
57 mSecrecyCombo->setCurrentItem( secrecy.type() ); 59 mSecrecyCombo->setCurrentItem( secrecy.type() );
58} 60}
59 61
60KABC::Secrecy SecrecyWidget::secrecy() const 62KABC::Secrecy SecrecyWidget::secrecy() const
61{ 63{
62 KABC::Secrecy secrecy; 64 KABC::Secrecy secrecy;
63 secrecy.setType( mSecrecyCombo->currentItem() ); 65 secrecy.setType( mSecrecyCombo->currentItem() );
64 66
65 return secrecy; 67 return secrecy;
66} 68}
67 69
68#ifndef KAB_EMBEDDED 70#ifndef KAB_EMBEDDED_
69#include "secrecywidget.moc" 71#include "moc_secrecywidget.cpp"
70#endif //KAB_EMBEDDED 72#endif //KAB_EMBEDDED