Eneboo - Documentación para desarrolladores
src/qt/tools/designer/designer/listvieweditorimpl.h
Ir a la documentación de este archivo.
00001 /**********************************************************************
00002 ** Copyright (C) 2005-2007 Trolltech ASA.  All rights reserved.
00003 **
00004 ** This file is part of Qt Designer.
00005 **
00006 ** This file may be distributed and/or modified under the terms of the
00007 ** GNU General Public License version 2 as published by the Free Software
00008 ** Foundation and appearing in the file LICENSE.GPL included in the
00009 ** packaging of this file.
00010 **
00011 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00012 ** licenses may use this file in accordance with the Qt Commercial License
00013 ** Agreement provided with the Software.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00019 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00020 **   information about Qt Commercial License Agreements.
00021 **
00022 ** Contact info@trolltech.com if any conditions of this licensing are
00023 ** not clear to you.
00024 **
00025 **********************************************************************/
00026 
00027 #ifndef LISTVIEWEDITORIMPL_H
00028 #define LISTVIEWEDITORIMPL_H
00029 
00030 #include "listvieweditor.h"
00031 
00032 #include <qmap.h>
00033 #include <qpixmap.h>
00034 #include <qvaluelist.h>
00035 
00036 class FormWindow;
00037 
00038 class ListViewEditor : public ListViewEditorBase
00039 {
00040     Q_OBJECT
00041 
00042 public:
00043     ListViewEditor( QWidget *parent, QListView *lv, FormWindow *fw );
00044 
00045 signals:
00046     void itemRenamed(const QString &);
00047 
00048 protected slots:
00049     void applyClicked();
00050     void columnClickable(bool);
00051     void columnDownClicked();
00052     void columnPixmapChosen();
00053     void columnPixmapDeleted();
00054     void columnResizable(bool);
00055     void columnTextChanged(const QString &);
00056     void columnUpClicked();
00057     void currentColumnChanged(QListBoxItem*);
00058     void currentItemChanged(QListViewItem*);
00059     void deleteColumnClicked();
00060     void itemColChanged(int);
00061     void itemDeleteClicked();
00062     void itemDownClicked();
00063     void itemNewClicked();
00064     void itemNewSubClicked();
00065     void itemPixmapChoosen();
00066     void itemPixmapDeleted();
00067     void itemTextChanged(const QString &);
00068     void itemUpClicked();
00069     void itemLeftClicked();
00070     void itemRightClicked();
00071     void newColumnClicked();
00072     void okClicked();
00073     void initTabPage(const QString &page);
00074     void emitItemRenamed(QListViewItem*, int, const QString&); // signal relay
00075 
00076 private:
00077     struct Column
00078     {
00079         QListBoxItem *item;
00080         QString text;
00081         QPixmap pixmap;
00082         bool clickable, resizable;
00083         Q_DUMMY_COMPARISON_OPERATOR( Column )
00084     };
00085 
00086 private:
00087     void setupColumns();
00088     void setupItems();
00089     Column *findColumn( QListBoxItem *i );
00090     void transferItems( QListView *from, QListView *to );
00091     void displayItem( QListViewItem *i, int col );
00092 
00093 private:
00094     QListView *listview;
00095     QValueList<Column> columns;
00096     int numColumns;
00097     FormWindow *formwindow;
00098 
00099 };
00100 
00101 
00102 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'