Classified ads
attachmentlistdialog.h
Go to the documentation of this file.
1 /* -*-C++-*- -*-coding: utf-8-unix;-*-
2  Classified Ads is Copyright (c) Antti Järvinen 2013.
3 
4  This file is part of Classified Ads.
5 
6  Classified Ads is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) any later version.
10 
11  Classified Ads is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public
17  License along with Classified Ads; if not, write to the Free Software
18  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20 
21 #ifndef LIST_ATTACHMENTS_DIALOG_H
22 #define LIST_ATTACHMENTS_DIALOG_H
23 
24 #include "dialogbase.h"
25 #include "../mcontroller.h"
26 #include "../ui_attachmentListDialog.h"
27 
29 class Hash ;
30 class Profile ;
31 class QAction ;
32 
37  Q_OBJECT
38 
39 public:
58  AttachmentListDialog(QWidget *aParent,
59  MController* aController,
60  Profile& aSelectedProfile,
61  QList<Hash>& aFilesToDisplay,
62  const Hash& aNodeToTryForRetrieval = KNullHash );
73  static Hash tryFindNodeByProfile(const Hash& aProfileFingerPrint, MController& aController);
74 private slots:
75  void okButtonClicked() ;
76  void cancelButtonClicked() ;
77  void infoButtonClicked() ;
78  void fileListDoubleClicked(const QModelIndex& aIndex);
79  void exportSharedFile() ;
80 signals:
82  const QString& aExplanation) ;
83 private: // members
84  Ui_attachmentListDialog ui ;
88 };
89 
90 #endif
void fileListDoubleClicked(const QModelIndex &aIndex)
void error(MController::CAErrorSituation aError, const QString &aExplanation)
Hash is class that carries 160-bit digest.
Definition: hash.h:38
CAErrorSituation
Definition: mcontroller.h:52
static Hash tryFindNodeByProfile(const Hash &aProfileFingerPrint, MController &aController)
class for dialog for listing (attached) files
Definition: attachmentlistdialog.h:36
QAction * iExportSharedFileAction
Definition: attachmentlistdialog.h:86
Model-class for helping display of shared binary blobs, usually from a profile.
Definition: binaryfilelistingmodel.h:34
const Hash iNodeToTryForRetrieval
Definition: attachmentlistdialog.h:87
BinaryFileListingModel * iListingModel
Definition: attachmentlistdialog.h:85
Pure-virtual interface class for controller. This is spammed across parties needing access to applica...
Definition: mcontroller.h:43
Hash KNullHash
Ui_attachmentListDialog ui
Definition: attachmentlistdialog.h:84
Carrier-class for user-profile data.
Definition: profile.h:37
base-class for content-posting dialogs of classified ads
Definition: dialogbase.h:32
AttachmentListDialog(QWidget *aParent, MController *aController, Profile &aSelectedProfile, QList< Hash > &aFilesToDisplay, const Hash &aNodeToTryForRetrieval=KNullHash)