本文整理汇总了C++中DataBase::get方法的典型用法代码示例。如果您正苦于以下问题:C++ DataBase::get方法的具体用法?C++ DataBase::get怎么用?C++ DataBase::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataBase
的用法示例。
在下文中一共展示了DataBase::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stats
Construction::Construction(MyWindow& window)
:target(window)
, stats(DATABASE.getStats())
, cursorVector(0, 0, 1)
, cursor(arus::Textures::cursor)
, kafelki()
, elementy()
, backShape()
, stillBuildingMap(true)
, itSaved(false)
, nextElement()
{
for (int i = 0; i < 13; i++)
for (int j = 0; j < 13; j++)
kafelkiID[i][j] = 0;
next.setFont(DATABASE.get(arus::Font::DisposableDroid));
next.setString("Next");
next.setPosition(770, 450);
next.setCharacterSize(30);
next.setFillColor(sf::Color::Black);
mapPos.x = 30;
mapPos.y = 25;
backShape.setSize(sf::Vector2f(13 * 54, 13 * 48));
backShape.setFillColor(sf::Color::Black);
backShape.setPosition(mapPos.x, mapPos.y);
backShape.setScale(1, 1);
backShapeNext.setSize(sf::Vector2f(54, 48));
backShapeNext.setFillColor(sf::Color::Black);
backShapeNext.setPosition(mapPos.x, mapPos.y);
backShapeNext.setScale(1, 1);
backShapeNext.setPosition(770, 500);
cursor.setPosition(mapPos.x + 27, mapPos.y + 24);
underCursor = elementy[0];
//mapTexture.loadFromFile("/Data/Textures/MapTextures.jpg");
//brick
elementy[1].setTextureAndRect(arus::Textures::brick, sf::IntRect(0, 0, 54, 48));
elementy[2].setTextureAndRect(arus::Textures::brick, sf::IntRect(0, 0, 27, 48));
elementy[3].setTextureAndRect(arus::Textures::brick, sf::IntRect(27, 0, 27, 48));
elementy[4].setTextureAndRect(arus::Textures::brick, sf::IntRect(0, 0, 54, 24));
elementy[5].setTextureAndRect(arus::Textures::brick, sf::IntRect(0, 24, 54, 24));
//steel
elementy[6].setTextureAndRect(arus::Textures::steel, sf::IntRect(0, 0, 54, 48));
elementy[7].setTextureAndRect(arus::Textures::steel, sf::IntRect(0, 0, 27, 48));
elementy[8].setTextureAndRect(arus::Textures::steel, sf::IntRect(27, 0, 27, 48));
elementy[9].setTextureAndRect(arus::Textures::steel, sf::IntRect(0, 0, 54, 24));
elementy[10].setTextureAndRect(arus::Textures::steel, sf::IntRect(0, 24, 54, 24));
//reszta
elementy[11].setTexture(arus::Textures::water); //water
elementy[12].setTexture(arus::Textures::ice); //ice
elementy[13].setTexture(arus::Textures::grass); //grass
elementy[14].setTexture(arus::Textures::eagle); //orzel
mapPos.x += 27;
mapPos.y += 24;
}
示例2: QVariant
void
PlotWidget::loadMarkers (DataBase &db)
{
// load marker names
QStringList names;
db.getTypes(QString("marker"), names);
for (int pos = 0; pos < names.size(); pos++)
{
Entity te;
te.setName(names.at(pos));
te.set(QString("plugin"), new QVariant(QString()));
te.set(QString("plot"), new QVariant(QString()));
te.set(QString("symbol"), new QVariant(QString()));
if (! db.get(&te))
continue;
QVariant *tset = te.get(QString("symbol"));
if (tset->toString() != g_symbol->symbol())
continue;
tset = te.get(QString("plot"));
Plot *p = _plots.value(tset->toString());
if (! p)
{
qDebug() << "PlotWidget::loadMarkers: plot not found" << tset->toString();
continue;
}
tset = te.get(QString("plugin"));
Marker *m = new Marker(tset->toString());
m->setID(names.at(pos));
Entity *e = m->settings();
e->setName(names.at(pos));
db.get(e);
p->setMarker(m);
}
}