author | zautrix <zautrix> | 2005-04-02 14:32:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-02 14:32:10 (UTC) |
commit | 470327bf20835778a29cd2ce9414baa0cc176829 (patch) (unidiff) | |
tree | 49e20b05c117ddbee53fa3dda10768b012594b14 /kaddressbook | |
parent | b0d17f8f2ef9b09b7d8b8aa0f6cc34f400f8fddd (diff) | |
download | kdepimpi-470327bf20835778a29cd2ce9414baa0cc176829.zip kdepimpi-470327bf20835778a29cd2ce9414baa0cc176829.tar.gz kdepimpi-470327bf20835778a29cd2ce9414baa0cc176829.tar.bz2 |
fixes
-rw-r--r-- | kaddressbook/kcmconfigs/kabconfigwidget.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 986c9b8..8a4dd3d 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp | |||
@@ -10,131 +10,133 @@ | |||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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 <qcheckbox.h> | 24 | #include <qcheckbox.h> |
25 | #include <qframe.h> | 25 | #include <qframe.h> |
26 | #include <qgroupbox.h> | 26 | #include <qgroupbox.h> |
27 | #include <qlayout.h> | 27 | #include <qlayout.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qtabwidget.h> | 29 | #include <qtabwidget.h> |
30 | #include <qcombobox.h> | 30 | #include <qcombobox.h> |
31 | #include <qlineedit.h> | 31 | #include <qlineedit.h> |
32 | #include <qlabel.h> | 32 | #include <qlabel.h> |
33 | #include <qfile.h> | 33 | #include <qfile.h> |
34 | #include <qvbox.h> | 34 | #include <qvbox.h> |
35 | 35 | ||
36 | #include <kconfig.h> | 36 | #include <kconfig.h> |
37 | #include <kdebug.h> | 37 | #include <kdebug.h> |
38 | #include <kdialog.h> | 38 | #include <kdialog.h> |
39 | #include <klistview.h> | 39 | #include <klistview.h> |
40 | #include <klocale.h> | 40 | #include <klocale.h> |
41 | #include <kglobal.h> | 41 | #include <kglobal.h> |
42 | #include <kmessagebox.h> | 42 | #include <kmessagebox.h> |
43 | #include <kstandarddirs.h> | 43 | #include <kstandarddirs.h> |
44 | 44 | ||
45 | #ifndef KAB_EMBEDDED | 45 | #ifndef KAB_EMBEDDED |
46 | #include <ktrader.h> | 46 | #include <ktrader.h> |
47 | #else // KAB_EMBEDDED | 47 | #else // KAB_EMBEDDED |
48 | #include <mergewidget.h> | 48 | #include <mergewidget.h> |
49 | #include <distributionlistwidget.h> | 49 | #include <distributionlistwidget.h> |
50 | #endif // KAB_EMBEDDED | 50 | #endif // KAB_EMBEDDED |
51 | 51 | ||
52 | #include "addresseewidget.h" | 52 | #include "addresseewidget.h" |
53 | #include "extensionconfigdialog.h" | 53 | #include "extensionconfigdialog.h" |
54 | #include "extensionwidget.h" | 54 | #include "extensionwidget.h" |
55 | #include "kabprefs.h" | 55 | #include "kabprefs.h" |
56 | 56 | ||
57 | #include "kabconfigwidget.h" | 57 | #include "kabconfigwidget.h" |
58 | #include <kglobalsettings.h> | ||
58 | 59 | ||
59 | class ExtensionItem : public QCheckListItem | 60 | class ExtensionItem : public QCheckListItem |
60 | { | 61 | { |
61 | public: | 62 | public: |
62 | 63 | ||
63 | #ifndef KAB_EMBEDDED | 64 | #ifndef KAB_EMBEDDED |
64 | ExtensionItem( QListView *parent, const QString &text ); | 65 | ExtensionItem( QListView *parent, const QString &text ); |
65 | void setService( const KService::Ptr &ptr ); | 66 | void setService( const KService::Ptr &ptr ); |
66 | #else //KAB_EMBEDDED | 67 | #else //KAB_EMBEDDED |
67 | ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); | 68 | ExtensionItem( QListView *parent, const QString &text, const QString &name, const QString &comment ); |
68 | void setFactory( ExtensionFactory* fac ); | 69 | void setFactory( ExtensionFactory* fac ); |
69 | #endif //KAB_EMBEDDED | 70 | #endif //KAB_EMBEDDED |
70 | 71 | ||
71 | bool configWidgetAvailable() const; | 72 | bool configWidgetAvailable() const; |
72 | ExtensionFactory *factory() const; | 73 | ExtensionFactory *factory() const; |
73 | 74 | ||
74 | virtual QString text( int column ) const; | 75 | virtual QString text( int column ) const; |
75 | 76 | ||
76 | private: | 77 | private: |
77 | #ifndef KAB_EMBEDDED | 78 | #ifndef KAB_EMBEDDED |
78 | KService::Ptr mPtr; | 79 | KService::Ptr mPtr; |
79 | #else //KAB_EMBEDDED | 80 | #else //KAB_EMBEDDED |
80 | ExtensionFactory* mFactory; | 81 | ExtensionFactory* mFactory; |
81 | QString mName; | 82 | QString mName; |
82 | QString mComment; | 83 | QString mComment; |
83 | 84 | ||
84 | #endif //KAB_EMBEDDED | 85 | #endif //KAB_EMBEDDED |
85 | 86 | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name ) | 89 | KABConfigWidget::KABConfigWidget( KABPrefs* prefs, QWidget *parent, const char *name ) |
89 | : KPrefsWidget( prefs, parent, name ) | 90 | : KPrefsWidget( prefs, parent, name ) |
90 | { | 91 | { |
92 | |||
91 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, | 93 | QVBoxLayout *topLayout = new QVBoxLayout( this, 0, |
92 | KDialog::spacingHint() ); | 94 | KDialog::spacingHintSmall() ); |
93 | 95 | ||
94 | QTabWidget *tabWidget = new QTabWidget( this ); | 96 | QTabWidget *tabWidget = new QTabWidget( this ); |
95 | topLayout->addWidget( tabWidget ); | 97 | topLayout->addWidget( tabWidget ); |
96 | 98 | ||
97 | // General page | 99 | // General page |
98 | QWidget *generalPage = new QWidget( this ); | 100 | QWidget *generalPage = new QWidget( this ); |
99 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), | 101 | QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHintSmall(), |
100 | KDialog::spacingHintSmall() ); | 102 | KDialog::spacingHintSmall() ); |
101 | 103 | ||
102 | 104 | ||
103 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); | 105 | QWidget *hBox = new QWidget( generalPage, "qhbox" ); |
104 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); | 106 | QHBoxLayout *hboxLayout = new QHBoxLayout( hBox); |
105 | KPrefsWidFont *detailsFont = | 107 | KPrefsWidFont *detailsFont = |
106 | addWidFont(i18n("phone:123"),i18n("Details view font"), | 108 | addWidFont(i18n("phone:123"),i18n("Details view font"), |
107 | &(KABPrefs::instance()->mDetailsFont),hBox); | 109 | &(KABPrefs::instance()->mDetailsFont),hBox); |
108 | hboxLayout->addWidget(detailsFont->label()); | 110 | hboxLayout->addWidget(detailsFont->label()); |
109 | hboxLayout->addWidget(detailsFont->preview()); | 111 | hboxLayout->addWidget(detailsFont->preview()); |
110 | hboxLayout->addWidget(detailsFont->button()); | 112 | hboxLayout->addWidget(detailsFont->button()); |
111 | hboxLayout->setMargin(KDialog::marginHintSmall() ); | 113 | hboxLayout->setMargin(KDialog::marginHintSmall() ); |
112 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); | 114 | hboxLayout->setSpacing(KDialog::spacingHintSmall()); |
113 | //hBox->setBackgroundColor( black); | 115 | //hBox->setBackgroundColor( black); |
114 | layout->addWidget( hBox ); | 116 | layout->addWidget( hBox ); |
115 | 117 | ||
116 | //general groupbox | 118 | //general groupbox |
117 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); | 119 | QWidget *vBox = new QWidget( generalPage, "qvbox" ); |
118 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); | 120 | QVBoxLayout *boxLayout = new QVBoxLayout( vBox ); |
119 | boxLayout->setAlignment( Qt::AlignTop ); | 121 | boxLayout->setAlignment( Qt::AlignTop ); |
120 | boxLayout->setMargin(KDialog::marginHintSmall() ); | 122 | boxLayout->setMargin(KDialog::marginHintSmall() ); |
121 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); | 123 | boxLayout->setSpacing( KDialog::spacingHintSmall() ); |
122 | mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); | 124 | mMenuBarBox = new QCheckBox( i18n( "Full Menu bar (restart)" ), vBox, "mremenuturn" ); |
123 | boxLayout->addWidget( mMenuBarBox ); | 125 | boxLayout->addWidget( mMenuBarBox ); |
124 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); | 126 | mSearchReturnBox = new QCheckBox( i18n( "Search only after <return> key pressed" ), vBox, "mreturn" ); |
125 | boxLayout->addWidget( mSearchReturnBox ); | 127 | boxLayout->addWidget( mSearchReturnBox ); |
126 | mAutoSearchWithWildcardBox = new QCheckBox( i18n( "Search with '*' prefix (wildcard)" ), vBox, "mwildcard" ); | 128 | mAutoSearchWithWildcardBox = new QCheckBox( i18n( "Search with '*' prefix (wildcard)" ), vBox, "mwildcard" ); |
127 | boxLayout->addWidget( mAutoSearchWithWildcardBox); | 129 | boxLayout->addWidget( mAutoSearchWithWildcardBox); |
128 | mHideSearchOnSwitchBox = new QCheckBox( i18n( "Shrink searchfield in portrait view" ), vBox, "mswitch" ); | 130 | mHideSearchOnSwitchBox = new QCheckBox( i18n( "Shrink searchfield in portrait view" ), vBox, "mswitch" ); |
129 | boxLayout->addWidget( mHideSearchOnSwitchBox ); | 131 | boxLayout->addWidget( mHideSearchOnSwitchBox ); |
130 | 132 | ||
131 | #ifdef DESKTOP_VERSION | 133 | #ifdef DESKTOP_VERSION |
132 | mHideSearchOnSwitchBox->hide(); | 134 | mHideSearchOnSwitchBox->hide(); |
133 | #endif | 135 | #endif |
134 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); | 136 | mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), vBox, "msingle" ); |
135 | boxLayout->addWidget( mViewsSingleClickBox ); | 137 | boxLayout->addWidget( mViewsSingleClickBox ); |
136 | 138 | ||
137 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); | 139 | mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), vBox, "mparse" ); |
138 | boxLayout->addWidget( mNameParsing ); | 140 | boxLayout->addWidget( mNameParsing ); |
139 | 141 | ||
140 | mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); | 142 | mMultipleViewsAtOnce = new QCheckBox( i18n( "Display List and Details at once (restart)" ), vBox, "mdisplay" ); |