00001 /*************************************************************************** 00002 * Copyright (C) 2005 by Tomeu Borras Riera * 00003 * tborras@conetxia.com * 00004 * http://www.iglues.org * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License as published by * 00008 * the Free Software Foundation; either version 2 of the License, or * 00009 * (at your option) any later version. * 00010 * * 00011 * This program is distributed in the hope that it will be useful, * 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00014 * GNU General Public License for more details. * 00015 * * 00016 * You should have received a copy of the GNU General Public License * 00017 * along with this program; if not, write to the * 00018 * Free Software Foundation, Inc., * 00019 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00020 ***************************************************************************/ 00021 00022 #ifndef __LISTVENTANAS__ 00023 #define __LISTVENTANAS__ 00024 00025 #include <QDockWidget> 00026 #include <QListWidget> 00027 00028 #include "qworkspace2.h" 00029 00030 00031 class QListWidget1 : public QListWidget { 00032 Q_OBJECT 00033 00034 public: 00035 QListWidget1(QWidget * parent = 0); 00036 ~QListWidget1(); 00037 }; 00038 00039 00040 class QListWidgetItem1 : public QListWidgetItem { 00041 private: 00042 QObject *m_obj; 00043 QString m_nombre; 00044 QListWidget1 *m_list; 00045 00046 public: 00047 QListWidgetItem1(QListWidget1 *l, QPixmap &p); 00048 ~QListWidgetItem1(); 00049 void setObject(QObject *m); 00050 void setNombre(QString m); 00051 QObject *object(); 00052 QString nombre(); 00053 }; 00054 00055 00059 class listventanas : public QDockWidget { 00060 Q_OBJECT 00061 00062 private: 00063 QListWidget1 *m_listBox; 00064 QWorkspace2 *m_pWorkspace; 00065 00066 public: 00067 void setWorkspace(QWorkspace2 *w); 00068 listventanas(QWidget *a = 0); 00069 ~listventanas(); 00070 00071 public: 00072 int meteWindow(QString, QObject *, bool compdup = TRUE); 00073 int seleccionaWindow(QString, QObject *); 00074 int deSeleccionaWindow(); 00075 void sacaWindow(QObject *); 00076 void cambiaVisible(bool); 00077 void vaciar(); 00078 void vaciarCompleto(); 00079 int numVentanas(); 00080 QObject *ventana(int index); 00081 00082 protected: 00083 void closeEvent(QCloseEvent *event); 00084 00085 public slots: 00086 virtual void dclicked(); 00087 virtual void clicked(); 00088 00089 signals: 00090 void cambiaEstadoVisible(bool); 00091 }; 00092 00093 #endif 00094
1.5.1