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
|
|
|
|
2024-10-18 03:08:20 +00:00
|
|
|
Initializing::Initializing( QWidget * parent ):
|
2009-03-29 13:34:39 +00:00
|
|
|
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 );
|
2023-06-20 00:31:44 +00:00
|
|
|
setWindowIcon( QIcon( ":/icons/programicon.png" ) );
|
2009-03-29 13:34:39 +00:00
|
|
|
|
2024-10-18 03:08:20 +00:00
|
|
|
if ( parent->isVisible() ) {
|
2009-03-29 13:34:39 +00:00
|
|
|
ui.operation->setText( tr( "Please wait..." ) );
|
2024-10-18 03:08:20 +00:00
|
|
|
ui.dictionary->setText( "" );
|
2009-03-29 13:34:39 +00:00
|
|
|
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 );
|
|
|
|
show();
|
|
|
|
}
|
2009-02-08 20:55:28 +00:00
|
|
|
|
2023-07-29 13:35:26 +00:00
|
|
|
void Initializing::loading( QString const & dictionaryName )
|
|
|
|
{
|
|
|
|
ui.operation->setText( tr( "Loading..." ) );
|
|
|
|
ui.dictionary->setText( dictionaryName );
|
|
|
|
show();
|
|
|
|
}
|
|
|
|
|
2009-02-08 20:55:28 +00:00
|
|
|
void Initializing::closeEvent( QCloseEvent * ev )
|
|
|
|
{
|
|
|
|
ev->ignore();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Initializing::reject() {}
|