1 /* 2 * This file is part of Licq, an instant messaging client for UNIX. 3 * Copyright (C) 1999-2009 Licq developers 4 * 5 * Licq is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. 9 * 10 * Licq 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. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with Licq; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef EDITGRP_H 21 #define EDITGRP_H 22 23 #include <QDialog> 24 25 class QGroupBox; 26 class QLineEdit; 27 class QListWidget; 28 class QPushButton; 29 30 namespace LicqQtGui 31 { 32 class EditGrpDlg : public QDialog 33 { 34 Q_OBJECT 35 36 public: 37 EditGrpDlg(QWidget* parent = 0); 38 39 private: 40 /** 41 * Get group id for group currently marked 42 * 43 * @return Group id for current group or zero if no group is marked 44 */ 45 int currentGroupId() const; 46 47 /** 48 * Set current group id in list 49 * 50 * @param groupId Id of group to make current 51 */ 52 void setCurrentGroupId(int groupId); 53 54 /** 55 * Move a group in the list 56 * 57 * @param delta Direction to move, positive for down 58 */ 59 void moveGroup(int delta); 60 61 QListWidget* lstGroups; 62 QGroupBox* grpGroups; 63 QPushButton* btnAdd; 64 QPushButton* btnRemove; 65 QPushButton* btnUp; 66 QPushButton* btnDown; 67 QPushButton* btnDone; 68 QPushButton* btnEdit; 69 QPushButton* btnSave; 70 71 QLineEdit* edtName; 72 73 int myEditGroupId; 74 75 void RefreshList(); 76 77 private slots: 78 /** 79 * The daemon list has changed 80 * 81 * @param subSignal Sub signal telling what the change was 82 */ 83 void listUpdated(unsigned long subSignal); 84 85 void slot_add(); 86 void slot_remove(); 87 void slot_up(); 88 void slot_down(); 89 void slot_edit(); 90 void slot_editok(); 91 void slot_editcancel(); 92 }; 93 94 } // namespace LicqQtGui 95 96 #endif 97