fixed problem with config saving,

main-window size an splitter position are restored on start-up,
loading icons on demand by QIcon class instead of preload,
column resizing stuff (not finished)

git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@50 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
tariq
2006-03-09 10:44:14 +00:00
parent f89372b0c5
commit d6ea6e8971
16 changed files with 192 additions and 98 deletions

View File

@@ -1,5 +1,5 @@
/***************************************************************************
* Copyright (C) 2005 by Tarek Saidi *
* Copyright (C) 2005-2006 by Tarek Saidi *
* tarek.saidi@arcor.de *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -34,8 +34,10 @@
KeepassEntryView::KeepassEntryView(QWidget* parent):QTreeWidget(parent){
CurrentGroup=0;
updateColumns();
header()->setResizeMode(QHeaderView::Stretch);
header()->setResizeMode(QHeaderView::Interactive);
header()->setStretchLastSection(false);
ContextMenu=new QMenu(this);
}
@@ -66,6 +68,10 @@ e->accept();
ContextMenu->popup(e->globalPos());
}
void KeepassEntryView::resizeEvent(QResizeEvent* e){
e->accept();
}
void KeepassEntryView::updateItems(unsigned int GroupID){

View File

@@ -40,9 +40,11 @@ public:
private:
void setEntry(CEntry* entry);
int CurrentGroup;
QList<float>ColumnSizes;
protected:
virtual void contextMenuEvent(QContextMenuEvent *event);
virtual void paintEvent ( QPaintEvent * event );
virtual void paintEvent(QPaintEvent* event);
virtual void resizeEvent(QResizeEvent* event);
};

View File

@@ -0,0 +1,19 @@
/***************************************************************************
* Copyright (C) 2005-2006 by Tarek Saidi *
* tarek.saidi@arcor.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/

View File

@@ -0,0 +1,28 @@
/***************************************************************************
* Copyright (C) 2005-2006 by Tarek Saidi *
* tarek.saidi@arcor.de *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <QFileIconProvider>
#include <QIcon>
class KpFileIconProvider : public QFileIconProvider{
public:
virtual QIcon icon(IconType type) const;
virtual QIcon icon(const QFileInfo& info) const;
};