TermDialog.h

Go to the documentation of this file.
00001 #ifndef TERM_DIALOG_H
00002 #define TERM_DIALOG_H 
00003 
00004 #include <qaction.h>
00005 #include <qpe/qpeapplication.h>
00006 #include <qcanvas.h>
00007 #include <qdialog.h>
00008 #include <qevent.h>
00009 #include <qfont.h>
00010 #include <qgrid.h>
00011 #include <qhbox.h>
00012 #include <qhgroupbox.h>
00013 #include <qlabel.h>
00014 #include <qlayout.h>
00015 #include <qlineedit.h>
00016 #include <qmenubar.h>
00017 #include <qmessagebox.h>
00018 #include <qmovie.h>
00019 #include <qmultilineedit.h>
00020 #include <qpixmap.h>
00021 #include <qpushbutton.h>
00022 #include <qstring.h>
00023 #include <qtooltip.h>
00024 #include <qvbox.h>
00025 #include <qvgroupbox.h>
00026 #include <qwidget.h>
00027 #include <qpe/resource.h>
00028 #include "BilingualKey.h"
00029 #include "Controller.h"
00030 #include "DigraphLineEdit.h"
00031 #include "DigraphMultiLineEdit.h"
00032 #include "PixMap.h"
00033 #include "Term.h"
00034 #include "Util.h"
00035 #include "Vocabulary.h"
00036 #include "ZFileDialog.h"
00037 
00038 class TermDialog : public QDialog {
00039 
00040     Q_OBJECT
00041     
00042 public:
00043 
00044     TermDialog( Vocabulary& vocab, Controller* controller, QWidget* parent );
00045     TermDialog( Vocabulary& vocab, Controller* controller, QWidget* parent, const Term& term );
00046     ~TermDialog(); 
00047 
00048     const Term& getTerm();
00049 
00050 public slots:
00051 
00052     void show();
00053 
00054 private slots:
00055     
00056     void cut();
00057     void copy();
00058     void paste();
00059 
00060     void setImage();
00061     void clearImage();
00062 
00063 private:
00064 
00065     void init();
00066     void updateUi();
00067     void updateModel();
00068 
00069     void initImage( const QString& imagePath );
00070     void resizeImage() const;
00071 
00072     QMenuBar*               menuBar;
00073 
00074     QVBoxLayout*            mainLayout;
00075 
00076     QHBox*                  topPanel;
00077     QVBox*                  topLeftPanel;
00078 
00079     QHGroupBox*             firstLangPanel;
00080     QVGroupBox*             testLangPanel;
00081 
00082     QHBox*                  firstLangTermPanel;
00083     QLabel*                 firstLangTermLabel;
00084     DigraphLineEdit*        firstLangTermLineEdit;
00085 
00086     QWidget*                testLangTopPanel;
00087     QBoxLayout*             testLangTopPanelLayout;
00088     QVBox*                  testLangLabelsPanel;
00089     QVBox*                  testLangFieldsPanel;
00090     
00091     QLabel*                 testLangTermLabel;
00092     DigraphLineEdit*        testLangTermLineEdit;
00093 
00094     QLabel*                 testLangTermAltLabel;
00095     DigraphLineEdit*        testLangTermAltLineEdit;
00096     
00097     QLabel*                 commentLabel;
00098     DigraphMultiLineEdit*   commentMultiLineEdit;
00099 
00100     QVGroupBox*             imageBox;
00101     QWidget*                imagePanel;
00102     QVBoxLayout*            imagePanelLayout;
00103     QVBox*                  imageWrapper;
00104     QLabel*                 image;
00105     QHBox*                  imageButtonsPanel;
00106     QPushButton*            setImageButton;
00107     QPushButton*            clearImageButton;
00108 
00109     Vocabulary&             vocab;
00110     Controller*             controller;
00111     Term*                   editedTerm;
00112 
00113     QAction*                cutAction;
00114     QAction*                copyAction;
00115     QAction*                pasteAction;
00116 
00117     QString                 tempImagePath; // Contains absolute path.
00118     QString                 imageFormat;
00119 
00120 };
00121 
00122 #endif

Generated on Sun Mar 1 17:30:47 2009 for toMOTko by  doxygen 1.5.6