hk_kderelationdialog.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
00003 // This file is part of the hk_kdeclasses library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file LGPL included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 #ifndef HK_KDERELATIONDIALOG_H
00012 #define HK_KDERELATIONDIALOG_H
00013 #include "hk_kderelationdialogbase.h"
00014 #include <hk_column.h>
00015 #include <list>
00016 class hk_kdedatasourceframe;
00017 class hk_kdedbdesigner;
00018 class hk_kdedbrelation;
00019 
00020 
00021 class hk_kderelationdialog : public hk_kderelationdialogbase
00022 {
00023     Q_OBJECT
00024 
00025 public:
00026     hk_kderelationdialog( hk_kdedatasourceframe* master,hk_kdedatasourceframe* slave, hk_kdedbdesigner* parent,hk_kdedbrelation* r=NULL , const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
00027     ~hk_kderelationdialog();
00028     int masterindex(const QString&);
00029     int slaveindex(const QString&);
00030     bool set_relation(void);
00031     void set_referentialintegrity(void);
00032 public slots:
00033     virtual void ok_button_clicked();
00034     virtual void slot_data_changed(int,int);
00035   void add_row(void);
00036 
00037 protected:
00038 void keyPressEvent(QKeyEvent * );
00039 bool eventFilter(QObject* object,QEvent* event);
00040 
00041 
00042 
00043 private:
00044   void set_stringlist(QStringList* strlist,list<hk_string>*);
00045   void set_existing_fields(void);
00046   void set_existing_refintegrityfields(void);
00047   int    textposition(QStringList* ,const hk_string&  );
00048 void delete_rows(void);
00049 hk_kdedatasourceframe* p_masterdsframe;
00050 hk_kdedatasourceframe* p_slavedsframe;
00051 QStringList             p_mastercollist;
00052 QStringList             p_slavecollist;
00053 hk_kdedbdesigner*       p_designer;
00054 hk_kdedbrelation*       p_relation;
00055 };
00056 
00057 #endif // HK_KDERELATIONDIALOG_H

Generated on Tue Nov 28 00:05:29 2006 for Databasehandlingdialogclasses by  doxygen 1.5.0