File indexing completed on 2024-10-06 04:35:40

0001 /*
0002  *  Password dialog
0003  *
0004  *  SPDX-FileCopyrightText: 2023 Alexander Reinholdt <alexander.reinholdt@kdemail.net>
0005  *  SPDX-License-Identifier: GPL-2.0-or-later
0006  */
0007 
0008 #ifndef SMB4KPASSWORDDIALOG_H
0009 #define SMB4KPASSWORDDIALOG_H
0010 
0011 // application specific includes
0012 #include "core/smb4kglobal.h"
0013 
0014 // Qt includes
0015 #include <QMap>
0016 
0017 // KDE includes
0018 #include <KPasswordDialog>
0019 
0020 class Q_DECL_EXPORT Smb4KPasswordDialog : public KPasswordDialog
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     /**
0026      * Constructor
0027      */
0028     explicit Smb4KPasswordDialog(QWidget *parent = nullptr);
0029 
0030     /**
0031      * Destructor
0032      */
0033     virtual ~Smb4KPasswordDialog();
0034 
0035     /**
0036      * Setup the dialog.
0037      *
0038      * @param networkItem       The network item
0039      */
0040     bool setNetworkItem(const NetworkItemPtr &networkItem);
0041 
0042 protected:
0043     void accept() override;
0044 
0045 private:
0046     NetworkItemPtr m_networkItem;
0047 };
0048 
0049 #endif