Source: sqlguipart/sqlgui_part.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
                          sqlgui_part.h  -  description
                             -------------------
    begin                : Mon Apr 29 2002
    copyright            : (C) 2002 by mb
    email                : beranek@uni-duesseldorf.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
#ifndef SQLGUI_PART_H
#define SQLGUI_PART_H

#include 
#include 
#include 
#include 
#include 

#include "sqlguidoc.h"

//#include 
//#include 

#include 
#include 
#include 
#include 
#include 

//class DCOPClient;
class KLocale;

class SqlGuiPart : public KParts::ReadOnlyPart
{
  Q_OBJECT

 public:
  
  SqlGuiPart( QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QStringList &args );
  virtual ~SqlGuiPart();
  SqlGuiDoc* getDocument() const;
  SqlGuiView* getView() const;
  static KAboutData* createAboutData();
  void openDocumentFile(const KURL& url);
  base_t getDBObj();
  QString getHostname();
  QString getBasename();
  QString getUser();
  QString getProtocol();
  bool isConnected();
  bool process(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData);
  
 public slots:
  void slotBaseNew();
  void slotFileNew();
  void slotFileOpen();
  void slotFileOpenRecent(const KURL& _url);
  void slotFileSave();
  void slotFileSaveAs();
  void slotFileClose();
  void slotFilePrint();
  void slotFileQuit();
  void slotEditCut();
  void slotEditCopy();
  void slotEditPaste();
  void slotStatusMsg(const QString &text);
  void slotDisplayErrorMsg(QString * msg);
  void slotDocReConnect();
  void slotDeleteTableRequest();
  void slotDeleteBaseRequest();
  void slotSetFastMode();
  void slotAddConn();
  void slotSomethingChanged();
  void slotSomethingWeirdHappened();
  void slotData( KIO::Job* kio_job, const QByteArray & d );
  void slotRedirection( KIO::Job* kio_job, const KURL & url);
  int read( int* _cmd, QByteArray & d );

 signals:
  void userChanged( QString u );
  void hostChanged( QString h );
  void connectionComplete();


 protected:
  virtual bool openFile();
  bool openURL(const KURL& _url);
  void saveOptions();
  void readOptions();
  void initActions();
  void createDocument( int type = 0);
  void initDocument(int type);
  void initView( QWidget* parentWidget );
  virtual bool queryClose();
  virtual bool queryExit();

 protected slots:
  void slotShowServerStatus( QString stat );
  void slotEnableExport( bool on );
  void slotInsertDataRequest();
  void slotAddConnData(QString h, QString u, QString p, QString b, int type);
  void slotLoginData(QString h, QString u, QString p, QString b, int type );
 private:
  
  KConfig *config;
  SqlGuiView *view;
  SqlGuiDoc *doc;
  QDialog *waiter;
  KAction* fileNew;
  KAction* fileOpen;
  KRecentFilesAction* fileOpenRecent;
  KAction* fileSave;
  KAction* fileSaveAs;
  KAction* fileClose;
  KAction* filePrint;
  KAction* fileQuit;
  KAction* editCut;
  KAction* editCopy;
  KAction* editPaste;
  KToggleAction* viewToolBar;
  KToggleAction* viewStatusBar;
  KAction *fileNewBase;
  KAction *fileReConnect;
  KAction *fileDeleteBase;
  KAction *fileDeleteTable;
  KAction *databaseInsertData;
  KToggleAction *setFastMode;
//	DCOPClient * dcop;
  QWidget *myParentWidget;
  KIO::TransferJob * m_job;
  KIO::Connection * m_con;
  KLocale * kl;

// Libraries:
  void* backendlib;
  create_t*  create_doc;
  destroy_t* destroy_doc;


};

#endif // SQLGUI_PART_H

Generated by: marcus on voyager on Mon Sep 16 15:31:33 2002, using kdoc 2.0a53.