Exemple #1
0
CodeEditor::CodeEditor(const QString &filePath, bool readOnly, QWidget *parent)
	: QWidget(parent), readOnly(readOnly) 
{
	setFilePath(filePath);
	setUi();
	setConnect();
} // CodeEditor
Exemple #2
0
// public
CodeEditor::CodeEditor(bool readOnly, QWidget *parent)
	: QWidget(parent), readOnly(readOnly)
{
    fileName = QString("noname.txt"); // 应避免重名
	setUi();
	setConnect();
} // CodeEditor
// connect: String containing the endpoint (3, 4, & 5)
bool ZeroMQHandler::setSlotConnect(const Basic::String* const msg)
{
   // Save the endpoint definition for use in the initialization of
   // the socket
   bool ok = false;
   if (msg != nullptr) ok = setConnect(*msg);
   return ok;
}
Exemple #4
0
KTexture::KTexture(QPixmap *image)
{
	p = NULL;
	gp = new KGraphicsPixmapItem();
	gp->setPixmap(*image);
	isDrag = false;
	setObjectName("KTexture");
	ce = new QGraphicsColorizeEffect();
	setConnect();
	mouse_event_cid = 0;
	mouse_press_func = NULL;
	mouse_release_func = NULL;
	mouse_move_func = NULL;
#ifdef K_USING_BOX2D
	isStatic = true;
	shapeDef = new b2FixtureDef();
#endif
#ifdef K_USING_OPENCV
	//setTrackData();
#endif
}
Exemple #5
0
KTexture::KTexture(const char *filepath_)
{
	QString filepath(filepath_);
	p = new QPixmap(filepath);
	gp = new KGraphicsPixmapItem();
	gp->setPixmap(*p);
	isDrag = false;
	setObjectName("KTexture");
	ce = new QGraphicsColorizeEffect();
	setConnect();
	mouse_event_cid = 0;
	mouse_press_func = NULL;
	mouse_release_func = NULL;
	mouse_move_func = NULL;
#ifdef K_USING_BOX2D
	isStatic = true;
	shapeDef = new b2FixtureDef();
#endif
#ifdef K_USING_OPENCV
	//setTrackData(filepath_);
#endif
}
MainWindow::MainWindow()
{
    model = NULL;
    view = NULL;
    openBase = closeBase = createBase = clearBase = addRecord = deleteRecord =
            editRecord = showRecord = selectRecord = diagram = NULL;

    createMenu();

    createWidgets();
    setSize();

    setButtonGroupLeftLayout();
    setButtonsGroupRightLayout();
    setMainLayout();

    box = new QWidget;
    box->setLayout(mainLayout);
    setCentralWidget(box);

    setConnect();
}