mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-17 23:04:06 +00:00
953d9237a3
Better early than late, this year is ending anyway.
42 lines
1,003 B
C++
42 lines
1,003 B
C++
/* This file is (c) 2008-2011 Konstantin Isakov <ikm@users.berlios.de>
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
#include "initializing.hh"
|
|
#include <QCloseEvent>
|
|
|
|
Initializing::Initializing( QWidget * parent, bool showOnStartup ): QDialog( parent )
|
|
{
|
|
ui.setupUi( this );
|
|
setWindowFlags( Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
|
Qt::WindowMinimizeButtonHint );
|
|
|
|
setWindowIcon( QIcon( ":/icons/programicon.png" ) );
|
|
|
|
if ( showOnStartup )
|
|
{
|
|
ui.operation->setText( tr( "Please wait..." ) );
|
|
ui.dictionary->hide();
|
|
ui.progressBar->hide();
|
|
show();
|
|
}
|
|
}
|
|
|
|
void Initializing::indexing( QString const & dictionaryName )
|
|
{
|
|
ui.operation->setText( tr( "Please wait while indexing dictionary" ) );
|
|
ui.dictionary->setText( dictionaryName );
|
|
ui.dictionary->show();
|
|
ui.progressBar->show();
|
|
show();
|
|
}
|
|
|
|
void Initializing::closeEvent( QCloseEvent * ev )
|
|
{
|
|
ev->ignore();
|
|
}
|
|
|
|
void Initializing::reject()
|
|
{
|
|
}
|
|
|