|
|
|
@ -29,6 +29,7 @@ |
|
|
|
|
#include <QTime> |
|
|
|
|
#include <QApplication> |
|
|
|
|
#include <QPainter> |
|
|
|
|
#include <QPair> |
|
|
|
|
#include "main.h" |
|
|
|
|
#include "PwmConfig.h" |
|
|
|
|
#include "EntryView.h" |
|
|
|
@ -51,8 +52,8 @@ header()->setStretchLastSection(false); |
|
|
|
|
connect(header(),SIGNAL(sectionResized(int,int,int)),this,SLOT(OnColumnResized(int,int,int))); |
|
|
|
|
ContextMenu=new QMenu(this); |
|
|
|
|
setAlternatingRowColors(config.AlternatingRowColors); |
|
|
|
|
disconnect(header(),SIGNAL(sectionClicked(int)),this,SLOT(sortByColumn(int))); |
|
|
|
|
//TODO: connect with custom sort function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
KeepassEntryView::~KeepassEntryView(){ |
|
|
|
@ -358,8 +359,6 @@ drag->setPixmap(DragPixmap); |
|
|
|
|
drag->start(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void KeepassEntryView::sortItems(int column,Qt::SortOrder order){}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void KeepassEntryView::paintEvent(QPaintEvent * event){ |
|
|
|
|
QTreeWidget::paintEvent(event); |
|
|
|
@ -383,7 +382,7 @@ EntryViewItem::EntryViewItem(QTreeWidgetItem *parent, QTreeWidgetItem *preceding |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool EntryViewItem::operator<(EntryViewItem& other){ |
|
|
|
|
bool EntryViewItem::operator<(const QTreeWidgetItem& other)const{ |
|
|
|
|
if(QString::localeAwareCompare( text(treeWidget()->sortColumn()),other.text(treeWidget()->sortColumn())) < 0) |
|
|
|
|
return true; |
|
|
|
|
else
|
|
|
|
|