keepassxc/src/gui/GroupView.h

51 lines
1.3 KiB
C
Raw Normal View History

2010-08-22 10:02:44 -04:00
/*
* Copyright (C) 2010 Felix Geyer <debfx@fobos.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 or (at your option)
* version 3 of the License.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef KEEPASSX_GROUPVIEW_H
#define KEEPASSX_GROUPVIEW_H
#include <QtGui/QTreeView>
class Database;
class Group;
class GroupModel;
class GroupView : public QTreeView
{
Q_OBJECT
public:
2010-09-18 14:31:14 -04:00
explicit GroupView(Database* db, QWidget* parent = 0);
2010-08-22 10:02:44 -04:00
void setModel(QAbstractItemModel* model);
Group* currentGroup();
2010-08-22 10:02:44 -04:00
2010-08-24 16:26:52 -04:00
Q_SIGNALS:
void groupChanged(Group* group);
2010-08-22 10:02:44 -04:00
private Q_SLOTS:
void expandedChanged(const QModelIndex& index);
void emitGroupChanged(const QModelIndex& index);
void emitGroupChanged();
2010-08-22 10:02:44 -04:00
private:
void recInitExpanded(Group* group);
2010-08-22 10:02:44 -04:00
2012-04-23 13:44:43 -04:00
GroupModel* const m_model;
2010-08-22 10:02:44 -04:00
};
#endif // KEEPASSX_GROUPVIEW_H