summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaimportoldialog.cpp
Side-by-side diff
Diffstat (limited to 'kaddressbook/kaimportoldialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kaimportoldialog.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kaddressbook/kaimportoldialog.cpp b/kaddressbook/kaimportoldialog.cpp
index 7bb8bd8..2f794d6 100644
--- a/kaddressbook/kaimportoldialog.cpp
+++ b/kaddressbook/kaimportoldialog.cpp
@@ -13,32 +13,33 @@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qtooltip.h>
#include <qframe.h>
#include <qpixmap.h>
#include <qlayout.h>
#include <qprogressbar.h>
+#include <qprogressdialog.h>
#include <qwidgetstack.h>
#include <qdatetime.h>
#include <qdir.h>
#include <qregexp.h>
#include <qapplication.h>
#include <qhbox.h>
#include <qheader.h>
#include <qdatetime.h>
#include <qlistview.h>
#include <kdebug.h>
#include <klocale.h>
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <kfiledialog.h>
@@ -205,39 +206,39 @@ void KAImportOLdialog::slotApply()
}
QString mes = i18n("Importing complete.\n\n%1 items imported.").arg( importedItems);
KMessageBox::information(this,mes);
}
void KAImportOLdialog::readContactData( DWORD folder )
{
LPDISPATCH dispItem = (LPDISPATCH)folder;
dispItem->AddRef();
MAPIFolder mf(dispItem);
mf.m_lpDispatch->AddRef();
_Items folderItems;
_variant_t indx((long)0);
LPDISPATCH itm;
int i;
folderItems = mf.GetItems();
- QProgressBar bar( folderItems.GetCount(),0 );
- bar.setCaption (i18n("Importing - close to abort!") );
+ QProgressDialog bar( i18n("Importing contact data"),i18n("Abort"), folderItems.GetCount(),this);
+ bar.setCaption (i18n("Importing!") );
int h = bar.sizeHint().height() ;
int w = 300;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
- bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
+ //bar.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
bar.show();
for(i=1; i <= folderItems.GetCount(); ++i)
{
qApp->processEvents();
if ( ! bar.isVisible() )
return ;
bar.setProgress( i );
indx = (long)i;
itm = folderItems.Item(indx.Detach());
_ContactItem * pItem = (_ContactItem *)&itm;
ol2kapiContact( pItem );
itm->Release();
}
}
void KAImportOLdialog::slotOk()
{