Commit dd31b620 authored by kocienda's avatar kocienda

Touched other files, annotating and formatting classes


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 8006e69a
......@@ -29,16 +29,72 @@
#include <qobject.h>
#include <qstringlist.h>
// class QCompletion ===========================================================
class QCompletion : public QObject {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
QCompletion();
~QCompletion();
// member functions --------------------------------------------------------
void setItems(const QStringList &);
};
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
QCompletion(const QCompletion &);
QCompletion &operator=(const QCompletion &);
}; // class QCompletion ========================================================
// class QCompletionBase =======================================================
class QCompletionBase {
public:
QCompletionBase();
QCompletion *completionObject(bool hsig = true);
};
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
QCompletionBase();
~QCompletionBase();
// member functions --------------------------------------------------------
QCompletion *completionObject(bool hsig = true);
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
QCompletionBase(const QCompletionBase &);
QCompletionBase &operator=(const QCompletionBase &);
}; // class QCompletionBase ====================================================
#endif
......@@ -26,21 +26,52 @@
#ifndef DCOPCLIENT_H_
#define DCOPCLIENT_H_
#include <qobject.h>
#include <qcstring.h>
// KApplication needs this
class DCOPClient {
// class DCOPClient ============================================================
class DCOPClient : public QObject {
public:
bool call(const char *remApp, const char *remObj, const char *remFun, const QByteArray &data,
QCString& replyType, QByteArray &replyData, bool useEventLoop=false, bool fast=false);
bool call(const QCString &remApp, const QCString &remObj, const QCString &remFun, const QByteArray &data,
QCString& replyType, QByteArray &replyData, bool useEventLoop=false, bool fast=false);
bool send(const char *remApp, const char *remObj, const char *remFun, const QByteArray &data, bool fast=false);
bool send(const QCString &remApp, const QCString &remObj, const QCString &remFun, const QByteArray &data,
bool fast=false);
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
DCOPClient();
virtual ~DCOPClient();
// member functions --------------------------------------------------------
bool call(const char *remApp, const char *remObj, const char *remFun,
const QByteArray &data, QCString& replyType, QByteArray &replyData,
bool useEventLoop=false, bool fast=false);
bool call(const QCString &remApp, const QCString &remObj,
const QCString &remFun, const QByteArray &data, QCString& replyType,
QByteArray &replyData, bool useEventLoop=false, bool fast=false);
bool send(const char *remApp, const char *remObj, const char *remFun,
const QByteArray &data, bool fast=false);
bool send(const QCString &remApp, const QCString &remObj,
const QCString &remFun, const QByteArray &data, bool fast=false);
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
DCOPClient(const DCOPClient &);
DCOPClient &operator=(const DCOPClient &);
};
}; // class DCOPClient =========================================================
#endif
......@@ -38,16 +38,40 @@
#define IO_Translate 0x0010 // translate CR+LF
#define IO_ModeMask 0x00ff
// class QDataStream ===========================================================
class QDataStream {
public:
QDataStream( QByteArray, int mode );
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
QDataStream(QByteArray, int);
virtual ~QDataStream();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
QDataStream &operator<<(long int);
QDataStream &operator<<(const char *);
QDataStream &operator<<(const QString &);
QDataStream &operator<<(const QCString &);
QDataStream &operator>>(const QString &);
};
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
QDataStream(const QDataStream &);
QDataStream &operator=(const QDataStream &);
}; // class QDataStream ========================================================
#endif
......@@ -26,10 +26,38 @@
#ifndef KWQICON_H_
#define KWQICON_H_
// class KIcon =================================================================
class KIcon {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
enum Context { Any, Action, Application, Device, FileSystem, MimeType };
enum States { DefaultState, ActiveState, DisabledState, LastState };
};
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KIcon();
~KIcon();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KIcon(const KIcon &);
KIcon &operator=(const KIcon &);
}; // class KIcon ==============================================================
#endif
......@@ -31,15 +31,43 @@
class QString;
class QTextCodec;
// class KCharsets =============================================================
class KCharsets {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KCharsets();
~KCharsets();
// member functions --------------------------------------------------------
QTextCodec *codecForName(const QString &) const;
QTextCodec *codecForName(const QString &, bool &) const;
void setQFont(QFont &, QFont::CharSet charset = QFont::Unicode) const;
void setQFont(QFont &, QFont::CharSet charset=QFont::Unicode) const;
void setQFont(QFont &, QString) const;
QString name(QFont::CharSet);
QString xCharsetName(QFont::CharSet) const;
bool supportsScript(const QFont &, QFont::CharSet);
};
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KCharsets(const KCharsets &);
KCharsets &operator=(const KCharsets &);
}; // class KCharsets ==========================================================
#endif
......@@ -30,10 +30,33 @@
#include <KWQCompletion.h>
// class KComboBox =============================================================
class KComboBox : public QComboBox, public QCompletionBase {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KComboBox(QWidget *parent=0, const char *name=0);
KComboBox(bool rw, QWidget *parent=0, const char *name=0);
};
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KComboBox(const KComboBox &);
KComboBox &operator=(const KComboBox &);
}; // class KComboBox ==========================================================
#endif
......@@ -28,7 +28,34 @@
#include "klistbox.h"
// class KCompletionBox ========================================================
class KCompletionBox : public KListBox {
};
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KCompletionBox();
~KCompletionBox();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KCompletionBox(const KCompletionBox &);
KCompletionBox &operator=(const KCompletionBox &);
}; // class KCompletionBox =====================================================
#endif
......@@ -37,19 +37,80 @@
#include <qcolor.h>
#include <KWQStrList.h>
// class KConfigBase ===========================================================
class KConfigBase {
public:
void setGroup(const QString& pGroup);
QString readEntry(const char *pKey, const QString& aDefault = QString::null) const;
int readNumEntry(const char *pKey, int nDefault = 0) const;
unsigned int readUnsignedNumEntry(const char *pKey, unsigned int nDefault = 0) const;
bool readBoolEntry(const char *pKey, bool nDefault = 0) const;
QColor readColorEntry(const char *pKey, const QColor* pDefault = 0L) const;
};
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KConfigBase();
~KConfigBase();
// member functions --------------------------------------------------------
void setGroup(const QString &pGroup);
QString readEntry(const char *pKey,
const QString& aDefault=QString::null) const;
int readNumEntry(const char *pKey, int nDefault=0) const;
unsigned int readUnsignedNumEntry(const char *pKey,
unsigned int nDefault=0) const;
bool readBoolEntry(const char *pKey, bool nDefault=0) const;
QColor readColorEntry(const char *pKey, const QColor *pDefault=0L) const;
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KConfigBase(const KConfigBase &);
KConfigBase &operator=(const KConfigBase &);
}; // class KConfigBase ========================================================
// class KConfig ===============================================================
class KConfig : public KConfigBase {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KConfig(const QString &, bool bReadOnly=false);
};
#endif
~KConfig();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KConfig(const KConfig &);
KConfig &operator=(const KConfig &);
}; // class KConfig ============================================================
#endif
\ No newline at end of file
......@@ -28,11 +28,37 @@
#include <qwidget.h>
// class KCursor ===============================================================
class KCursor {
public:
KCursor();
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
static void setAutoHideCursor(QWidget *w, bool enable);
};
// constructors, copy constructors, and destructors ------------------------
KCursor();
~KCursor();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KCursor(const KCursor &);
KCursor &operator=(const KCursor &);
}; // class KCursor ============================================================
#endif
......@@ -29,19 +29,47 @@
#include <qstring.h>
class kdbgstream;
typedef kdbgstream & (*KDBGFUNC)(kdbgstream &);
// class kdbgstream ============================================================
class kdbgstream {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
kdbgstream(unsigned int area, unsigned int level, bool print=true);
~kdbgstream();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
kdbgstream &operator<<(int);
kdbgstream &operator<<(const char *);
kdbgstream &operator<<(const void *);
kdbgstream &operator<<(const QString&);
kdbgstream &operator<<(const QCString&);
kdbgstream &operator<<(const QString &);
kdbgstream &operator<<(const QCString &);
kdbgstream &operator<<(KDBGFUNC);
};
inline kdbgstream &endl( kdbgstream &s) { s << "\n"; return s; }
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
kdbgstream(const kdbgstream &);
kdbgstream &operator=(const kdbgstream &);
}; // class kdbgstream =========================================================
inline kdbgstream &endl(kdbgstream &s) { s << "\n"; return s; }
kdbgstream kdDebug(int area = 0);
kdbgstream kdWarning(int area = 0);
......
......@@ -29,10 +29,39 @@
#include <qstring.h>
#include <qwidget.h>
// class KFileDialog ===========================================================
class KFileDialog {
public:
static QString getOpenFileName(const QString& startDir= QString::null, const QString& filter= QString::null,
QWidget *parent= 0, const QString& caption = QString::null);
};
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
static QString getOpenFileName(const QString &startDir=QString::null,
const QString &filter=QString::null, QWidget *parent=0,
const QString &caption=QString::null);
// constructors, copy constructors, and destructors ------------------------
KFileDialog();
~KFileDialog();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KFileDialog(const KFileDialog &);
KFileDialog &operator=(const KFileDialog &);
}; // class KFileDialog ========================================================
#endif
......@@ -28,11 +28,36 @@
#include <netaccess.h>
// class KFileItem =============================================================
class KFileItem {
public:
KFileItem(const KIO::UDSEntry &, const KURL &, bool foo = false, bool bar =
false);
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
// constructors, copy constructors, and destructors ------------------------
KFileItem(const KIO::UDSEntry &, const KURL &, bool foo=false,
bool bar=false);
// member functions --------------------------------------------------------
bool isDir() const;
};
// operators ---------------------------------------------------------------
// protected -------------------------------------------------------------------
// private ---------------------------------------------------------------------
private:
// no copying or assignment
KFileItem(const KFileItem &);
KFileItem &operator=(const KFileItem &);
}; // class KFileItem ==========================================================
#endif
......@@ -37,8 +37,18 @@ class KConfig;
#define kMin(a, b) ((a) < (b) ? (a) : (b))
#define kMax(a, b) ((a) > (b) ? (a) : (b))
// class KGlobal ===============================================================
class KGlobal {
public:
// structs -----------------------------------------------------------------
// typedefs ----------------------------------------------------------------
// enums -------------------------------------------------------------------
// constants ---------------------------------------------------------------
// static member functions -------------------------------------------------
static KInstance *instance();
static KCharsets *charsets();
static KLocale *locale();
......@@ -46,6 +56,24 @@ public:
static KConfig *config();
static const QString &staticQString(const QString &);
};
// constructors, copy constructors, and destructors ------------------------
KGlobal();
~KGlobal();
// member functions --------------------------------------------------------
// operators ---------------------------------------------------------------