KVIrc  4.9.2
DeveloperAPIs
SharedFilesWindow.h
Go to the documentation of this file.
1 #ifndef _SHAREDFILESWINDOW_H_
2 #define _SHAREDFILESWINDOW_H_
3 //=============================================================================
4 //
5 // File : SharedFilesWindow.h
6 // Creation date : Mon Apr 21 2003 23:14:12 CEST by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2003-2010 Szymon Stefanek (pragma at kvirc dot net)
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
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.
20 //
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.
24 //
25 //=============================================================================
26 
27 #include "KviWindow.h"
28 #include "KviCString.h"
29 #include "KviIrcServerParser.h"
30 #include "KviConsoleWindow.h"
31 #include "KviModuleExtension.h"
32 #include "KviSharedFilesManager.h"
33 #include "KviThemedTreeWidget.h"
34 
35 #include <QDialog>
36 #include <QCheckBox>
37 
38 class QGridLayout;
39 class QDateTimeEdit;
40 class QLabel;
41 class QLineEdit;
42 class QPushButton;
43 
44 class SharedFilesTreeWidgetItem : public QTreeWidgetItem
45 {
46 public:
47  SharedFilesTreeWidgetItem(QTreeWidget * lv, KviSharedFile * f);
49 
50 protected:
51  KviSharedFile * m_pSharedFilePointer; // THIS IS READ ONLY!
52 public:
54 };
55 
56 class SharedFileEditDialog : public QDialog
57 {
58  Q_OBJECT
59 public:
60  SharedFileEditDialog(QWidget * par, KviSharedFile * f = 0);
62 
63  QDateTimeEdit * m_pExpireDateTimeEdit;
64  QLineEdit * m_pFilePathEdit;
65  QLineEdit * m_pUserMaskEdit;
66  QPushButton * m_pBrowseButton;
67  QLineEdit * m_pShareNameEdit;
68  QCheckBox * m_pExpireCheckBox;
69 
70 public:
72 protected slots:
73  void okClicked();
74  void browse();
75 };
76 
78 {
79  friend class KviSharedFilesItem;
80  Q_OBJECT
81 public:
84 
85 protected:
86  QSplitter * m_pVertSplitter;
87 
89 
90  QPushButton * m_pRemoveButton;
91  QPushButton * m_pEditButton;
92  QPushButton * m_pAddButton;
93 
94 public: // Methods
95  virtual void die();
96 
97 protected:
98  virtual QPixmap * myIconPtr();
99  virtual void fillCaptionBuffers();
100  virtual void resizeEvent(QResizeEvent * e);
101  virtual void getBaseLogFileName(QString & buffer);
102 
103 public:
104  virtual QSize sizeHint() const;
105 protected slots:
106  void fillFileView();
109  void enableButtons();
110  void removeClicked();
111  void addClicked();
112  void editClicked();
113 };
114 
115 #endif //_SHAREDFILESWINDOW_H_
Definition: SharedFilesWindow.h:56
virtual void fillCaptionBuffers()
Definition: SharedFilesWindow.cpp:357
~SharedFilesWindow()
Definition: SharedFilesWindow.cpp:247
void fillFileView()
Definition: SharedFilesWindow.cpp:301
KviSharedFile * getResult()
Definition: SharedFilesWindow.cpp:135
#define f
Definition: detector.cpp:70
QDateTimeEdit * m_pExpireDateTimeEdit
Definition: SharedFilesWindow.h:63
virtual QSize sizeHint() const
Definition: SharedFilesWindow.cpp:352
QSplitter * m_pVertSplitter
Definition: SharedFilesWindow.h:86
void okClicked()
Definition: SharedFilesWindow.cpp:146
#define e
Definition: detector.cpp:69
SharedFileEditDialog(QWidget *par, KviSharedFile *f=0)
Definition: SharedFilesWindow.cpp:50
virtual void die()
Definition: SharedFilesWindow.cpp:362
KviThemedTreeWidget * m_pTreeWidget
Definition: SharedFilesWindow.h:88
void editClicked()
Definition: SharedFilesWindow.cpp:280
Definition: SharedFilesWindow.h:77
void addClicked()
Definition: SharedFilesWindow.cpp:268
void sharedFileAdded(KviSharedFile *f)
Definition: SharedFilesWindow.cpp:316
QCheckBox * m_pExpireCheckBox
Definition: SharedFilesWindow.h:68
QPushButton * m_pBrowseButton
Definition: SharedFilesWindow.h:66
Definition: SharedFilesWindow.h:44
virtual QPixmap * myIconPtr()
Definition: SharedFilesWindow.cpp:342
void enableButtons()
Definition: SharedFilesWindow.cpp:252
QPushButton * m_pAddButton
Definition: SharedFilesWindow.h:92
Definition: KviThemedTreeWidget.h:34
void browse()
Definition: SharedFilesWindow.cpp:126
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
KviSharedFile * m_pSharedFilePointer
Definition: SharedFilesWindow.h:51
QLineEdit * m_pUserMaskEdit
Definition: SharedFilesWindow.h:65
Definition: KviSharedFile.h:38
SharedFilesWindow()
Definition: SharedFilesWindow.cpp:204
QLineEdit * m_pFilePathEdit
Definition: SharedFilesWindow.h:64
Contains the KviWindow class.
SharedFilesTreeWidgetItem(QTreeWidget *lv, KviSharedFile *f)
Definition: SharedFilesWindow.cpp:182
virtual void resizeEvent(QResizeEvent *e)
Definition: SharedFilesWindow.cpp:347
QLineEdit * m_pShareNameEdit
Definition: SharedFilesWindow.h:67
friend class KviSharedFilesItem
Definition: SharedFilesWindow.h:79
KviSharedFile * readOnlySharedFilePointer()
Definition: SharedFilesWindow.h:53
virtual void getBaseLogFileName(QString &buffer)
Definition: SharedFilesWindow.cpp:337
void removeClicked()
Definition: SharedFilesWindow.cpp:259
QPushButton * m_pRemoveButton
Definition: SharedFilesWindow.h:90
QPushButton * m_pEditButton
Definition: SharedFilesWindow.h:91
void sharedFileRemoved(KviSharedFile *f)
Definition: SharedFilesWindow.cpp:322