2018-06-06 03:03:06 +08:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
2018-06-12 02:12:57 +08:00
|
|
|
|
2018-06-06 03:03:06 +08:00
|
|
|
#include "emb.h"
|
2018-06-12 02:12:57 +08:00
|
|
|
#include "nextpnr.h"
|
2018-06-13 03:29:37 +08:00
|
|
|
#include "qtpropertymanager.h"
|
|
|
|
#include "qttreepropertybrowser.h"
|
|
|
|
#include "qtvariantproperty.h"
|
2018-06-06 03:03:06 +08:00
|
|
|
|
|
|
|
#include <QMainWindow>
|
|
|
|
|
2018-06-12 20:24:59 +08:00
|
|
|
// FIXME
|
|
|
|
USING_NEXTPNR_NAMESPACE
|
|
|
|
|
2018-06-06 03:03:06 +08:00
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2018-06-07 04:53:52 +08:00
|
|
|
public:
|
2018-06-11 00:25:23 +08:00
|
|
|
explicit MainWindow(Design *design, QWidget *parent = 0);
|
2018-06-06 03:03:06 +08:00
|
|
|
~MainWindow();
|
2018-06-11 00:33:39 +08:00
|
|
|
Design *getDesign() { return design; }
|
2018-06-06 03:03:06 +08:00
|
|
|
|
2018-06-07 04:53:52 +08:00
|
|
|
private:
|
2018-06-06 03:03:06 +08:00
|
|
|
int executePython(std::string command);
|
|
|
|
|
2018-06-07 04:53:52 +08:00
|
|
|
private Q_SLOTS:
|
2018-06-06 03:03:06 +08:00
|
|
|
void on_lineEdit_returnPressed();
|
2018-06-13 03:29:37 +08:00
|
|
|
void prepareMenu(const QPoint &pos);
|
|
|
|
void selectObject(QTreeWidgetItem *item);
|
2018-06-06 03:03:06 +08:00
|
|
|
|
2018-06-07 04:53:52 +08:00
|
|
|
private:
|
2018-06-06 03:03:06 +08:00
|
|
|
Ui::MainWindow *ui;
|
|
|
|
emb::stdout_write_type write;
|
2018-06-11 00:25:23 +08:00
|
|
|
Design *design;
|
2018-06-13 03:29:37 +08:00
|
|
|
QtVariantPropertyManager *variantManager;
|
|
|
|
QtVariantEditorFactory *variantFactory;
|
|
|
|
QtTreePropertyBrowser *variantEditor;
|
2018-06-06 03:03:06 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|