author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/addresseeeditordialog.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/addresseeeditordialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/addresseeeditordialog.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index b5a60f2..b925a07 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp | |||
@@ -10,53 +10,56 @@ | |||
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 <qlayout.h> | 24 | #include <qlayout.h> |
25 | #include <qapplication.h> | 25 | #include <qapplication.h> |
26 | #include <QDesktopWidget> | ||
27 | //Added by qt3to4: | ||
28 | #include <Q3VBoxLayout> | ||
26 | 29 | ||
27 | #include <kdebug.h> | 30 | #include <kdebug.h> |
28 | #include <klocale.h> | 31 | #include <klocale.h> |
29 | #include <kglobal.h> | 32 | #include <kglobal.h> |
30 | 33 | ||
31 | #include "addresseeeditorwidget.h" | 34 | #include "addresseeeditorwidget.h" |
32 | #include "kabcore.h" | 35 | #include "kabcore.h" |
33 | 36 | ||
34 | #include "addresseeeditordialog.h" | 37 | #include "addresseeeditordialog.h" |
35 | 38 | ||
36 | AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, | 39 | AddresseeEditorDialog::AddresseeEditorDialog( KABCore *core, QWidget *parent, |
37 | const char *name ) | 40 | const char *name ) |
38 | : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), | 41 | : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), |
39 | KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, | 42 | KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, |
40 | KDialogBase::Ok, parent, name, true ) | 43 | KDialogBase::Ok, parent, name, true ) |
41 | { | 44 | { |
42 | 45 | ||
43 | 46 | ||
44 | QWidget *page = plainPage(); | 47 | QWidget *page = plainPage(); |
45 | 48 | ||
46 | QVBoxLayout *layout = new QVBoxLayout( page ); | 49 | Q3VBoxLayout *layout = new Q3VBoxLayout( page ); |
47 | 50 | ||
48 | mEditorWidget = new AddresseeEditorWidget( core, false, page ); | 51 | mEditorWidget = new AddresseeEditorWidget( core, false, page ); |
49 | connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), | 52 | connect( mEditorWidget, SIGNAL( modified( const KABC::Addressee::List& ) ), |
50 | SLOT( widgetModified() ) ); | 53 | SLOT( widgetModified() ) ); |
51 | layout->addWidget( mEditorWidget ); | 54 | layout->addWidget( mEditorWidget ); |
52 | 55 | ||
53 | enableButton( KDialogBase::Apply, false ); | 56 | enableButton( KDialogBase::Apply, false ); |
54 | if ( QApplication::desktop()->width() < 480 ) { | 57 | if ( QApplication::desktop()->width() < 480 ) { |
55 | hideButtons(); | 58 | hideButtons(); |
56 | } | 59 | } |
57 | } | 60 | } |
58 | 61 | ||
59 | AddresseeEditorDialog::~AddresseeEditorDialog() | 62 | AddresseeEditorDialog::~AddresseeEditorDialog() |
60 | { | 63 | { |
61 | //emit editorDestroyed( mEditorWidget->addressee().uid() ); | 64 | //emit editorDestroyed( mEditorWidget->addressee().uid() ); |
62 | } | 65 | } |
@@ -105,19 +108,19 @@ void AddresseeEditorDialog::slotOk() | |||
105 | emit okClicked(); | 108 | emit okClicked(); |
106 | QDialog::accept(); | 109 | QDialog::accept(); |
107 | } | 110 | } |
108 | 111 | ||
109 | void AddresseeEditorDialog::widgetModified() | 112 | void AddresseeEditorDialog::widgetModified() |
110 | { | 113 | { |
111 | enableButton( KDialogBase::Apply, true ); | 114 | enableButton( KDialogBase::Apply, true ); |
112 | } | 115 | } |
113 | 116 | ||
114 | void AddresseeEditorDialog::slotCancel() | 117 | void AddresseeEditorDialog::slotCancel() |
115 | { | 118 | { |
116 | KDialogBase::slotCancel(); | 119 | KDialogBase::slotCancel(); |
117 | 120 | ||
118 | 121 | ||
119 | } | 122 | } |
120 | 123 | ||
121 | #ifndef KAB_EMBEDDED | 124 | #ifndef KAB_EMBEDDED_ |
122 | #include "addresseeeditordialog.moc" | 125 | #include "moc_addresseeeditordialog.cpp" |
123 | #endif //KAB_EMBEDDED | 126 | #endif //KAB_EMBEDDED |