2
* bookmarkmanagedlg.h - manage groupchat room bookmarks
3
* Copyright (C) 2008 Michail Pishchagin
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#ifndef BOOKMARKMANAGEDLG_H
22
#define BOOKMARKMANAGEDLG_H
26
#include "ui_bookmarkmanage.h"
30
class QStandardItemModel;
32
class ConferenceBookmark;
36
class BookmarkManageDlg : public QDialog
40
BookmarkManageDlg(PsiAccount* account);
50
// DisplayRole / EditRole
51
JidRole = Qt::UserRole + 0,
52
AutoJoinRole = Qt::UserRole + 1,
53
NickRole = Qt::UserRole + 2,
54
PasswordRole = Qt::UserRole + 3
60
void appendItem(QStandardItem* item);
61
XMPP::Jid jid() const;
62
QModelIndex currentIndex() const;
66
void removeBookmark();
67
void updateCurrentItem();
68
void joinCurrentRoom();
69
void closeEditor(QWidget* editor, QAbstractItemDelegate::EndEditHint hint);
70
void selectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
73
Ui::BookmarkManage ui_;
75
QStandardItemModel* model_;
76
QPushButton* addButton_;
77
QPushButton* removeButton_;
78
QPushButton* joinButton_;
80
ConferenceBookmark bookmarkFor(const QModelIndex& index) const;