예제 #1
0
HistorySqlStorage::HistorySqlStorage(QObject *parent) :
		HistoryStorage(parent), DatabaseMutex(QMutex::NonRecursive)
{
	kdebugf();

	DatabaseMutex.lock();

	initDatabase();
	initQueries();

	DatabaseMutex.unlock();
}
예제 #2
0
파일: mainwindow.cpp 프로젝트: 4ukuta/core
MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
//    SettingsStorage::init();

    ui->setupUi(this);

    m_map = new MapScene(this);

    connect(m_map, SIGNAL(mapDoubleClick(QGraphicsSceneMouseEvent *)),
                          this, SLOT(onMapDoubleClick(QGraphicsSceneMouseEvent*)));
    connect(m_map, SIGNAL(mapMiddleButtonPressed(QGraphicsSceneMouseEvent *)),
                          this, SLOT(onMapMiddleButtonPressed(QGraphicsSceneMouseEvent*)));

    ui->graphicsView->setScene(m_map);

    m_map->setCenter(60.,30.);

    ui->graphicsView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    ui->graphicsView->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);

    initQueries();



    connect(ui->registerCheckbox,SIGNAL(stateChanged (int)),this, SLOT(onRegisterCheckboxChanged(int)));
    connect(ui->userActionButton,SIGNAL(pressed()),this,SLOT(onUserActionButtonPressed()));
    connect(ui->tagActionButton,SIGNAL(pressed()),this,SLOT(onTagActionButtonPressed()));

    connect(ui->tabWidget, SIGNAL(currentChanged(int)), this, SLOT(onTabChanged(int)));
    connect(ui->channelActionButton, SIGNAL(pressed()), this, SLOT(onChannelButtonPressed()));
    connect(ui->channelsListWidget, SIGNAL(currentRowChanged(int)), this, SLOT(onChannelsListChanged(int)));

    connect(ui->addChannelButton, SIGNAL(pressed()), this, SLOT(onAddChannelButtonPressed()));

    connect(ui->serverEdit,SIGNAL(textChanged(QString)), this, SLOT(onSettingsChanged()));
    connect(ui->portEdit, SIGNAL(textChanged(QString)), this, SLOT(onSettingsChanged()));

    connect(ui->writeTagButton, SIGNAL(pressed()), this ,SLOT(onWriteTagButtonPressed()));
}
예제 #3
0
파일: database.cpp 프로젝트: jrasm91/cs236
Database::Database(DatalogProgram dlp) {
	initSchemes(dlp.getSchemes());
	initFacts(dlp.getFacts());
	initQueries(dlp.getQueries());
}