2012-02-20 21:47:14 +00:00
|
|
|
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
|
2009-01-28 20:55:45 +00:00
|
|
|
* Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
|
|
|
|
|
2018-04-10 15:44:43 +00:00
|
|
|
#include <QIcon>
|
2009-01-28 20:55:45 +00:00
|
|
|
#include "initializing.hh"
|
2009-02-08 20:55:28 +00:00
|
|
|
#include <QCloseEvent>
|
2009-01-28 20:55:45 +00:00
|
|
|
|
2009-03-29 13:34:39 +00:00
|
|
|
Initializing::Initializing( QWidget * parent, bool showOnStartup ):
|
|
|
|
QDialog( parent )
|
2009-01-28 20:55:45 +00:00
|
|
|
{
|
|
|
|
ui.setupUi( this );
|
2023-06-10 05:36:23 +00:00
|
|
|
|
2023-07-08 00:59:42 +00:00
|
|
|
setWindowFlags( Qt::Dialog | Qt::FramelessWindowHint );
|
2011-08-06 18:39:16 +00:00
|
|
|
|
2023-06-20 00:31:44 +00:00
|
|
|
setWindowIcon( QIcon( ":/icons/programicon.png" ) );
|
2009-03-29 13:34:39 +00:00
|
|
|
|
|
|
|
if ( showOnStartup ) {
|
|
|
|
ui.operation->setText( tr( "Please wait..." ) );
|
|
|
|
ui.dictionary->hide();
|
|
|
|
ui.progressBar->hide();
|
|
|
|
show();
|
|
|
|
}
|
2009-01-28 20:55:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Initializing::indexing( QString const & dictionaryName )
|
|
|
|
{
|
2023-06-10 05:36:23 +00:00
|
|
|
ui.operation->setText( tr( "Indexing..." ) );
|
2009-01-28 20:55:45 +00:00
|
|
|
ui.dictionary->setText( dictionaryName );
|
2009-03-29 13:34:39 +00:00
|
|
|
ui.dictionary->show();
|
|
|
|
ui.progressBar->show();
|
2013-05-22 13:09:43 +00:00
|
|
|
adjustSize();
|
2009-01-28 20:55:45 +00:00
|
|
|
show();
|
|
|
|
}
|
2009-02-08 20:55:28 +00:00
|
|
|
|
|
|
|
void Initializing::closeEvent( QCloseEvent * ev )
|
|
|
|
{
|
|
|
|
ev->ignore();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Initializing::reject() {}
|