Skip to content
UploadInterface.h 1.46 KiB
Newer Older
Kevin Whitaker's avatar
Kevin Whitaker committed
/*
 * Copyright (C) 2017  Kevin Whitaker <eyecreate@gmail.com>
 *
 * This program 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 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

#ifndef UPLOADINTERFACE_H
#define UPLOADINTERFACE_H

#include <Wt/WContainerWidget>
#include "../WebInterface.h"
#include <Wt/WVBoxLayout>
#include <Wt/WPushButton>
#include <Wt/WTextArea>
#include <Wt/WFileUpload>
#include <Wt/WProgressBar>
Kevin Whitaker's avatar
Kevin Whitaker committed

class UploadInterface : public Wt::WContainerWidget
{
public:
    UploadInterface(WebInterface* app);
Kevin Whitaker's avatar
Kevin Whitaker committed
    WebInterface* app;
    
    Wt::WVBoxLayout* mainLayout;
    Wt::WFileUpload* fileDrop;
    Wt::WTextArea* logs;
    Wt::WPushButton* clearLogs;
    
    void reInitUploadBox();
    void fileDropChanged();
    void fileDropTooLarge();
    void fileDropUploaded();
    void clearLogsClicked();
    
Kevin Whitaker's avatar
Kevin Whitaker committed
};

#endif // UPLOADINTERFACE_H