moved kdeaccessibility kdeaddons kdeadmin kdeartwork kdebindings kdeedu kdegames...
[kdeedu.git] / kvoctrain / kvoctrain / kvoctrainview.h
blobcd279b1e7c31a8a73d04f9be5fcdb9ffcd659d9d
1 /***************************************************************************
3 view to kvoctrain parts
5 -----------------------------------------------------------------------
7 begin : Thu Mar 11 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) 2004-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 ***************************************************************************/
27 #ifndef KVOCTRAINVIEW_H
28 #define KVOCTRAINVIEW_H
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
34 class QGridLayout;
35 class QFrame;
36 class KApplication;
37 class kvoctrainExpr;
38 class KVocTrainTable;
39 class kvoctrainApp;
40 class kvoctrainDoc;
41 class GradeCols;
43 #include "kvoctraindoc.h"
45 /**
46 * This class provides an incomplete base for your application view.
49 class kvoctrainView : public QWidget
51 Q_OBJECT
53 public:
55 /*enum Resizer { Automatic, // guess something meaningful for resizing
56 Fixed, // keep users sizes
57 Percent}; // keep percentage of size
59 //void setResizer (Resizer res) { header_resizer = res; }
61 /** Constructor for the main view */
62 kvoctrainView(kvoctrainDoc* doc, const LangSet &ls, kvoctrainApp *parent = 0);
64 /** Destructor for the main view */
65 ~kvoctrainView();
67 /** sets view to another vocabulary */
68 void setView (kvoctrainDoc *doc, const LangSet &ls);
70 KVocTrainTable* getTable() { return lb_list; }
71 void setHeaderProp (int id, const QString &name, const QString &pixfile=QString::null);
73 void adjustContent();
75 private:
77 protected:
78 KVocTrainTable *lb_list;
79 bool autoResize;
80 kvoctrainDoc *the_doc;
81 QGridLayout *list_layout;
82 //Resizer header_resizer;
83 kvoctrainApp *parent;
85 /** resizes table when frame is resized */
86 virtual void resizeEvent ( QResizeEvent * );
87 void showEvent ( QShowEvent * s_ev);
90 #endif // KVOCTRAINVIEW_H