1
/***************************************************************************
2
smb4kpreviewdialog.h - The preview dialog of Smb4K
5
copyright : (C) 2003-2008 by Alexander Reinholdt
6
email : dustpuppy@users.berlios.de
7
***************************************************************************/
9
/***************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
* This program is distributed in the hope that it will be useful, but *
16
* WITHOUT ANY WARRANTY; without even the implied warranty of *
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
18
* General Public License for more details. *
20
* You should have received a copy of the GNU General Public License *
21
* along with this program; if not, write to the *
22
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, *
24
***************************************************************************/
26
#ifndef SMB4KPREVIEWDIALOG_H
27
#define SMB4KPREVIEWDIALOG_H
34
#include <QStringList>
37
#include <klistwidget.h>
40
#include <kcombobox.h>
41
#include <kdemacros.h>
44
// forward declarations
46
class Smb4KPreviewItem;
49
* This is the preview dialog of Smb4K. You can preview remote
52
* @author Alexander Reinholdt <dustpuppy@users.berlios.de>
55
class KDE_EXPORT Smb4KPreviewDialog : public KDialog
61
* This is the constructor of the preview dialog.
63
* @param share The Smb4KShare object.
65
* @param parent The parent of this widget
67
Smb4KPreviewDialog( Smb4KShare *share,
68
QWidget *parent = 0 );
73
~Smb4KPreviewDialog();
76
* This function will request the preview. You should run it before
77
* you show the dialog, but it is not mandatory.
83
* This slot receives the results of the attempt to generate
86
* @param item The Smb4KPreviewItem for which a preview
89
void slotReceivedData( Smb4KPreviewItem *item );
92
* Is called, if an item has been executed.
94
* @param item The item that has been exected.
96
void slotItemExecuted( QListWidgetItem *item );
99
* This slot is called when the "Reload" action has been triggered.
101
* @param checked TRUE if the action is checked.
103
void slotReloadActionTriggered( bool checked );
106
* This slot is called when the "Back" action has been triggered.
108
* @param checked TRUE if the action is checked.
110
void slotBackActionTriggered( bool checked );
113
* This slot is called when the "Forward" action has been triggered.
115
* @param checked TRUE if the action is checked.
117
void slotForwardActionTriggered( bool checked );
120
* This slot is called when the "Up" action has been triggered.
122
* @param checked TRUE if the action is checked.
124
void slotUpActionTriggered( bool checked );
127
* Is called, if an item in the combo box is activated.
129
void slotItemActivated( const QString &item );
132
* This slot is called when the close button was clicked.
134
void slotCloseClicked();
138
* Enumeration for the buttons.
140
enum ButtonID{ Reload,
148
* Enumeration for the items in the list view.
150
enum ItemType{ File = 1000,
154
* The current button id
159
* Sets up the file view.
179
* The private Smb4KPreviewItem object
181
Smb4KPreviewItem *m_item;
184
* This list holds the history of the session.
186
QStringList m_history;
189
* The index of the current item in the history.