X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=src%2Fwidgets%2FDraggableTreeView.h;fp=src%2Fwidgets%2FDraggableTreeView.h;h=f520ed360d94c0f9255a739199026827bb8b0465;hb=f18185adbdce9891be0cbd2197838441aaa5ed3e;hp=0000000000000000000000000000000000000000;hpb=7c6edb3608791950c6146ac242e2b6f493ca8e8c;p=PrivacyBrowserPC.git diff --git a/src/widgets/DraggableTreeView.h b/src/widgets/DraggableTreeView.h new file mode 100644 index 0000000..f520ed3 --- /dev/null +++ b/src/widgets/DraggableTreeView.h @@ -0,0 +1,42 @@ +/* + * Copyright 2023 Soren Stoutner . + * + * This file is part of Privacy Browser PC . + * + * Privacy Browser PC is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Privacy Browser PC is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Privacy Browser PC. If not, see . + */ + +#ifndef DRAGGABLETREEVIEW_H +#define DRAGGABLETREEVIEW_H + +// Qt toolkit headers. +#include + +class DraggableTreeView : public QTreeView +{ + // Include the Q_OBJECT macro. + Q_OBJECT + +public: + // The default contructor. + explicit DraggableTreeView(QWidget *parentWidget = nullptr); + +signals: + // The signals. + void bookmarksMoved() const; + +protected: + void dropEvent(QDropEvent *event) override; +}; +#endif