summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/oscar/oscarvisibilitydialog.h
blob: 213e6941669406de191c693a0666e403e31d2d69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
    oscarvisibilitydialog.h  -  Visibility Dialog

    Copyright (c) 2005 by Roman Jarosz <[email protected]>
    Kopete    (c) 2005 by the Kopete developers  <[email protected]>

    *************************************************************************
    *                                                                       *
    * 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.                                   *
    *                                                                       *
    *************************************************************************
*/

#ifndef OSCARVISIBILITYDIALOG_H
#define OSCARVISIBILITYDIALOG_H

#include <kdialogbase.h>
#include "kopete_export.h"

/**
	@author Roman Jarosz <[email protected]>
*/
class OscarVisibilityBase;
class TQStringList;
class Client;

class KOPETE_EXPORT OscarVisibilityDialog : public KDialogBase
{
	Q_OBJECT
  TQ_OBJECT
public:
	typedef TQMap<TQString, TQString> ContactMap;

	OscarVisibilityDialog( Client* client, TQWidget* parent );
	~OscarVisibilityDialog() {}

	void addContacts( const ContactMap& contacts );
	void addVisibleContacts( const TQStringList& contactList );
	void addInvisibleContacts( const TQStringList& contactList );

signals:
	void closing();

protected:
	virtual void slotOk();
	virtual void slotCancel();

protected slots:
	void slotAddToVisible();
	void slotRemoveFromVisible();
	void slotAddToInvisible();
	void slotRemoveFromInvisible();

private:
	enum Action{ Remove = 0, Add };
	typedef TQMap<TQString, Action> ChangeMap;
	
	//maps with changes that should be send to server
	ChangeMap m_visibleListChangesMap;
	ChangeMap m_invisibleListChangesMap;
	
	ContactMap m_contactMap;
	
	OscarVisibilityBase* m_visibilityUI;
	Client* m_client;
};

#endif