author | zecke <zecke> | 2004-10-12 12:19:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-10-12 12:19:49 (UTC) |
commit | 363cc582d2a6c9b6fa1409bccaef861ea1bcce15 (patch) (unidiff) | |
tree | a6ae8bf1c0670acee7e9ddc839045e2f078ea6b3 | |
parent | 04f5d8a14e4f09196242e1ed777b521ed8e72916 (diff) | |
download | opie-363cc582d2a6c9b6fa1409bccaef861ea1bcce15.zip opie-363cc582d2a6c9b6fa1409bccaef861ea1bcce15.tar.gz opie-363cc582d2a6c9b6fa1409bccaef861ea1bcce15.tar.bz2 |
-Make converter_base a QWidget
-Provide a C'tor with QWidget,const char* name, WFlags fl
-Make it quicklaunchable
-rw-r--r-- | noncore/tools/pimconverter/converter.cpp | 29 | ||||
-rwxr-xr-x | noncore/tools/pimconverter/converter.h | 3 | ||||
-rw-r--r-- | noncore/tools/pimconverter/converter.pro | 5 | ||||
-rw-r--r-- | noncore/tools/pimconverter/converter_base.ui | 2 |
4 files changed, 13 insertions, 26 deletions
diff --git a/noncore/tools/pimconverter/converter.cpp b/noncore/tools/pimconverter/converter.cpp index ded59b6..e9de3c3 100644 --- a/noncore/tools/pimconverter/converter.cpp +++ b/noncore/tools/pimconverter/converter.cpp | |||
@@ -1,239 +1,226 @@ | |||
1 | #include "converter.h" | 1 | #include "converter.h" |
2 | 2 | ||
3 | /* OPIE */ | 3 | /* OPIE */ |
4 | #include <qpe/qpeapplication.h> | 4 | #include <opie2/oapplicationfactory.h> |
5 | |||
6 | #include <opie2/odebug.h> | 5 | #include <opie2/odebug.h> |
7 | #include <opie2/opimglobal.h> | 6 | #include <opie2/opimglobal.h> |
8 | // Include SQL related header files | 7 | // Include SQL related header files |
9 | #define __USE_SQL | 8 | #define __USE_SQL |
10 | #include <opie2/opimaccessfactory.h> | 9 | #include <opie2/opimaccessfactory.h> |
11 | 10 | ||
12 | /* QT */ | 11 | /* QT */ |
13 | #include <qdatetime.h> | 12 | #include <qdatetime.h> |
14 | #include <qprogressbar.h> | 13 | #include <qprogressbar.h> |
15 | #include <qcombobox.h> | 14 | #include <qcombobox.h> |
16 | #include <qcheckbox.h> | 15 | #include <qcheckbox.h> |
17 | #include <qmessagebox.h> | 16 | #include <qmessagebox.h> |
18 | 17 | ||
19 | 18 | ||
19 | OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<Converter> ) | ||
20 | |||
20 | using namespace Opie; | 21 | using namespace Opie; |
21 | using namespace Pim; | 22 | using namespace Pim; |
22 | 23 | ||
23 | Converter::Converter(): | 24 | Converter::Converter(QWidget *p, const char* n, WFlags fl): |
25 | converter_base( p, n, fl ), | ||
24 | m_selectedDatabase( ADDRESSBOOK ), | 26 | m_selectedDatabase( ADDRESSBOOK ), |
25 | m_selectedSourceFormat( XML ), | 27 | m_selectedSourceFormat( XML ), |
26 | m_selectedDestFormat( SQL ), | 28 | m_selectedDestFormat( SQL ), |
27 | m_criticalState( false ) | 29 | m_criticalState( false ) |
28 | { | 30 | { |
29 | m_dataBaseSelector -> setCurrentItem( m_selectedDatabase ); | 31 | m_dataBaseSelector -> setCurrentItem( m_selectedDatabase ); |
30 | m_sourceFormatSelector -> setCurrentItem( m_selectedSourceFormat ); | 32 | m_sourceFormatSelector -> setCurrentItem( m_selectedSourceFormat ); |
31 | m_destFormatSelector -> setCurrentItem( m_selectedDestFormat ); | 33 | m_destFormatSelector -> setCurrentItem( m_selectedDestFormat ); |
32 | m_eraseDB -> setChecked( true ); // Default erase on copy | 34 | m_eraseDB -> setChecked( true ); // Default erase on copy |
33 | } | 35 | } |
34 | 36 | ||
35 | void Converter::selectedDatabase( int num ) | 37 | void Converter::selectedDatabase( int num ) |
36 | { | 38 | { |
37 | m_selectedDatabase = num; | 39 | m_selectedDatabase = num; |
38 | } | 40 | } |
39 | 41 | ||
40 | void Converter::selectedDestFormat( int num ) | 42 | void Converter::selectedDestFormat( int num ) |
41 | { | 43 | { |
42 | m_selectedDestFormat = num; | 44 | m_selectedDestFormat = num; |
43 | } | 45 | } |
44 | 46 | ||
45 | void Converter::selectedSourceFormat( int num ) | 47 | void Converter::selectedSourceFormat( int num ) |
46 | { | 48 | { |
47 | m_selectedSourceFormat = num; | 49 | m_selectedSourceFormat = num; |
48 | } | 50 | } |
49 | 51 | ||
50 | void Converter::start_conversion(){ | 52 | void Converter::start_conversion(){ |
51 | 53 | ||
52 | // Creating backends to the requested databases.. | 54 | // Creating backends to the requested databases.. |
53 | OPimBase* sourceDB; | 55 | OPimBase* sourceDB; |
54 | OPimBase* destDB; | 56 | OPimBase* destDB; |
55 | 57 | ||
56 | odebug << "SourceFormat: " << m_selectedSourceFormat << oendl; | 58 | odebug << "SourceFormat: " << m_selectedSourceFormat << oendl; |
57 | odebug << "DestFormat: " << m_selectedDestFormat << oendl; | 59 | odebug << "DestFormat: " << m_selectedDestFormat << oendl; |
58 | if ( m_selectedSourceFormat == m_selectedDestFormat ){ | 60 | if ( m_selectedSourceFormat == m_selectedDestFormat ){ |
59 | 61 | ||
60 | QMessageBox::warning( this, "PimConverter", | 62 | QMessageBox::warning( this, "PimConverter", |
61 | tr( "It is not a good idea to use\n" ) | 63 | tr( "It is not a good idea to use\n" ) |
62 | +tr( "the same source and destformat !" ), | 64 | +tr( "the same source and destformat !" ), |
63 | tr( "Ok" ) ); | 65 | tr( "Ok" ) ); |
64 | return; | 66 | return; |
65 | } | 67 | } |
66 | 68 | ||
67 | switch( m_selectedSourceFormat ){ | 69 | switch( m_selectedSourceFormat ){ |
68 | case XML: | 70 | case XML: |
69 | odebug << "XMLSourceDB = " << m_selectedDatabase << "" << oendl; | 71 | odebug << "XMLSourceDB = " << m_selectedDatabase << "" << oendl; |
70 | switch( m_selectedDatabase ){ | 72 | switch( m_selectedDatabase ){ |
71 | case ADDRESSBOOK:{ | 73 | case ADDRESSBOOK:{ |
72 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); | 74 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); |
73 | } | 75 | } |
74 | break; | 76 | break; |
75 | case TODOLIST:{ | 77 | case TODOLIST:{ |
76 | sourceDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::XML, "converter" ); | 78 | sourceDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::XML, "converter" ); |
77 | }break; | 79 | }break; |
78 | case DATEBOOK:{ | 80 | case DATEBOOK:{ |
79 | sourceDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::XML, "converter" ); | 81 | sourceDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::XML, "converter" ); |
80 | } | 82 | } |
81 | break; | 83 | break; |
82 | default: | 84 | default: |
83 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; | 85 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
84 | return; | 86 | return; |
85 | } | 87 | } |
86 | break; | 88 | break; |
87 | case SQL: | 89 | case SQL: |
88 | odebug << "SQLSourceDB = " << m_selectedDatabase << "" << oendl; | 90 | odebug << "SQLSourceDB = " << m_selectedDatabase << "" << oendl; |
89 | switch( m_selectedDatabase ){ | 91 | switch( m_selectedDatabase ){ |
90 | case ADDRESSBOOK:{ | 92 | case ADDRESSBOOK:{ |
91 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); | 93 | sourceDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); |
92 | } | 94 | } |
93 | break; | 95 | break; |
94 | case TODOLIST:{ | 96 | case TODOLIST:{ |
95 | sourceDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::SQL, "converter" ); | 97 | sourceDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::SQL, "converter" ); |
96 | }break; | 98 | }break; |
97 | case DATEBOOK:{ | 99 | case DATEBOOK:{ |
98 | sourceDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::SQL, "converter" ); | 100 | sourceDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::SQL, "converter" ); |
99 | } | 101 | } |
100 | break; | 102 | break; |
101 | default: | 103 | default: |
102 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; | 104 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
103 | return; | 105 | return; |
104 | } | 106 | } |
105 | break; | 107 | break; |
106 | default: | 108 | default: |
107 | owarn << "Unknown source format selected (" << m_selectedSourceFormat << ") !!" << oendl; | 109 | owarn << "Unknown source format selected (" << m_selectedSourceFormat << ") !!" << oendl; |
108 | return; | 110 | return; |
109 | } | 111 | } |
110 | 112 | ||
111 | switch ( m_selectedDestFormat ){ | 113 | switch ( m_selectedDestFormat ){ |
112 | case XML: | 114 | case XML: |
113 | odebug << "XMLDestDB = " << m_selectedDatabase << "" << oendl; | 115 | odebug << "XMLDestDB = " << m_selectedDatabase << "" << oendl; |
114 | switch( m_selectedDatabase ){ | 116 | switch( m_selectedDatabase ){ |
115 | case ADDRESSBOOK:{ | 117 | case ADDRESSBOOK:{ |
116 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); | 118 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::XML, "converter" ); |
117 | } | 119 | } |
118 | break; | 120 | break; |
119 | case TODOLIST:{ | 121 | case TODOLIST:{ |
120 | destDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::XML, "converter" ); | 122 | destDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::XML, "converter" ); |
121 | }break; | 123 | }break; |
122 | case DATEBOOK:{ | 124 | case DATEBOOK:{ |
123 | destDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::XML, "converter" ); | 125 | destDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::XML, "converter" ); |
124 | } | 126 | } |
125 | break; | 127 | break; |
126 | default: | 128 | default: |
127 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; | 129 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
128 | return; | 130 | return; |
129 | } | 131 | } |
130 | break; | 132 | break; |
131 | case SQL: | 133 | case SQL: |
132 | odebug << "SQLDestDB = " << m_selectedDatabase << "" << oendl; | 134 | odebug << "SQLDestDB = " << m_selectedDatabase << "" << oendl; |
133 | switch( m_selectedDatabase ){ | 135 | switch( m_selectedDatabase ){ |
134 | case ADDRESSBOOK:{ | 136 | case ADDRESSBOOK:{ |
135 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); | 137 | destDB = OPimAccessFactory<OPimContactAccess>::create( OPimGlobal::CONTACTLIST, OPimGlobal::SQL, "converter" ); |
136 | } | 138 | } |
137 | break; | 139 | break; |
138 | case TODOLIST:{ | 140 | case TODOLIST:{ |
139 | destDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::SQL, "converter" ); | 141 | destDB = OPimAccessFactory<OPimTodoAccess>::create( OPimGlobal::TODOLIST, OPimGlobal::SQL, "converter" ); |
140 | }break; | 142 | }break; |
141 | case DATEBOOK:{ | 143 | case DATEBOOK:{ |
142 | destDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::SQL, "converter" ); | 144 | destDB = OPimAccessFactory<ODateBookAccess>::create( OPimGlobal::DATEBOOK, OPimGlobal::SQL, "converter" ); |
143 | } | 145 | } |
144 | break; | 146 | break; |
145 | default: | 147 | default: |
146 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; | 148 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
147 | return; | 149 | return; |
148 | } | 150 | } |
149 | break; | 151 | break; |
150 | default: | 152 | default: |
151 | owarn << "Unknown destination format selected (" << m_selectedDestFormat << ")!!" << oendl; | 153 | owarn << "Unknown destination format selected (" << m_selectedDestFormat << ")!!" << oendl; |
152 | return; | 154 | return; |
153 | } | 155 | } |
154 | 156 | ||
155 | if ( !sourceDB || !destDB ) | 157 | if ( !sourceDB || !destDB ) |
156 | return; | 158 | return; |
157 | 159 | ||
158 | m_criticalState = true; | 160 | m_criticalState = true; |
159 | 161 | ||
160 | sourceDB -> load(); | 162 | sourceDB -> load(); |
161 | destDB -> load(); | 163 | destDB -> load(); |
162 | 164 | ||
163 | QTime t; | 165 | QTime t; |
164 | t.start(); | 166 | t.start(); |
165 | 167 | ||
166 | // Clean the dest-database if requested (isChecked) | 168 | // Clean the dest-database if requested (isChecked) |
167 | if ( m_eraseDB -> isChecked() ){ | 169 | if ( m_eraseDB -> isChecked() ){ |
168 | odebug << "Clearing destination database!" << oendl; | 170 | odebug << "Clearing destination database!" << oendl; |
169 | destDB -> clear(); | 171 | destDB -> clear(); |
170 | } | 172 | } |
171 | 173 | ||
172 | // Now transmit every pim-item from the source database to the destination -database | 174 | // Now transmit every pim-item from the source database to the destination -database |
173 | QArray<int> uidList = sourceDB->records(); | 175 | QArray<int> uidList = sourceDB->records(); |
174 | odebug << "Try to move data for addressbook.. (" << uidList.count() << " items) " << oendl; | 176 | odebug << "Try to move data for addressbook.. (" << uidList.count() << " items) " << oendl; |
175 | m_progressBar->setTotalSteps( uidList.count() ); | 177 | m_progressBar->setTotalSteps( uidList.count() ); |
176 | int count = 0; | 178 | int count = 0; |
177 | for ( uint i = 0; i < uidList.count(); ++i ){ | 179 | for ( uint i = 0; i < uidList.count(); ++i ){ |
178 | odebug << "Adding uid: " << uidList[i] << "" << oendl; | 180 | odebug << "Adding uid: " << uidList[i] << "" << oendl; |
179 | OPimRecord* rec = sourceDB -> record( uidList[i] ); | 181 | OPimRecord* rec = sourceDB -> record( uidList[i] ); |
180 | destDB -> add( rec ); | 182 | destDB -> add( rec ); |
181 | m_progressBar->setProgress( ++count ); | 183 | m_progressBar->setProgress( ++count ); |
182 | } | 184 | } |
183 | 185 | ||
184 | // Now commit data.. | 186 | // Now commit data.. |
185 | destDB -> save(); | 187 | destDB -> save(); |
186 | 188 | ||
187 | m_criticalState = false; | 189 | m_criticalState = false; |
188 | 190 | ||
189 | // Delete the frontends. Backends will be deleted automatically, too ! | 191 | // Delete the frontends. Backends will be deleted automatically, too ! |
190 | // We have to cast them back to delete them properly ! | 192 | // We have to cast them back to delete them properly ! |
191 | switch( m_selectedDatabase ){ | 193 | switch( m_selectedDatabase ){ |
192 | case ADDRESSBOOK: | 194 | case ADDRESSBOOK: |
193 | delete static_cast<OPimContactAccess*> (sourceDB); | 195 | delete static_cast<OPimContactAccess*> (sourceDB); |
194 | delete static_cast<OPimContactAccess*> (destDB); | 196 | delete static_cast<OPimContactAccess*> (destDB); |
195 | break; | 197 | break; |
196 | case TODOLIST: | 198 | case TODOLIST: |
197 | delete static_cast<OPimTodoAccess*> (sourceDB); | 199 | delete static_cast<OPimTodoAccess*> (sourceDB); |
198 | delete static_cast<OPimTodoAccess*> (destDB); | 200 | delete static_cast<OPimTodoAccess*> (destDB); |
199 | break; | 201 | break; |
200 | case DATEBOOK: | 202 | case DATEBOOK: |
201 | delete static_cast<ODateBookAccess*> (sourceDB); | 203 | delete static_cast<ODateBookAccess*> (sourceDB); |
202 | delete static_cast<ODateBookAccess*> (destDB); | 204 | delete static_cast<ODateBookAccess*> (destDB); |
203 | break; | 205 | break; |
204 | default: | 206 | default: |
205 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; | 207 | owarn << "Unknown database selected (" << m_selectedDatabase << ")" << oendl; |
206 | return; | 208 | return; |
207 | } | 209 | } |
208 | 210 | ||
209 | 211 | ||
210 | owarn << "Conversion is finished and needed " << t.elapsed() << " ms !" << oendl; | 212 | owarn << "Conversion is finished and needed " << t.elapsed() << " ms !" << oendl; |
211 | } | 213 | } |
212 | 214 | ||
213 | void Converter::closeEvent( QCloseEvent *e ) | 215 | void Converter::closeEvent( QCloseEvent *e ) |
214 | { | 216 | { |
215 | 217 | ||
216 | /* Due to the fact that we don't have multitasking here, this | 218 | /* Due to the fact that we don't have multitasking here, this |
217 | * critical handling don't make sense, but the future.. | 219 | * critical handling don't make sense, but the future.. |
218 | */ | 220 | */ |
219 | if ( m_criticalState ){ | 221 | if ( m_criticalState ){ |
220 | e->ignore(); | 222 | e->ignore(); |
221 | return; | 223 | return; |
222 | } | 224 | } |
223 | e->accept(); | 225 | e->accept(); |
224 | } | 226 | } |
225 | |||
226 | |||
227 | |||
228 | int main( int argc, char** argv ) { | ||
229 | |||
230 | QPEApplication a( argc, argv ); | ||
231 | |||
232 | Converter dlg; | ||
233 | |||
234 | a.showMainWidget( &dlg ); | ||
235 | // dlg. showMaximized ( ); | ||
236 | |||
237 | return a.exec(); | ||
238 | |||
239 | } | ||
diff --git a/noncore/tools/pimconverter/converter.h b/noncore/tools/pimconverter/converter.h index a78c6bc..344562a 100755 --- a/noncore/tools/pimconverter/converter.h +++ b/noncore/tools/pimconverter/converter.h | |||
@@ -1,43 +1,44 @@ | |||
1 | #ifndef _CONVERTER_H_ | 1 | #ifndef _CONVERTER_H_ |
2 | #define _CONVERTER_H_ | 2 | #define _CONVERTER_H_ |
3 | 3 | ||
4 | 4 | ||
5 | #include "converter_base.h" | 5 | #include "converter_base.h" |
6 | 6 | ||
7 | 7 | ||
8 | class Converter: public converter_base { | 8 | class Converter: public converter_base { |
9 | public: | 9 | public: |
10 | Converter(); | 10 | Converter(QWidget *parent, const char* name, WFlags fl); |
11 | static QString appName() { return QString::fromLatin1("opimconverter");} | ||
11 | 12 | ||
12 | // Slots defined in the ui-description file | 13 | // Slots defined in the ui-description file |
13 | void start_conversion(); | 14 | void start_conversion(); |
14 | void selectedDatabase( int num ); | 15 | void selectedDatabase( int num ); |
15 | void selectedDestFormat( int num ); | 16 | void selectedDestFormat( int num ); |
16 | void selectedSourceFormat( int num ); | 17 | void selectedSourceFormat( int num ); |
17 | 18 | ||
18 | void closeEvent( QCloseEvent *e ); | 19 | void closeEvent( QCloseEvent *e ); |
19 | 20 | ||
20 | private: | 21 | private: |
21 | // Caution: | 22 | // Caution: |
22 | // The order and value of the following enums must be regarding | 23 | // The order and value of the following enums must be regarding |
23 | // the predefinition in the UI-File !! | 24 | // the predefinition in the UI-File !! |
24 | enum DataBases{ | 25 | enum DataBases{ |
25 | ADDRESSBOOK = 0, | 26 | ADDRESSBOOK = 0, |
26 | TODOLIST = 1, | 27 | TODOLIST = 1, |
27 | DATEBOOK = 2, | 28 | DATEBOOK = 2, |
28 | }; | 29 | }; |
29 | 30 | ||
30 | enum DbFormats{ | 31 | enum DbFormats{ |
31 | XML = 0, | 32 | XML = 0, |
32 | SQL = 1, | 33 | SQL = 1, |
33 | }; | 34 | }; |
34 | 35 | ||
35 | int m_selectedDatabase; | 36 | int m_selectedDatabase; |
36 | int m_selectedSourceFormat; | 37 | int m_selectedSourceFormat; |
37 | int m_selectedDestFormat; | 38 | int m_selectedDestFormat; |
38 | bool m_criticalState; | 39 | bool m_criticalState; |
39 | 40 | ||
40 | }; | 41 | }; |
41 | 42 | ||
42 | 43 | ||
43 | #endif | 44 | #endif |
diff --git a/noncore/tools/pimconverter/converter.pro b/noncore/tools/pimconverter/converter.pro index 0504a55..4677ee6 100644 --- a/noncore/tools/pimconverter/converter.pro +++ b/noncore/tools/pimconverter/converter.pro | |||
@@ -1,11 +1,10 @@ | |||
1 | CONFIG = qt warn_on debug | 1 | CONFIG = qt quick-app |
2 | # CONFIG = qt warn_on release quick-app | ||
3 | HEADERS = converter.h | 2 | HEADERS = converter.h |
4 | SOURCES = converter.cpp | 3 | SOURCES = converter.cpp |
5 | INTERFACES = converter_base.ui | 4 | INTERFACES = converter_base.ui |
6 | INCLUDEPATH+= $(OPIEDIR)/include | 5 | INCLUDEPATH+= $(OPIEDIR)/include |
7 | DEPENDPATH+= $(OPIEDIR)/include | 6 | DEPENDPATH+= $(OPIEDIR)/include |
8 | LIBS += -lqpe -lopiecore2 -lopiepim2 -lopiedb2 | 7 | LIBS += -lqpe -lopiecore2 -lopiepim2 -lopiedb2 |
9 | TARGET = $(OPIEDIR)/bin/opimconverter | 8 | TARGET = opimconverter |
10 | 9 | ||
11 | include ( $(OPIEDIR)/include.pro ) | 10 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/tools/pimconverter/converter_base.ui b/noncore/tools/pimconverter/converter_base.ui index c7a2fb5..a5b22c9 100644 --- a/noncore/tools/pimconverter/converter_base.ui +++ b/noncore/tools/pimconverter/converter_base.ui | |||
@@ -1,291 +1,291 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>converter_base</class> | 2 | <class>converter_base</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QDialog</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>converter_base</cstring> | 7 | <cstring>converter_base</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>269</width> | 14 | <width>269</width> |
15 | <height>324</height> | 15 | <height>324</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>PIM-Database Converter</string> | 20 | <string>PIM-Database Converter</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <grid> | 25 | <grid> |
26 | <property stdset="1"> | 26 | <property stdset="1"> |
27 | <name>margin</name> | 27 | <name>margin</name> |
28 | <number>4</number> | 28 | <number>4</number> |
29 | </property> | 29 | </property> |
30 | <property stdset="1"> | 30 | <property stdset="1"> |
31 | <name>spacing</name> | 31 | <name>spacing</name> |
32 | <number>6</number> | 32 | <number>6</number> |
33 | </property> | 33 | </property> |
34 | <widget row="0" column="0" > | 34 | <widget row="0" column="0" > |
35 | <class>QGroupBox</class> | 35 | <class>QGroupBox</class> |
36 | <property stdset="1"> | 36 | <property stdset="1"> |
37 | <name>name</name> | 37 | <name>name</name> |
38 | <cstring>GroupBox6</cstring> | 38 | <cstring>GroupBox6</cstring> |
39 | </property> | 39 | </property> |
40 | <property stdset="1"> | 40 | <property stdset="1"> |
41 | <name>title</name> | 41 | <name>title</name> |
42 | <string>Converter</string> | 42 | <string>Converter</string> |
43 | </property> | 43 | </property> |
44 | <property> | 44 | <property> |
45 | <name>layoutMargin</name> | 45 | <name>layoutMargin</name> |
46 | </property> | 46 | </property> |
47 | <property> | 47 | <property> |
48 | <name>layoutSpacing</name> | 48 | <name>layoutSpacing</name> |
49 | </property> | 49 | </property> |
50 | <vbox> | 50 | <vbox> |
51 | <property stdset="1"> | 51 | <property stdset="1"> |
52 | <name>margin</name> | 52 | <name>margin</name> |
53 | <number>4</number> | 53 | <number>4</number> |
54 | </property> | 54 | </property> |
55 | <property stdset="1"> | 55 | <property stdset="1"> |
56 | <name>spacing</name> | 56 | <name>spacing</name> |
57 | <number>2</number> | 57 | <number>2</number> |
58 | </property> | 58 | </property> |
59 | <widget> | 59 | <widget> |
60 | <class>QGroupBox</class> | 60 | <class>QGroupBox</class> |
61 | <property stdset="1"> | 61 | <property stdset="1"> |
62 | <name>name</name> | 62 | <name>name</name> |
63 | <cstring>GroupBox1</cstring> | 63 | <cstring>GroupBox1</cstring> |
64 | </property> | 64 | </property> |
65 | <property stdset="1"> | 65 | <property stdset="1"> |
66 | <name>title</name> | 66 | <name>title</name> |
67 | <string>Select Database:</string> | 67 | <string>Select Database:</string> |
68 | </property> | 68 | </property> |
69 | <grid> | 69 | <grid> |
70 | <property stdset="1"> | 70 | <property stdset="1"> |
71 | <name>margin</name> | 71 | <name>margin</name> |
72 | <number>11</number> | 72 | <number>11</number> |
73 | </property> | 73 | </property> |
74 | <property stdset="1"> | 74 | <property stdset="1"> |
75 | <name>spacing</name> | 75 | <name>spacing</name> |
76 | <number>6</number> | 76 | <number>6</number> |
77 | </property> | 77 | </property> |
78 | <widget row="0" column="1" > | 78 | <widget row="0" column="1" > |
79 | <class>QComboBox</class> | 79 | <class>QComboBox</class> |
80 | <item> | 80 | <item> |
81 | <property> | 81 | <property> |
82 | <name>text</name> | 82 | <name>text</name> |
83 | <string>Addressbook</string> | 83 | <string>Addressbook</string> |
84 | </property> | 84 | </property> |
85 | </item> | 85 | </item> |
86 | <item> | 86 | <item> |
87 | <property> | 87 | <property> |
88 | <name>text</name> | 88 | <name>text</name> |
89 | <string>TodoList</string> | 89 | <string>TodoList</string> |
90 | </property> | 90 | </property> |
91 | </item> | 91 | </item> |
92 | <item> | 92 | <item> |
93 | <property> | 93 | <property> |
94 | <name>text</name> | 94 | <name>text</name> |
95 | <string>Datebook</string> | 95 | <string>Datebook</string> |
96 | </property> | 96 | </property> |
97 | </item> | 97 | </item> |
98 | <property stdset="1"> | 98 | <property stdset="1"> |
99 | <name>name</name> | 99 | <name>name</name> |
100 | <cstring>m_dataBaseSelector</cstring> | 100 | <cstring>m_dataBaseSelector</cstring> |
101 | </property> | 101 | </property> |
102 | </widget> | 102 | </widget> |
103 | </grid> | 103 | </grid> |
104 | </widget> | 104 | </widget> |
105 | <widget> | 105 | <widget> |
106 | <class>QGroupBox</class> | 106 | <class>QGroupBox</class> |
107 | <property stdset="1"> | 107 | <property stdset="1"> |
108 | <name>name</name> | 108 | <name>name</name> |
109 | <cstring>GroupBox2</cstring> | 109 | <cstring>GroupBox2</cstring> |
110 | </property> | 110 | </property> |
111 | <property stdset="1"> | 111 | <property stdset="1"> |
112 | <name>title</name> | 112 | <name>title</name> |
113 | <string>Source/Destination:</string> | 113 | <string>Source/Destination:</string> |
114 | </property> | 114 | </property> |
115 | <grid> | 115 | <grid> |
116 | <property stdset="1"> | 116 | <property stdset="1"> |
117 | <name>margin</name> | 117 | <name>margin</name> |
118 | <number>11</number> | 118 | <number>11</number> |
119 | </property> | 119 | </property> |
120 | <property stdset="1"> | 120 | <property stdset="1"> |
121 | <name>spacing</name> | 121 | <name>spacing</name> |
122 | <number>6</number> | 122 | <number>6</number> |
123 | </property> | 123 | </property> |
124 | <widget row="1" column="0" > | 124 | <widget row="1" column="0" > |
125 | <class>QLabel</class> | 125 | <class>QLabel</class> |
126 | <property stdset="1"> | 126 | <property stdset="1"> |
127 | <name>name</name> | 127 | <name>name</name> |
128 | <cstring>TextLabel3_2</cstring> | 128 | <cstring>TextLabel3_2</cstring> |
129 | </property> | 129 | </property> |
130 | <property stdset="1"> | 130 | <property stdset="1"> |
131 | <name>text</name> | 131 | <name>text</name> |
132 | <string>to</string> | 132 | <string>to</string> |
133 | </property> | 133 | </property> |
134 | </widget> | 134 | </widget> |
135 | <widget row="1" column="1" > | 135 | <widget row="1" column="1" > |
136 | <class>QComboBox</class> | 136 | <class>QComboBox</class> |
137 | <item> | 137 | <item> |
138 | <property> | 138 | <property> |
139 | <name>text</name> | 139 | <name>text</name> |
140 | <string>XML</string> | 140 | <string>XML</string> |
141 | </property> | 141 | </property> |
142 | </item> | 142 | </item> |
143 | <item> | 143 | <item> |
144 | <property> | 144 | <property> |
145 | <name>text</name> | 145 | <name>text</name> |
146 | <string>SQL (SQLite)</string> | 146 | <string>SQL (SQLite)</string> |
147 | </property> | 147 | </property> |
148 | </item> | 148 | </item> |
149 | <property stdset="1"> | 149 | <property stdset="1"> |
150 | <name>name</name> | 150 | <name>name</name> |
151 | <cstring>m_destFormatSelector</cstring> | 151 | <cstring>m_destFormatSelector</cstring> |
152 | </property> | 152 | </property> |
153 | </widget> | 153 | </widget> |
154 | <widget row="0" column="0" > | 154 | <widget row="0" column="0" > |
155 | <class>QLabel</class> | 155 | <class>QLabel</class> |
156 | <property stdset="1"> | 156 | <property stdset="1"> |
157 | <name>name</name> | 157 | <name>name</name> |
158 | <cstring>TextLabel2_2</cstring> | 158 | <cstring>TextLabel2_2</cstring> |
159 | </property> | 159 | </property> |
160 | <property stdset="1"> | 160 | <property stdset="1"> |
161 | <name>text</name> | 161 | <name>text</name> |
162 | <string>Convert from</string> | 162 | <string>Convert from</string> |
163 | </property> | 163 | </property> |
164 | </widget> | 164 | </widget> |
165 | <widget row="0" column="1" > | 165 | <widget row="0" column="1" > |
166 | <class>QComboBox</class> | 166 | <class>QComboBox</class> |
167 | <item> | 167 | <item> |
168 | <property> | 168 | <property> |
169 | <name>text</name> | 169 | <name>text</name> |
170 | <string>XML</string> | 170 | <string>XML</string> |
171 | </property> | 171 | </property> |
172 | </item> | 172 | </item> |
173 | <item> | 173 | <item> |
174 | <property> | 174 | <property> |
175 | <name>text</name> | 175 | <name>text</name> |
176 | <string>SQL (SQLite)</string> | 176 | <string>SQL (SQLite)</string> |
177 | </property> | 177 | </property> |
178 | </item> | 178 | </item> |
179 | <property stdset="1"> | 179 | <property stdset="1"> |
180 | <name>name</name> | 180 | <name>name</name> |
181 | <cstring>m_sourceFormatSelector</cstring> | 181 | <cstring>m_sourceFormatSelector</cstring> |
182 | </property> | 182 | </property> |
183 | </widget> | 183 | </widget> |
184 | </grid> | 184 | </grid> |
185 | </widget> | 185 | </widget> |
186 | <widget> | 186 | <widget> |
187 | <class>QGroupBox</class> | 187 | <class>QGroupBox</class> |
188 | <property stdset="1"> | 188 | <property stdset="1"> |
189 | <name>name</name> | 189 | <name>name</name> |
190 | <cstring>GroupBox5</cstring> | 190 | <cstring>GroupBox5</cstring> |
191 | </property> | 191 | </property> |
192 | <property stdset="1"> | 192 | <property stdset="1"> |
193 | <name>title</name> | 193 | <name>title</name> |
194 | <string>Config:</string> | 194 | <string>Config:</string> |
195 | </property> | 195 | </property> |
196 | <grid> | 196 | <grid> |
197 | <property stdset="1"> | 197 | <property stdset="1"> |
198 | <name>margin</name> | 198 | <name>margin</name> |
199 | <number>11</number> | 199 | <number>11</number> |
200 | </property> | 200 | </property> |
201 | <property stdset="1"> | 201 | <property stdset="1"> |
202 | <name>spacing</name> | 202 | <name>spacing</name> |
203 | <number>6</number> | 203 | <number>6</number> |
204 | </property> | 204 | </property> |
205 | <widget row="0" column="0" > | 205 | <widget row="0" column="0" > |
206 | <class>QCheckBox</class> | 206 | <class>QCheckBox</class> |
207 | <property stdset="1"> | 207 | <property stdset="1"> |
208 | <name>name</name> | 208 | <name>name</name> |
209 | <cstring>m_eraseDB</cstring> | 209 | <cstring>m_eraseDB</cstring> |
210 | </property> | 210 | </property> |
211 | <property stdset="1"> | 211 | <property stdset="1"> |
212 | <name>text</name> | 212 | <name>text</name> |
213 | <string>Erase before copy</string> | 213 | <string>Erase before copy</string> |
214 | </property> | 214 | </property> |
215 | </widget> | 215 | </widget> |
216 | </grid> | 216 | </grid> |
217 | </widget> | 217 | </widget> |
218 | <widget> | 218 | <widget> |
219 | <class>QGroupBox</class> | 219 | <class>QGroupBox</class> |
220 | <property stdset="1"> | 220 | <property stdset="1"> |
221 | <name>name</name> | 221 | <name>name</name> |
222 | <cstring>GroupBox4</cstring> | 222 | <cstring>GroupBox4</cstring> |
223 | </property> | 223 | </property> |
224 | <property stdset="1"> | 224 | <property stdset="1"> |
225 | <name>title</name> | 225 | <name>title</name> |
226 | <string>Progress:</string> | 226 | <string>Progress:</string> |
227 | </property> | 227 | </property> |
228 | <vbox> | 228 | <vbox> |
229 | <property stdset="1"> | 229 | <property stdset="1"> |
230 | <name>margin</name> | 230 | <name>margin</name> |
231 | <number>11</number> | 231 | <number>11</number> |
232 | </property> | 232 | </property> |
233 | <property stdset="1"> | 233 | <property stdset="1"> |
234 | <name>spacing</name> | 234 | <name>spacing</name> |
235 | <number>6</number> | 235 | <number>6</number> |
236 | </property> | 236 | </property> |
237 | <widget> | 237 | <widget> |
238 | <class>QProgressBar</class> | 238 | <class>QProgressBar</class> |
239 | <property stdset="1"> | 239 | <property stdset="1"> |
240 | <name>name</name> | 240 | <name>name</name> |
241 | <cstring>m_progressBar</cstring> | 241 | <cstring>m_progressBar</cstring> |
242 | </property> | 242 | </property> |
243 | </widget> | 243 | </widget> |
244 | <widget> | 244 | <widget> |
245 | <class>QPushButton</class> | 245 | <class>QPushButton</class> |
246 | <property stdset="1"> | 246 | <property stdset="1"> |
247 | <name>name</name> | 247 | <name>name</name> |
248 | <cstring>PushButton1</cstring> | 248 | <cstring>PushButton1</cstring> |
249 | </property> | 249 | </property> |
250 | <property stdset="1"> | 250 | <property stdset="1"> |
251 | <name>text</name> | 251 | <name>text</name> |
252 | <string>Go!</string> | 252 | <string>Go!</string> |
253 | </property> | 253 | </property> |
254 | </widget> | 254 | </widget> |
255 | </vbox> | 255 | </vbox> |
256 | </widget> | 256 | </widget> |
257 | </vbox> | 257 | </vbox> |
258 | </widget> | 258 | </widget> |
259 | </grid> | 259 | </grid> |
260 | </widget> | 260 | </widget> |
261 | <connections> | 261 | <connections> |
262 | <connection> | 262 | <connection> |
263 | <sender>PushButton1</sender> | 263 | <sender>PushButton1</sender> |
264 | <signal>clicked()</signal> | 264 | <signal>clicked()</signal> |
265 | <receiver>converter_base</receiver> | 265 | <receiver>converter_base</receiver> |
266 | <slot>start_conversion()</slot> | 266 | <slot>start_conversion()</slot> |
267 | </connection> | 267 | </connection> |
268 | <connection> | 268 | <connection> |
269 | <sender>m_sourceFormatSelector</sender> | 269 | <sender>m_sourceFormatSelector</sender> |
270 | <signal>activated(int)</signal> | 270 | <signal>activated(int)</signal> |
271 | <receiver>converter_base</receiver> | 271 | <receiver>converter_base</receiver> |
272 | <slot>selectedSourceFormat(int)</slot> | 272 | <slot>selectedSourceFormat(int)</slot> |
273 | </connection> | 273 | </connection> |
274 | <connection> | 274 | <connection> |
275 | <sender>m_dataBaseSelector</sender> | 275 | <sender>m_dataBaseSelector</sender> |
276 | <signal>activated(int)</signal> | 276 | <signal>activated(int)</signal> |
277 | <receiver>converter_base</receiver> | 277 | <receiver>converter_base</receiver> |
278 | <slot>selectedDatabase(int)</slot> | 278 | <slot>selectedDatabase(int)</slot> |
279 | </connection> | 279 | </connection> |
280 | <connection> | 280 | <connection> |
281 | <sender>m_destFormatSelector</sender> | 281 | <sender>m_destFormatSelector</sender> |
282 | <signal>activated(int)</signal> | 282 | <signal>activated(int)</signal> |
283 | <receiver>converter_base</receiver> | 283 | <receiver>converter_base</receiver> |
284 | <slot>selectedDestFormat(int)</slot> | 284 | <slot>selectedDestFormat(int)</slot> |
285 | </connection> | 285 | </connection> |
286 | <slot access="public">selectedDatabase(int)</slot> | 286 | <slot access="public">selectedDatabase(int)</slot> |
287 | <slot access="public">selectedDestFormat(int)</slot> | 287 | <slot access="public">selectedDestFormat(int)</slot> |
288 | <slot access="public">selectedSourceFormat(int)</slot> | 288 | <slot access="public">selectedSourceFormat(int)</slot> |
289 | <slot access="public">start_conversion()</slot> | 289 | <slot access="public">start_conversion()</slot> |
290 | </connections> | 290 | </connections> |
291 | </UI> | 291 | </UI> |