mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-24 21:28:41 -05:00
924e20efa8
Samples are downloaded from a web server, currently the SF download server. The samples are stored in the source controlled samples directory and the CMake script there builds a suitable directory tree for upload to the web server under samples/web containing the samples hierarchy and the generated JSON contents database file. The samples CMake script also defines an 'upload-samples' target that uses rsync to efficiently upload the samples and the accompanying contents JSON database file. Any directory structure under the samples directory may be created, to add a new sample file simply add the file to source control and amend the list of sample files (SAMPLE_FILES) in samples/CMakeLists.txt. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6308 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
31 lines
675 B
C++
31 lines
675 B
C++
#ifndef DIRECTORY_DELEGATE_HPP__
|
|
#define DIRECTORY_DELEGATE_HPP__
|
|
|
|
#include <QStyledItemDelegate>
|
|
|
|
class QObject;
|
|
class QStyleOptionVoew;
|
|
class QModelIndex;
|
|
class QPainter;
|
|
|
|
//
|
|
// Styled item delegate that renders a progress bar in column #1
|
|
//
|
|
// model column #1 DisplayRole is the progress in bytes
|
|
// model column #1 UserRole is the expected number of bytes
|
|
//
|
|
class DirectoryDelegate final
|
|
: public QStyledItemDelegate
|
|
{
|
|
public:
|
|
explicit DirectoryDelegate (QObject * parent = nullptr)
|
|
: QStyledItemDelegate {parent}
|
|
{
|
|
}
|
|
|
|
void paint (QPainter * painter, QStyleOptionViewItem const& option
|
|
, QModelIndex const& index) const override;
|
|
};
|
|
|
|
#endif
|