Skip to content

Commit

Permalink
Sort out icons on attribute table ( they are now themed )
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4644 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Jan 11, 2006
1 parent a1c747e commit a881991
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/gui/qgsattributetable.h
Expand Up @@ -144,7 +144,6 @@ class QgsAttributeTable:public Q3Table
void repaintRequested();

private:

// Data to do with providing a popup menu of actions that
std::vector<std::pair<QString, QString> > mActionValues;
int mClickedOnValue;
Expand Down
16 changes: 16 additions & 0 deletions src/gui/qgsattributetabledisplay.cpp
Expand Up @@ -19,6 +19,7 @@

#include "qgsattributetabledisplay.h"

#include "qgsapplication.h"
#include "qgsaddattrdialog.h"
#include "qgsadvancedattrsearch.h"
#include "qgsdelattrdialog.h"
Expand All @@ -27,11 +28,15 @@
#include "qgsvectorlayer.h"

#include <QMessageBox>
#include <QIcon>
#include <QPixmap>
#include <QToolButton>

QgsAttributeTableDisplay::QgsAttributeTableDisplay(QgsVectorLayer* layer)
: QDialog(), mLayer(layer)
{
setupUi(this);
setTheme();
connect(mRemoveSelectionButton, SIGNAL(clicked()), this, SLOT(removeSelection()));
connect(mSelectedToTopButton, SIGNAL(clicked()), this, SLOT(selectedToTop()));
connect(mInvertSelectionButton, SIGNAL(clicked()), this, SLOT(invertSelection()));
Expand Down Expand Up @@ -86,6 +91,17 @@ QgsAttributeTable *QgsAttributeTableDisplay::table()
{
return tblAttributes;
}
void QgsAttributeTableDisplay::setTheme()
{
QString myIconPath = QgsApplication::themePath();
mAddAttributeButton->setPixmap(QPixmap(myIconPath+"/mActionNewAttribute.png"));
mRemoveSelectionButton->setPixmap(QPixmap(myIconPath+"/mActionUnselectAttributes.png"));
mSelectedToTopButton->setPixmap(QPixmap(myIconPath+"/mActionSelectedToTop.png"));
mInvertSelectionButton->setPixmap(QPixmap(myIconPath+"/mActionInvertSelection.png"));
mCopySelectedRowsButton->setPixmap(QPixmap(myIconPath+"/mActionCopySelected.png"));
mAddAttributeButton->setPixmap(QPixmap(myIconPath+"/mActionNewAttribute.png"));
mDeleteAttributeButton->setPixmap(QPixmap(myIconPath+"/mActionDeleteAttribute.png"));
}

void QgsAttributeTableDisplay::setTitle(QString title)
{
Expand Down
3 changes: 3 additions & 0 deletions src/gui/qgsattributetabledisplay.h
Expand Up @@ -63,6 +63,9 @@ class QgsAttributeTableDisplay:public QDialog, private Ui::QgsAttributeTableBase

signals:
void deleted();
private:
/** Set the icon theme for this dialog */
void setTheme();
};

#endif

0 comments on commit a881991

Please sign in to comment.