button::button(blinkenGame::color c) : m_selected(false), m_color(c) { KConfig *kc = kapp->config(); kc->setGroup("General"); QString cs = getColorString(); QString pixmap = QString("images/%1h.png").arg(cs); switch (c) { case blinkenGame::blue: m_key = kc->readNumEntry(cs, Qt::Key_3); break; case blinkenGame::yellow: m_key = kc->readNumEntry(cs, Qt::Key_1); break; case blinkenGame::red: m_key = kc->readNumEntry(cs, Qt::Key_2); break; case blinkenGame::green: m_key = kc->readNumEntry(cs, Qt::Key_4); break; default: // never happens break; } m_highlighted = new QPixmap(locate("appdata", pixmap)); }
void ScaffoldVertex::writeDot(std::ostream* pWriter) const { VertexID id = getID(); *pWriter << "\"" << id << "\" [ label =\"" << id << "," << getSeqLen() << "\" "; *pWriter << "style=\"filled\" fillcolor=\"" << getColorString() << "\" "; *pWriter << "];\n"; writeEdgesDot(pWriter); }
void button::setShortcut(int key) { m_key = key; m_selected = false; KConfig *kc = kapp->config(); kc->setGroup("General"); kc->writeEntry(getColorString(), key); kc->sync(); }
string MVBuilding::toString() const { stringstream s; s << getName() << " (" << getColorString() << ", " << getPrice() << "):"; return s.str(); }