1
#ifndef _SHAREDFILESWINDOW_H_
2
#define _SHAREDFILESWINDOW_H_
3
//=============================================================================
5
// File : sharedfileswindow.h
6
// Creation date : Mon Apr 21 2003 23:14:12 CEST by Szymon Stefanek
8
// This file is part of the KVirc irc client distribution
9
// Copyright (C) 2003-2008 Szymon Stefanek (pragma at kvirc dot net)
11
// This program is FREE software. You can redistribute it and/or
12
// modify it under the linkss of the GNU General Public License
13
// as published by the Free Software Foundation; either version 2
14
// of the License, or (at your opinion) any later version.
16
// This program is distributed in the HOPE that it will be USEFUL,
17
// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
// See the GNU General Public License for more details.
21
// You should have received a copy of the GNU General Public License
22
// along with this program. If not, write to the Free Software Foundation,
23
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25
//=============================================================================
27
#include "kvi_window.h"
28
#include "kvi_string.h"
29
#include "kvi_sparser.h"
30
#include "kvi_console.h"
31
#include "kvi_moduleextension.h"
32
#include "kvi_sharedfiles.h"
33
#include <QTreeWidget>
44
class KviSharedFilesTreeWidgetItem : public QTreeWidgetItem
47
KviSharedFilesTreeWidgetItem(QTreeWidget * lv,KviSharedFile * f);
48
~KviSharedFilesTreeWidgetItem();
50
KviSharedFile * m_pSharedFilePointer; // THIS IS READ ONLY!
52
KviSharedFile * readOnlySharedFilePointer(){ return m_pSharedFilePointer; };
56
class KviSharedFileEditDialog : public QDialog
60
KviSharedFileEditDialog(QWidget* par,KviSharedFile * f = 0);
61
~KviSharedFileEditDialog();
63
QDateTimeEdit * m_pExpireDateTimeEdit;
64
QLineEdit * m_pFilePathEdit;
65
QLineEdit * m_pUserMaskEdit;
66
QPushButton * m_pBrowseButton;
67
QLineEdit * m_pShareNameEdit;
68
QCheckBox * m_pExpireCheckBox;
70
KviSharedFile * getResult();
77
class KviSharedFilesWindow : public KviWindow , public KviModuleExtension
79
friend class KviSharedFilesItem;
82
KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm);
83
~KviSharedFilesWindow();
85
QSplitter * m_pVertSplitter;
87
QTreeWidget * m_pTreeWidget;
89
QPushButton * m_pRemoveButton;
90
QPushButton * m_pEditButton;
91
QPushButton * m_pAddButton;
95
virtual QPixmap * myIconPtr();
96
virtual void fillCaptionBuffers();
97
virtual void resizeEvent(QResizeEvent *e);
98
virtual void getBaseLogFileName(QString &buffer);
100
virtual QSize sizeHint() const;
103
void sharedFileAdded(KviSharedFile * f);
104
void sharedFileRemoved(KviSharedFile * f);
105
void enableButtons();
106
void removeClicked();
111
#endif //_SHAREDFILESWINDOW_H_