mirror of
https://gitflic.ru/project/astankevich/mtpview.git
synced 2025-02-23 05:27:42 +01:00
42 lines
897 B
C++
42 lines
897 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <Window.h>
|
|
#include <OutlineListView.h>
|
|
#include <FilePanel.h>
|
|
#include <Messenger.h>
|
|
#include <libmtp.h>
|
|
|
|
class FileItem: public BStringItem
|
|
{
|
|
public:
|
|
FileItem(LIBMTP_mtpdevice_t * device, int id, BString filename, bool isFile, int depth);
|
|
inline int fileId(){return fId;}
|
|
inline bool isFile(){return fIsFile;}
|
|
inline LIBMTP_mtpdevice_t * device(){return this->fDevice;}
|
|
private:
|
|
int fId;
|
|
bool fIsFile;
|
|
LIBMTP_mtpdevice_t * fDevice;
|
|
};
|
|
|
|
class MainWindow : public BWindow
|
|
{
|
|
public:
|
|
MainWindow(void);
|
|
void MessageReceived(BMessage *msg);
|
|
inline BOutlineListView * listView(){return this->fListView;};
|
|
void showErrorAlert(const char * message);
|
|
private:
|
|
BOutlineListView *fListView;
|
|
BButton *download;
|
|
BButton *upload;
|
|
BFilePanel* openPanel;
|
|
BFilePanel* savePanel;
|
|
BMessenger * messenger;
|
|
|
|
FileItem * selectedItem;
|
|
};
|
|
|
|
#endif
|