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