home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / qt3_emx.zip / examples / network / ftpclient / ftpview.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-10-11  |  1.2 KB  |  56 lines

  1. /****************************************************************************
  2. ** $Id:  qt/ftpview.h   3.0.0   edited Sep 11 10:46 $
  3. **
  4. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  5. **
  6. ** This file is part of an example program for Qt.  This example
  7. ** program may be used, distributed and modified without limitation.
  8. **
  9. *****************************************************************************/
  10.  
  11. #ifndef FTPVIEW_H
  12. #define FTPVIEW_H
  13.  
  14. #include <qlistview.h>
  15. #include <qvaluelist.h>
  16. #include <qurlinfo.h>
  17.  
  18. class FtpViewItem : public QListViewItem
  19. {
  20. public:
  21.     FtpViewItem( QListView *parent, const QUrlInfo &i );
  22.     
  23.     int compare( QListViewItem * i, int col, bool ascending ) const;
  24.     QString text( int c ) const;
  25.     const QPixmap* pixmap( int c ) const;
  26.     
  27.     QUrlInfo entryInfo() {
  28.     return info;
  29.     }
  30.     
  31. private:
  32.     QUrlInfo info;
  33.     
  34. };
  35.  
  36. class FtpView : public QListView
  37. {
  38.     Q_OBJECT
  39.     
  40. public:
  41.     FtpView( QWidget *parent );
  42.     QValueList<QUrlInfo> selectedItems() const;
  43.     
  44. public slots:
  45.     void slotInsertEntries( const QValueList<QUrlInfo> &info );
  46.     
  47. signals:
  48.     void itemSelected( const QUrlInfo &info );
  49.     
  50. private slots:
  51.     void slotSelected( QListViewItem *item );
  52.     
  53. };
  54.  
  55. #endif
  56.