src/app/qgsattributetabledisplay.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           qgsattributetabledisplay.h  -  description
00003                              -------------------
00004     begin                : Sat Nov 23 2002
00005     copyright            : (C) 2002 by Gary E.Sherman
00006     email                : sherman at mrcc dot com
00007         Romans 3:23=>Romans 6:23=>Romans 5:8=>Romans 10:9,10=>Romans 12
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   (at your option) any later version.                                   *
00016  *                                                                         *
00017  ***************************************************************************/
00018 /* $Id: qgsattributetabledisplay.h 9223 2008-08-31 07:39:36Z telwertowski $ */
00019 
00020 #ifndef QGSATTRIBUTETABLEDISPLAY_H
00021 #define QGSATTRIBUTETABLEDISPLAY_H
00022 
00023 #include "ui_qgsattributetablebase.h"
00024 
00025 class QDockWidget;
00026 class QgsAttributeTable;
00027 class QgsVectorLayer;
00028 class QgisApp;
00029 class QgsAttributeActions;
00030 
00035 class QgsAttributeTableDisplay : public QDialog, private Ui::QgsAttributeTableBase
00036 {
00037     Q_OBJECT
00038   public:
00039     static QgsAttributeTableDisplay *attributeTable( QgsVectorLayer *layer );
00040 
00041     ~QgsAttributeTableDisplay();
00042 
00043     void fillTable();
00044 
00045   protected:
00046     QgsAttributeTableDisplay( QgsVectorLayer* layer );
00047 
00048     QgsVectorLayer* mLayer;
00049 
00050     void doSearch( QString searchString );
00051     void setAttributeActions( const QgsAttributeAction &actions );
00052     void selectRowsWithId( const QgsFeatureIds &ids );
00053 
00054 #ifdef Q_WS_MAC
00056     virtual void changeEvent( QEvent *event );
00057 #endif
00058 
00059     virtual void closeEvent( QCloseEvent *ev );
00060 
00062     QgsFeatureIds mSearchIds;
00063 
00064   protected slots:
00065     void selectedToTop();
00066     void invertSelection();
00067     void removeSelection();
00068     void copySelectedRowsToClipboard();
00069     void zoomMapToSelectedRows();
00070     void search();
00071     void advancedSearch();
00072     void searchShowResultsChanged( int item );
00073     void showHelp();
00074     void toggleEditing();
00075 
00076     void attributeAdded( int idx );
00077     void attributeDeleted( int idx );
00078 
00079   public slots:
00080     void changeFeatureAttribute( int row, int column );
00081     void editingToggled();
00082     void selectionChanged();
00083 
00084   signals:
00085     void editingToggled( QgsMapLayer * );
00086 
00087   private slots:
00088     void activate();
00089 
00090   private:
00092     void setTheme();
00093 
00094     void restorePosition();
00095     void saveWindowLocation();
00096 
00097 #ifdef Q_WS_MAC
00098 
00099     QAction *mWindowAction;
00100 #endif
00101 
00102     QString mSearchString;
00103 
00104     QDockWidget *mDock;
00105 
00106     static const int context_id = 831088384;
00107 
00108     static QMap<QgsVectorLayer *, QgsAttributeTableDisplay *> smTables;
00109 };
00110 
00111 #endif

Generated on Tue Oct 28 16:51:26 2008 for Quantum GIS API Documentation by  doxygen 1.5.1