Diffstat (limited to 'kaddressbook/views/kaddressbookcardview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/views/kaddressbookcardview.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h index b8efb01..45a9781 100644 --- a/kaddressbook/views/kaddressbookcardview.h +++ b/kaddressbook/views/kaddressbookcardview.h | |||
@@ -15,96 +15,98 @@ | |||
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 16 | GNU General Public License for more details. |
17 | 17 | ||
18 | You should have received a copy of the GNU General Public License | 18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software | 19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 | 21 | ||
22 | As a special exception, permission is given to link this program | 22 | As a special exception, permission is given to link this program |
23 | with any edition of Qt, and distribute the resulting executable, | 23 | with any edition of Qt, and distribute the resulting executable, |
24 | without including the source code for Qt in the source distribution. | 24 | without including the source code for Qt in the source distribution. |
25 | */ | 25 | */ |
26 | 26 | ||
27 | #include <qstring.h> | 27 | #include <qstring.h> |
28 | #ifndef KAB_EMBEDDED | 28 | #ifndef KAB_EMBEDDED |
29 | #include <kiconview.h> | 29 | #include <kiconview.h> |
30 | #else //KAB_EMBEDDED | 30 | #else //KAB_EMBEDDED |
31 | #include <klocale.h> | 31 | #include <klocale.h> |
32 | #endif //KAB_EMBEDDED | 32 | #endif //KAB_EMBEDDED |
33 | 33 | ||
34 | #include "cardview.h" | 34 | #include "cardview.h" |
35 | #include "kaddressbookview.h" | 35 | #include "kaddressbookview.h" |
36 | #include "configurecardviewdialog.h" | 36 | #include "configurecardviewdialog.h" |
37 | 37 | ||
38 | class QDragEnterEvent; | 38 | class QDragEnterEvent; |
39 | class QDragEntryEvent; | 39 | class QDragEntryEvent; |
40 | class QDropEvent; | 40 | class QDropEvent; |
41 | class KConfig; | 41 | class KConfig; |
42 | class AddresseeCardView; | 42 | class AddresseeCardView; |
43 | 43 | ||
44 | /** | 44 | /** |
45 | This view uses the CardView class to create a card view. At some | 45 | This view uses the CardView class to create a card view. At some |
46 | point in the future I think this will be the default view of | 46 | point in the future I think this will be the default view of |
47 | KAddressBook. | 47 | KAddressBook. |
48 | */ | 48 | */ |
49 | class KAddressBookCardView : public KAddressBookView | 49 | class KAddressBookCardView : public KAddressBookView |
50 | { | 50 | { |
51 | Q_OBJECT | 51 | Q_OBJECT |
52 | 52 | ||
53 | public: | 53 | public: |
54 | KAddressBookCardView( KABC::AddressBook *ab, QWidget *parent, | 54 | KAddressBookCardView( KABC::AddressBook *ab, QWidget *parent, |
55 | const char *name = 0 ); | 55 | const char *name = 0 ); |
56 | virtual ~KAddressBookCardView(); | 56 | virtual ~KAddressBookCardView(); |
57 | void doSearch( const QString& s,KABC::Field *field ); | 57 | void doSearch( const QString& s,KABC::Field *field ); |
58 | virtual QStringList selectedUids(); | 58 | virtual QStringList selectedUids(); |
59 | virtual QString type() const { return "Card"; } | 59 | virtual QString type() const { return "Card"; } |
60 | 60 | ||
61 | virtual void readConfig(KConfig *config); | 61 | virtual void readConfig(KConfig *config); |
62 | virtual void writeConfig(KConfig *); | 62 | virtual void writeConfig(KConfig *); |
63 | virtual void scrollUP(); | ||
64 | virtual void scrollDOWN(); | ||
63 | 65 | ||
64 | public slots: | 66 | public slots: |
65 | void refresh(QString uid = QString::null); | 67 | void refresh(QString uid = QString::null); |
66 | void setSelected(QString uid/*US = QString::null*/, bool selected/*US = true*/); | 68 | void setSelected(QString uid/*US = QString::null*/, bool selected/*US = true*/); |
67 | //US added an additional method without parameter | 69 | //US added an additional method without parameter |
68 | void setSelected(); | 70 | void setSelected(); |
69 | 71 | ||
70 | protected slots: | 72 | protected slots: |
71 | void addresseeExecuted(CardViewItem *item); | 73 | void addresseeExecuted(CardViewItem *item); |
72 | void addresseeSelected(); | 74 | void addresseeSelected(); |
73 | 75 | ||
74 | private: | 76 | private: |
75 | AddresseeCardView *mCardView; | 77 | AddresseeCardView *mCardView; |
76 | bool mShowEmptyFields; | 78 | bool mShowEmptyFields; |
77 | }; | 79 | }; |
78 | 80 | ||
79 | class AddresseeCardView : public CardView | 81 | class AddresseeCardView : public CardView |
80 | { | 82 | { |
81 | Q_OBJECT | 83 | Q_OBJECT |
82 | public: | 84 | public: |
83 | AddresseeCardView(QWidget *parent, const char *name = 0); | 85 | AddresseeCardView(QWidget *parent, const char *name = 0); |
84 | ~AddresseeCardView(); | 86 | ~AddresseeCardView(); |
85 | 87 | ||
86 | signals: | 88 | signals: |
87 | void startAddresseeDrag(); | 89 | void startAddresseeDrag(); |
88 | void addresseeDropped(QDropEvent *); | 90 | void addresseeDropped(QDropEvent *); |
89 | 91 | ||
90 | protected: | 92 | protected: |
91 | virtual void dragEnterEvent(QDragEnterEvent *); | 93 | virtual void dragEnterEvent(QDragEnterEvent *); |
92 | virtual void dropEvent(QDropEvent *); | 94 | virtual void dropEvent(QDropEvent *); |
93 | virtual void startDrag(); | 95 | virtual void startDrag(); |
94 | }; | 96 | }; |
95 | 97 | ||
96 | 98 | ||
97 | class CardViewFactory : public ViewFactory | 99 | class CardViewFactory : public ViewFactory |
98 | { | 100 | { |
99 | public: | 101 | public: |
100 | KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 102 | KAddressBookView *view( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
101 | { | 103 | { |
102 | return new KAddressBookCardView( ab, parent, name ); | 104 | return new KAddressBookCardView( ab, parent, name ); |
103 | } | 105 | } |
104 | 106 | ||
105 | QString type() const { return "Card"; } | 107 | QString type() const { return "Card"; } |
106 | 108 | ||
107 | QString description() const { return i18n( "Rolodex style cards represent contacts." ); } | 109 | QString description() const { return i18n( "Rolodex style cards represent contacts." ); } |
108 | 110 | ||
109 | ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, | 111 | ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, |
110 | const char *name = 0 ) | 112 | const char *name = 0 ) |