mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 22:09:52 +08:00
41 lines
838 B
C++
41 lines
838 B
C++
#ifndef NEWFOLDERDIALOG_H
|
|
#define NEWFOLDERDIALOG_H
|
|
|
|
#include "scrolldialog.h"
|
|
|
|
namespace vnotex
|
|
{
|
|
class Node;
|
|
class NodeInfoWidget;
|
|
|
|
class NewFolderDialog : public ScrollDialog
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
// New a folder under @p_node.
|
|
NewFolderDialog(Node *p_node, QWidget *p_parent = nullptr);
|
|
|
|
const QSharedPointer<Node> &getNewNode() const;
|
|
|
|
protected:
|
|
void acceptedButtonClicked() Q_DECL_OVERRIDE;
|
|
|
|
private:
|
|
void setupUI(const Node *p_node);
|
|
|
|
void setupNodeInfoWidget(const Node *p_node, QWidget *p_parent);
|
|
|
|
bool validateNameInput(QString &p_msg);
|
|
|
|
bool newFolder();
|
|
|
|
bool validateInputs();
|
|
|
|
NodeInfoWidget *m_infoWidget = nullptr;
|
|
|
|
QSharedPointer<Node> m_newNode;
|
|
};
|
|
} // ns vnotex
|
|
|
|
#endif // NEWFOLDERDIALOG_H
|