Exemplo n.º 1
0
CodeEditor::CodeEditor(const QString &filePath, bool readOnly, QWidget *parent)
	: QWidget(parent), readOnly(readOnly) 
{
	setFilePath(filePath);
	setUi();
	setConnect();
} // CodeEditor
Exemplo n.º 2
0
// public
CodeEditor::CodeEditor(bool readOnly, QWidget *parent)
	: QWidget(parent), readOnly(readOnly)
{
    fileName = QString("noname.txt"); // 应避免重名
	setUi();
	setConnect();
} // CodeEditor
Exemplo n.º 3
0
// 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;
}
Exemplo n.º 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
}
Exemplo n.º 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
}
Exemplo n.º 6
0
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();
}