File indexing completed on 2024-04-28 04:02:30

0001 /***************************************************************************
0002                           cdirlist.h  -  pick a list of directories
0003                              -------------------
0004     begin                : So apr 12 2003
0005     copyright            : (C) 2003 by Tomas Mecir
0006     email                : kmuddy@kmuddy.com
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 #ifndef CDIRLIST_H
0019 #define CDIRLIST_H
0020 
0021 #include <qstringlist.h>
0022 #include <QWidget>
0023 
0024 class QListWidget;
0025 class QPushButton;
0026 
0027 /**
0028 A widget that allows you to choose a list of directories.
0029   *@author Tomas Mecir
0030   */
0031 
0032 class cDirList : public QWidget {
0033    Q_OBJECT
0034 public: 
0035   cDirList (QWidget *parent=nullptr);
0036   ~cDirList () override;
0037   const QStringList &getDirList () { return dirlist; };
0038   void setDirList (const QStringList &dlist);
0039 protected slots:
0040   void addEntry ();
0041   void removeEntry ();
0042   void moveEntryUp ();
0043   void moveEntryDown ();
0044 protected:
0045   /** update listbox */
0046   void update ();
0047   
0048   QListWidget *listbox;
0049   QPushButton *btadd, *btdel, *btup, *btdown;
0050   QStringList dirlist;
0051 };
0052 
0053 #endif