kpilot
fileInstallWidget.h
Go to the documentation of this file.00001 #ifndef _KPILOT_FILEINSTALLWIDGET_H 00002 #define _KPILOT_FILEINSTALLWIDGET_H 00003 /* fileInstallWidget.h KPilot 00004 ** 00005 ** Copyright (C) 1998-2001 by Dan Pilone 00006 ** 00007 ** This file defines the file install widget, which is the thing 00008 ** that accepts file drags for later installation into the Pilot. 00009 ** 00010 ** This file also defines the log window widget, which logs 00011 ** sync-messages during a HotSync. 00012 */ 00013 00014 /* 00015 ** This program is free software; you can redistribute it and/or modify 00016 ** it under the terms of the GNU General Public License as published by 00017 ** the Free Software Foundation; either version 2 of the License, or 00018 ** (at your option) any later version. 00019 ** 00020 ** This program is distributed in the hope that it will be useful, 00021 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 ** GNU General Public License for more details. 00024 ** 00025 ** You should have received a copy of the GNU General Public License 00026 ** along with this program in a file called COPYING; if not, write to 00027 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00028 ** MA 02110-1301, USA. 00029 */ 00030 00031 /* 00032 ** Bug reports and questions can be sent to kde-pim@kde.org 00033 */ 00034 00035 #include "pilotComponent.h" 00036 00037 class QMultiLineEdit; 00038 class QPushButton; 00039 class QIconDragItem; 00040 00041 class KIconView; 00042 class KPilotInstaller; 00043 class FileInstaller; 00044 00045 class FileInstallWidget : public PilotComponent 00046 { 00047 Q_OBJECT 00048 00049 public: 00050 FileInstallWidget(QWidget* parent, const QString& dbPath); 00051 virtual ~FileInstallWidget(); 00052 00053 // Pilot Component Methods: 00054 void showComponent(); 00055 bool preHotSync(QString &); 00056 void postHotSync(); 00057 00058 00059 signals: 00060 void fileInstallWidgetDone(); 00061 00062 protected: 00063 void setSaveFileList(bool saveIt) { fSaveFileList = saveIt; } 00064 bool getSaveFileList() { return fSaveFileList; } 00065 00066 /* virtual */ void dragEnterEvent(QDragEnterEvent* event); 00067 /* virtual */ void dropEvent(QDropEvent* drop); 00068 /* virtual */ bool eventFilter (QObject *watched, QEvent *event ); 00069 00070 void contextMenu(QMouseEvent *event); 00071 00072 KPilotInstaller* getPilotInstallerApp() { return fKPilotInstaller; } 00073 00074 private: 00075 KIconView *fIconView; 00076 bool fSaveFileList; 00077 00078 KPilotInstaller* fKPilotInstaller; 00079 FileInstaller *fInstaller; 00080 QPushButton *clearButton,*addButton; 00081 00082 protected slots: 00083 void slotClearButton(); 00084 void slotAddFile(); 00085 00086 void slotDropEvent(QDropEvent * drop, const QValueList<QIconDragItem> & lst); 00087 00088 public slots: 00089 void refreshFileInstallList(); 00090 }; 00091 00092 #endif