nextpnr/gui/ice40/mainwindow.h

60 lines
1.6 KiB
C
Raw Normal View History

2018-06-22 22:21:20 +08:00
/*
* nextpnr -- Next Generation Place and Route
*
* Copyright (C) 2018 Miodrag Milanovic <miodrag@symbioticeda.com>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
2018-06-21 19:41:16 +08:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "../basewindow.h"
2018-06-22 19:10:27 +08:00
NEXTPNR_NAMESPACE_BEGIN
2018-06-21 19:41:16 +08:00
class MainWindow : public BaseMainWindow
{
Q_OBJECT
public:
explicit MainWindow(std::unique_ptr<Context> context, CommandHandler *handler, QWidget *parent = 0);
virtual ~MainWindow();
2018-06-21 19:41:16 +08:00
public:
void createMenu();
2018-08-03 01:25:20 +08:00
2018-08-03 00:50:08 +08:00
protected:
2018-08-06 00:02:33 +08:00
void load_pcf(std::string filename);
2018-08-03 00:50:08 +08:00
void onDisableActions() override;
2019-06-14 17:14:18 +08:00
void onUpdateActions() override;
2018-08-03 00:50:08 +08:00
protected Q_SLOTS:
2018-11-05 15:56:01 +08:00
void new_proj() override;
2018-06-23 22:55:13 +08:00
void open_pcf();
2018-06-26 19:49:32 +08:00
void save_asc();
2018-06-26 21:47:22 +08:00
void newContext(Context *ctx);
private:
2018-06-23 22:55:13 +08:00
QAction *actionLoadPCF;
2018-06-26 19:49:32 +08:00
QAction *actionSaveAsc;
2018-06-21 19:41:16 +08:00
};
2018-06-22 19:10:27 +08:00
NEXTPNR_NAMESPACE_END
2018-06-21 19:41:16 +08:00
#endif // MAINWINDOW_H