Re: Make error on EBQT

[email protected]
Newsgroups gmane.network.everybuddy.user
Message-ID <[email protected]>
Works great...
I have included the ebqtconv.h file for the people who do not want to edit it 
;)

Jeroen

On Saturday 19 April 2003 12:10, Chris Boyle wrote:
> On Sat, 2003-04-19 at 09:10, [email protected] wrote:
> > source='ebqtconv.moc.cpp' object='ebqtconv.moc.o' libtool=no \
> > depfile='.deps/ebqtconv.moc.Po' tmpdepfile='.deps/ebqtconv.moc.TPo' \
> > depmode=gcc3 /bin/sh ../admin/depcomp \
> > g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/lib/qt3-gcc3.2/include
> > -I/usr/X11R6/include  -DQT_THREAD_SUPPORT  -D_REENTRANT  -O2
> > -fno-exceptions -fno-check-new  -c -o ebqtconv.moc.o `test -f
> > 'ebqtconv.moc.cpp' || echo './'`ebqtconv.moc.cpp
> > In file included from ebqtconv.moc.cpp:11:
> > ebqtconv.h:143: field `cleanIcon' has incomplete type
> > ebqtconv.h: In member function `QPixmap EbQtConv::normalIcon() const':
> > ebqtconv.h:53: return type `struct QPixmap' is incomplete
> > ebqtconv.h:53: `cleanIcon' undeclared (first use this function)
> > ebqtconv.h:53: (Each undeclared identifier is reported only once for each
> >    function it appears in.)
> > make[3]: *** [ebqtconv.moc.o] Error 1
>
> Since it works fine in most places, I guess this must be a Qt 3.0 thing.
> Not to worry, it looks like it just needs an extra line:
> #include <qpixmap.h>
> near the top of the file ebqtconv.h (there are 3 similar lines, the last
> being ...<qdict.h>).
>
> There may be more errors, I don't have a 3.0 machine available to test.
> If it still fails, just post the output. Thanks.
ebqtconv.h (text/x-chdr, 6.6 KB)
/***************************************************************************
                          ebqtconv.h  -  description
                             -------------------
    begin                : Wed Dec 25 2002
    copyright            : (C) 2002 by Chris Boyle
    email                : [email protected]
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 EBQTCONV_H
#define EBQTCONV_H

class QListBoxPixmap;
class QStyleSheetItem;

#include <qwidget.h>
#include <qptrlist.h>
#include <qdict.h>
#include <qpixmap.h>

class EbQtContact;
class EbQtService;
class EbQtLocalAccount;
class EbQtAccount;

#include "ebqt.h"
#include "ebqtconvui.h"

/**
  * conversation widgets for EbQt
  *
  * @author Chris Boyle
  */

class EbQtConv : public EbQtConvUI  {
	Q_OBJECT

public:
	EbQtConv(QWidget * parent, const char * name = 0, EbQtContact * c = 0,
		WFlags f = 0);
	~EbQtConv();
	
	EbQtContact * contact() const { return groupMode ? NULL        : singleContact; }
	const QString & id()    const { return groupMode ? groupChatID : QString::null; }
	EbQtLocalAccount * localAcct() const { return localAccount; }  // may be null
	QPixmap normalIcon() const { return cleanIcon; }

public slots:
	void setSingleContact(EbQtContact * contact);
	void setGroupChat(const QString & id, EbQtLocalAccount * localAccount);
	
	void sentMsg(EbQtLocalAccount * l, EbQtAccount * a,
		const QString & msg,    int secsAgo = 0);
	void sent3rd(EbQtLocalAccount * l, EbQtAccount * a,
		const QString & action, int secsAgo = 0);
	void recvMsg(EbQtLocalAccount * l, EbQtAccount * a,
		const QString & msg,    int secsAgo = 0);
	void recv3rd(EbQtLocalAccount * l, EbQtAccount * a,
		const QString & action, int secsAgo = 0);
	void sentGroupMsg(const QString & msg);
	void recvGroupMsg(const QString & from, const QString & msg);
	void recvGroup3rd(const QString & msg);
	/** refresh the list of available accounts (local and remote) for this contact */
	void refreshAccounts();
	/** set the combos (0 -> whatever the ptrlists have as current) */
	bool setCurrents(EbQtLocalAccount * l = 0, EbQtAccount * a = 0);
	/** turn on/off raw html mode */
	void setRawMode(bool on);
	void addGroupUser(const QString & handle, bool quiet = FALSE);
	void removeGroupUser(const QString & handle, bool quiet = FALSE);
	void tryClose();
	void tryChatUserAction(int userAndAction);
	void tryAddFromGroup(int user);
	void setCaption(const QString & c) { QWidget::setCaption(c);
		emit(captionChanged(*(icon()), caption(), this)); }
	void setIcon(const QPixmap & pix) { cleanIcon = pix; setTempIcon(pix); }
	void focusSendEdit();
	void flash(unsigned int times = 7);

signals:
	void wantsToSend(EbQtLocalAccount * l, EbQtAccount * a, const QString & msg);
	void wantsGroupSend(const QString & msg, const QString & id);
	void rawModeChanged(bool on, EbQtConv * conv);
	void wantsIgnore(EbQtContact * contact);
	void wantsGroupInvite(const QString & handle, const QString & id);
	void wantsGroupLeave(const QString & id);
	void convClosing(EbQtConv * conv);
	void wantsChatAction(const QString & action, const QString & id,
		EbQtLocalAccount * local);
	void wantsChatUserAction(const QString & user, const QString & action,
		const QString & id);
	void wantsChatUserMenu(const QString & user, int userId, const QPoint & pos,
		EbQtConv * conv);
	void wantsAdd(const QString & a, EbQtLocalAccount * l, EbQtConv * conv);
	void captionChanged(const QPixmap & pix, const QString & caption,
		QWidget * conv);
	void wantsGeometrySave(EbQtConv * conv);

protected:
	void keyPressEvent(QKeyEvent * k);
	void moveEvent(QMoveEvent * e);
	void resizeEvent(QResizeEvent * e);
	void closeEvent(QCloseEvent * ce);
	void setTempIcon(const QPixmap & pix) { QWidget::setIcon(pix);
		emit(captionChanged(*(icon()), caption(), this)); }

private:
	bool eventFilter(QObject * o, QEvent * e);
	
	/** applied to _any_ message text received from the server
	  * (no-op these days) */
	static QString cook(QString text);
	/** applied (before cook) to what the server says we sent */
	static QString cookSent(QString text);
	/** applied before we send a message
	  * (must be able to consider e.g. default font size) */
	QString cookSend(QString text);
	
	bool recvEditNearBottom();
	
	bool groupMode;  // false -> single contact
	QString groupChatID;
	
	EbQtContact			* singleContact;
	QPtrList<EbQtLocalAccount>	  localAccounts;
	EbQtLocalAccount		* localAccount;
	QPtrList<EbQtAccount>		  accounts;
	EbQtAccount			* account;
	
	QColor defaultColour;
	int defaultPointSz;
	int pointSzStep;
	QDict<QListBoxPixmap> groupItems;
	bool canClose;
	QStyleSheetItem * timeStamps;
	QPixmap cleanIcon;
	QTimer * geoChangeTimer;

private slots:
	void addMessage(const QString & from, const QString & rawText, int secsAgo,
		const QColor & colour, const QColor & tsColour,
		bool thirdPerson = FALSE);
	void addLine(const QString & line);
	
	void fromChanged(int from);
	void toChanged(int to);
	/** account selections have changed, respond */
	void updateAccounts();
	void updateLocalAcct(EbQtLocalAccount * l);
	void updateLocalAcctItem(EbQtLocalAccount * l);
	void removeLocalAccount(EbQtLocalAccount * l);
	void updateAccount(EbQtAccount * a);
	void updateAccountItem(EbQtAccount * a);
	void removeAccount(EbQtAccount * a);
	
	void trySend();
	void tryInvite();
	
	void showSendFont(const QFont & font);
	void setColour(bool on);
	void setFontSzDown(bool on);
	void setFontSzUp(bool on);
	
	void rawModeSet(bool on);
	
	void recvEditToBottom();
	
	/** set whether the contact is ignored */
	void setIgnore(bool ignored);
	void ignoredSet(bool ignored);
	
	void showTimeStamps(bool on);
	void showCombos(bool on);
	void updateUsers();
	void tryChatAction(int i);
	/** and QToolButton doesn't make this a slot _why_, exactly? *shrug* */
	void popupActions();
	void usersRMB(QListBoxItem * i, const QPoint & pos);
	void updateGroupUserItem(const QString & handle, bool removing = FALSE);
	void setLocalAcct(EbQtLocalAccount * l);
	void addedAccount(EbQtAccount * a);
	void removingAccount(EbQtAccount * a);
	
	void putGeometry() { emit(wantsGeometrySave(this)); }
};

#endif
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.