moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kvoctrain / kvoctrain / statistik-dialogs / StatistikDlg.cpp
blob488df80407bae99eab8eab0cafe1a6f9ed18c356
1 /***************************************************************************
3 statistics dialog class
5 -----------------------------------------------------------------------
7 begin : Sun Sep 19 20:50:53 MET 1999
9 copyright : (C) 1999-2001 Ewald Arnold <kvoctrain@ewald-arnold.de>
10 (C) 2001 The KDE-EDU team
11 (C) 2005 Peter Hedlund <peter@peterandlinda.com>
13 -----------------------------------------------------------------------
15 ***************************************************************************
17 ***************************************************************************
18 * *
19 * This program is free software; you can redistribute it and/or modify *
20 * it under the terms of the GNU General Public License as published by *
21 * the Free Software Foundation; either version 2 of the License, or *
22 * (at your option) any later version. *
23 * *
24 ***************************************************************************/
26 #include <qlayout.h>
28 #include "StatistikDlg.h"
29 #include "StatistikPage.h"
30 #include "GenStatPage.h"
32 #include <klocale.h>
34 #include <langset.h>
35 #include <kvoctraindoc.h>
37 StatistikDlg::StatistikDlg(LangSet &langset, kvoctrainDoc *doc, QWidget *parent, const char *name, bool modal)
38 : KDialogBase(Tabbed, i18n("Document Statistics"), Close, Close, parent, name, modal)
40 QFrame * page;
41 QVBoxLayout * topLayout;
42 StatistikPage *spage;
44 page = addPage(i18n("General"));
45 topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
46 GenStatPage *gspage = new GenStatPage (doc, page, name);
47 topLayout->addWidget(gspage);
49 for (int i = 1; i < (int) doc->numLangs(); i++)
51 QString s = langset.findLongId(doc->getIdent(i));
52 if (s.isEmpty() )
53 s = doc->getIdent(i);
54 else
55 s = i18n(s.local8Bit());
57 page = addPage(s);
58 topLayout = new QVBoxLayout( page, 0, KDialog::spacingHint() );
59 spage = new StatistikPage (i, doc, page, name);
60 topLayout->addWidget(spage);
64 #include "StatistikDlg.moc"