#ifndef _USERLIST_H_ #define _USERLIST_H_ #include #include /*! \class UserList \brief Displays the users in the hub This class displays all users in the hub the user is connected to. The list constists of four columns labeled 'Nick, Share, Con, and Descrition' Users can be added and removed. */ class QTimer; class QLabel; class User; class ChatEdit; class QDialog; class UserList : public QListView { Q_OBJECT public: /*! Calls the QListView class with parent and name and then sets up the columns we want. \param parent The parent widget \param name Name of this widget */ UserList( QWidget* parent = 0, const char* name = 0, ChatEdit *ced = 0 ); void setUseTimer(bool yes) {useTimer=yes;} public slots: /*! Adds a user to the list \param name The nick name of the user \param share The amount of files the user shares \param con Connection type \param desc User description */ void addUser( const QString& name, const QString& share, const QString& con, const QString& email, const QString& desc,bool away ); void addUser( const QString& name, bool dummy); void addUsers(const QStringList& users); void setOp(const QString& user); /*! Removes a user from the list and dealocates the memory \param name Nick name of user to be removed */ void removeUser( const QString& name ); /*! Displays a popup menu when the user rightclicks an item \param item Pointer to highlighted item \param p Point on screen where user clicked \param column The column the user clicked in */ void dispMenu( QListViewItem* item, const QPoint& p, int column ); /*! Slot connected to the get user files popup menu item Gets the name if the highlighted user and signals that we want this users files */ void getUserFiles(); /*! Displays a chat dialog */ void dispChatDlg(); void getUinfos(); void popupInfo(); void enterItem(QListViewItem *i); signals: void getUserFiles( const QString& name ); void activateChat( const QString& name ); void getUserInfo( const QString& name ); protected: // virtual void leaveEvent( QEvent *e ); private: /*! Out popup menu displaying get user files and send chat mess */ QPopupMenu* menu; QTimer *timer; bool useTimer; bool uInfosRequested; QLabel *userToolTip; QTimer *toolTipTimer; User *lastUser; ChatEdit *chated; QDialog *infodlg; }; #endif /* * * $Log: * */