Atlas Game Manager
A game manager for f95 and dlsite written in c++
Loading...
Searching...
No Matches
ImageView.hpp
Go to the documentation of this file.
1//
2// Created by kj16609 on 4/17/23.
3//
4
5#pragma once
6#ifndef ATLASGAMEMANAGER_IMAGEVIEW_HPP
7#define ATLASGAMEMANAGER_IMAGEVIEW_HPP
8
9#include <QListView>
10#include <QMouseEvent>
11
15
16class ImageView final : public QListView
17{
18 Q_OBJECT
19
20 public:
21
22 ImageView( QWidget* parent = nullptr );
23
24 std::vector< std::filesystem::path > selectedItems() const;
25 std::vector< std::filesystem::path > paths() const;
26 std::vector< QString > pathsQString() const;
27
28 FilepathModel* filepathModel() const { return dynamic_cast< FilepathModel* >( QListView::model() ); }
29
30 ImageDelegate* delegate() const { return dynamic_cast< ImageDelegate* >( QListView::itemDelegate() ); }
31
32 private slots:
33 void modelReordered();
34
35 public slots:
36 void setPaths( const std::vector< std::filesystem::path >& paths );
37
38 signals:
39 void reordered( std::vector< std::filesystem::path > paths );
40};
41
42#endif //ATLASGAMEMANAGER_IMAGEVIEW_HPP
Definition FilepathModel.hpp:18
Definition ImageDelegate.hpp:14
std::vector< std::filesystem::path > selectedItems() const
Definition ImageView.cpp:31
std::vector< QString > pathsQString() const
Definition ImageView.cpp:51
ImageView(QWidget *parent=nullptr)
Definition ImageView.cpp:18
ImageDelegate * delegate() const
Definition ImageView.hpp:30
void setPaths(const std::vector< std::filesystem::path > &paths)
Definition ImageView.cpp:12
FilepathModel * filepathModel() const
Definition ImageView.hpp:28
std::vector< std::filesystem::path > paths() const
Definition ImageView.cpp:46
void modelReordered()
Definition ImageView.cpp:26
void reordered(std::vector< std::filesystem::path > paths)