void manGroupadd(void) { setBold(1); printf("Usage:\n\t groupadd "); setBold(0); printf("GROUP\n"); }
void manUserdel(void) { setBold(1); printf("Usage:\n\tuserdel"); setBold(0); printf(" LOGIN\n\n"); }
/** * Print manual page in case you don't understand. */ void manRoflcopter(void) { setBold(1); printf("Usage:\n\t roflcopter"); setBold(0); printf("\n\n \t\"We should totally put a ROFLcopter in our OS.\"\n\n"); }
/** * Draw the initial state of the board. * * @param state The game state to draw. */ void drawBoard(GameState* state) { int i, j; for (i = 0; i < 9; i++) { moveCursor(boardTop + i * 2, boardLeft); for (j = 0; j < 2 * 9 + 1; j++) { if ((i % 3) == 0 || (j % 6) == 0) { setForegroundColor(COLOR_WHITE); setBold(1); } else { setForegroundColor(COLOR_BLUE); } printf("-"); setBold(0); } moveCursor(boardTop + i * 2 + 1, boardLeft); for (j = 0; j < 9; j++) { if ((j % 3) == 0) { setForegroundColor(COLOR_WHITE); setBold(1); } else { setForegroundColor(COLOR_BLUE); } printf("|"); setForegroundColor(COLOR_WHITE); setBold(1); if (state->board[i][j] != '0') { printf("%c", state->board[i][j]); } else { printf(" "); } setBold(0); } setForegroundColor(COLOR_WHITE); setBold(1); printf("|"); setBold(0); } setBold(1); setForegroundColor(COLOR_WHITE); moveCursor(boardTop + 9 * 2, boardLeft); for (j = 0; j < 9; j++) { printf("--"); } printf("-"); setBold(0); moveCursor(boardTop + 1, boardLeft + 1); }
QgsStyleV2GroupSelectionDialog::QgsStyleV2GroupSelectionDialog( QgsStyleV2 *style, QWidget *parent ) : QDialog( parent ) , mStyle( style ) { setupUi( this ); QStandardItemModel* model = new QStandardItemModel( groupTree ); groupTree->setModel( model ); QStandardItem *allSymbols = new QStandardItem( tr( "All Symbols" ) ); allSymbols->setData( "all", Qt::UserRole + 2 ); allSymbols->setEditable( false ); setBold( allSymbols ); model->appendRow( allSymbols ); QStandardItem *group = new QStandardItem( "" ); //require empty name to get first order groups group->setData( "groupsheader", Qt::UserRole + 2 ); group->setEditable( false ); group->setFlags( group->flags() & ~Qt::ItemIsSelectable ); buildGroupTree( group ); group->setText( tr( "Groups" ) );//set title later QStandardItem *ungrouped = new QStandardItem( tr( "Ungrouped" ) ); ungrouped->setData( 0 ); ungrouped->setData( "group", Qt::UserRole + 2 ); setBold( ungrouped ); setBold( group ); group->appendRow( ungrouped ); model->appendRow( group ); QStandardItem *tag = new QStandardItem( tr( "Smart Groups" ) ); tag->setData( "smartgroupsheader" , Qt::UserRole + 2 ); tag->setEditable( false ); tag->setFlags( group->flags() & ~Qt::ItemIsSelectable ); setBold( tag ); QgsSymbolGroupMap sgMap = mStyle->smartgroupsListMap(); QgsSymbolGroupMap::const_iterator i = sgMap.constBegin(); while ( i != sgMap.constEnd() ) { QStandardItem *item = new QStandardItem( i.value() ); item->setEditable( false ); item->setData( i.key() ); item->setData( "smartgroup" , Qt::UserRole + 2 ); tag->appendRow( item ); ++i; } model->appendRow( tag ); // expand things in the group tree int rows = model->rowCount( model->indexFromItem( model->invisibleRootItem() ) ); for ( int i = 0; i < rows; i++ ) { groupTree->setExpanded( model->indexFromItem( model->item( i ) ), true ); } connect( groupTree->selectionModel(), SIGNAL( selectionChanged( const QItemSelection&, const QItemSelection& ) ), this, SLOT( groupTreeSelectionChanged( const QItemSelection&, const QItemSelection& ) ) ); }
/** * Print manual page for the man command. */ void manMan(void) { setBold(1); printf("Usage:\n\tman"); setBold(0); printf(" commandname\n\n"); setBold(1); printf("Also see:\n\thelp"); setBold(0); printf(" command for a list of available commands.\n"); }
/** * Display the intro. */ void intro(void) { setBold(1); printf("Welcome to Sudoku!\n"); setBold(0); printf("Use the arrow keys to move in the board,"); printf(" and use the number keys to place a number.\n"); printf("Inputing 0 will clear the field, if possible.\n"); printf("You can exit at any time by pressing q.\n"); printf("Press enter to start your game."); while (getchar() != '\n'); }
void NewsButton::refreshButton() { auto &feed = NewsFeed::instance(); auto unreadCount = feed.unreadCount(); if (unreadCount > 0) { QPixmap numberPixmap(Utils::smallIconSize()); numberPixmap.fill(Qt::transparent); QPainter painter(&numberPixmap); painter.setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing); painter.setBrush(QColor(250, 92, 92)); painter.setPen(Qt::NoPen); painter.drawEllipse(numberPixmap.rect().adjusted(1, 1, -1, -1)); auto font = painter.font(); font.setBold(true); painter.setFont(font); painter.setBrush(Qt::white); painter.setPen(Qt::white); painter.drawText(numberPixmap.rect(), Qt::AlignCenter, QString::number(unreadCount)); setIcon(QIcon(numberPixmap)); } else { setIcon(QIcon()); } setEnabled(!feed.isEmpty()); }
void GmailNotifier::sendMeNotification (const QString& title, const QString& msg, int num) { if (msg == LastMsg_) return; if (num && XmlSettingsManager::Instance ()->property ("ShowUnreadNumInTray").toBool ()) { CheckCreateAction (); NotifierAction_->setText (tr ("%n new message(s)", 0, num)); NotifierAction_->setToolTip (msg); auto font = qApp->font (); font.setBold (true); font.setItalic (true); const QIcon srcIcon (":/gmailnotifier/gmailicon.svg"); QIcon result; for (auto sz : { 16, 22, 32, 48, 64, 96, 128, 192 }) { const auto& px = srcIcon.pixmap (sz, sz); result.addPixmap (Util::DrawOverlayText (px, QString::number (num), font, QPen (Qt::black))); } NotifierAction_->setIcon (result); } LastMsg_ = msg; emit gotEntity (Util::MakeNotification (title, msg, PInfo_)); }
QFont PluginListWidgetItemDelegate::titleFont(const QFont &baseFont) const { auto retFont = baseFont; retFont.setBold(true); return retFont; }
TnooFont::TnooFont(int pointSize) : QFont(QStringLiteral("nootka"), pointSize) { setPixelSize(pointSize); setBold(false); setWeight(50); // Normal }
void HeadersWidget::setBoldFontForItem(int const index) { auto font = ui->headersTableWidget->item(index,0)->font(); font.setBold(true); ui->headersTableWidget->item(index, 0)->setFont(font); }
TemporalConstraintView::TemporalConstraintView( TemporalConstraintPresenter &presenter, QGraphicsObject* parent) : ConstraintView {presenter, parent}, m_bgColor{ScenarioStyle::instance().ConstraintDefaultBackground}, m_labelItem{new SimpleTextItem{this}}, m_counterItem{new SimpleTextItem{this}} { this->setParentItem(parent); this->setZValue(ZPos::Constraint); m_leftBrace = new LeftBraceView{*this, this}; m_leftBrace->setX(minWidth()); m_rightBrace = new RightBraceView{*this, this}; m_rightBrace->setX(maxWidth()); const int fontSize = 12; auto f = Skin::instance().SansFont; f.setBold(false); f.setPointSize(fontSize); f.setStyleStrategy(QFont::NoAntialias); m_labelItem->setFont(f); m_labelItem->setPos(0, -16); m_labelItem->setAcceptedMouseButtons(Qt::MouseButton::NoButton); m_labelItem->setAcceptHoverEvents(false); f.setPointSize(7); f.setStyleStrategy(QFont::NoAntialias); m_counterItem->setFont(f); m_counterItem->setColor(ColorRef(&Skin::Light)); m_counterItem->setAcceptedMouseButtons(Qt::MouseButton::NoButton); m_counterItem->setAcceptHoverEvents(false); }
void AbstractDataView::setCurrent(bool isCurrent) { auto mainWidget = hasDockWidgetParent() ? static_cast<QWidget *>(dockWidgetParent()) : this; auto f = mainWidget->font(); f.setBold(isCurrent); mainWidget->setFont(f); }
/** * Given a property and its associated label, will make font adjustments to the * label * based on whether or not the property is mandatory. * * @param prop :: property to which the label belongs * @param label :: widget containing the label */ void PropertyWidget::setLabelFont(Mantid::Kernel::Property *prop, QWidget *label) { if (!isOptionalProperty(prop)) { auto font = label->font(); font.setBold(true); label->setFont(font); } }
void XtgScanner::setPlain() { styleEffects = ScStyle_None; currentCharStyle.setFeatures(styleEffects.featureList()); m_isBold = true; m_isItalic = false; setBold(); }
Format::Format (QTextCharFormat tcf, QObject* parent):QObject (parent) { setBackground( tcf.background().color() ); setForeground( tcf.foreground().color() ); setBold( tcf.fontWeight() >= QFont::Bold ); setItalic( tcf.fontItalic() ); setPoints ( tcf.fontPointSize() ); }
void RzxTextEdit::setFormat(const Format& format) { setFont(format.family); setSize(format.size); setBold(format.bold); setItalic(format.italic); setUnderline(format.underlined); setColor(format.color); }
CLabel::CLabel(const string &name, int id, Color fgcolor, Color bgcolor, bool bold) : CWidget(name, id) { _centered = true; setForegroundColor(fgcolor); setBackgroundColor(bgcolor); setBold(bold); }
CFavoriteLocationsListItem(QTreeWidget * parent, std::list<CLocationsCollection>& parentList, std::list<CLocationsCollection>::iterator& dataItemIterator, bool isCategory) : QTreeWidgetItem(parent, QStringList() << dataItemIterator->displayName), _itemIterator(dataItemIterator), _parentList(parentList), _bIsCategory(isCategory) { if (isCategory) setBold(); }
DialogButton::DialogButton(QWidget *parent): QToolButton(parent) { auto fnt = this->font(); fnt.setPointSize(14); fnt.setBold(true); this->setFont(fnt); this->setMinimumSize(140, 50); this->setStyleSheet("background:rgb(100, 100, 100); border-style: inset; border-width: 1px; border-color: white; border-radius: 5px; color:white;"); }
/** * Command that returns the information about the usage and utility of other commands. * * @param name The name of the command whose manual page is being consulted. * * @return 0 if no manual was found, 1 otherwise. */ int displayManual(char* name) { size_t i, len = strlen(name), nameLen, numCommands; char* realStart; char* nextSpace; const Command* commands; // Consume white space for (i = 0; i < len && isspace(name[i]); i++); if (i == len) { // The string is only white space, we've been lied to! return 0; } realStart = name + i; nextSpace = strchr(realStart, ' '); if (nextSpace != NULL) { nameLen = nextSpace - realStart; } else { nameLen = strlen(realStart); } commands = getShellCommands(&numCommands); for (i = 0; i < numCommands; i++) { if (strncmp(commands[i].name, realStart, nameLen) == 0 && commands[i].name[nameLen] == 0) { setBold(1); printf("%s\n", commands[i].name); setBold(0); printf("\t%s\n\n", commands[i].desc); if (commands[i].man != NULL) { commands[i].man(); } return 1; } } return 0; }
CListWidget::CListWidget(const string &name, int id, Color fgcolor, Color bgcolor, bool bold) : CWidget(name, id) { scrollok(_window, true); _scroll = 0; _count = 0; _autoScroll = true; setForegroundColor(fgcolor); setBackgroundColor(bgcolor); setBold(bold); }
void CALabel::applyStyle(const CALabelStyle* pLabelStyle) { CC_RETURN_IF(!pLabelStyle); setFontName(pLabelStyle->getFontName()); setFontSize(pLabelStyle->getFontSize()); setColor(pLabelStyle->getFontColor()); setLineSpacing(pLabelStyle->getLineSpace()); setBold(pLabelStyle->isBold()); setItalics(pLabelStyle->isItalics()); setWordWrap(pLabelStyle->isWordWrap()); }
void SignalListPresenter::OnDomainChanged(const Signal& newDomain) { auto items = signalList->findItems(newDomain.name, Qt::MatchExactly); auto oldFont = items.at(0)->font(); if (domain) { domain->setFont(oldFont); } oldFont.setBold(true); oldFont.setItalic(true); items.at(0)->setFont(oldFont); domain = items.at(0); }
JFont::JFont(int face, int style, int size) : QFont(), metrics(*this) { int qfont_size; QString qfont_family; switch (size) { case SIZE_SMALL: qfont_size = QFONT_SIZE_SMALL; break; default: case SIZE_MEDIUM: qfont_size = QFONT_SIZE_MEDIUM; break; case SIZE_LARGE: qfont_size = QFONT_SIZE_LARGE; break; } setPointSize(qfont_size); switch (face) { case FACE_SYSTEM: qfont_family = QFONT_FAMILY_SYSTEM; break; default: case FACE_PROPORTIONAL: qfont_family = QFONT_FAMILY_PROPORTIONAL; break; case FACE_MONOSPACE: qfont_family = QFONT_FAMILY_MONOSPACE; break; } setFamily(qfont_family); if (style & STYLE_BOLD) setBold(true); if (style & STYLE_ITALIC) setItalic(true); if (style & STYLE_UNDERLINED) setUnderline(true); metrics = QFontMetrics(*this, JApplication::desktop()->screen()); id = attrs2id(face, style, size); cache[id] = this; }
CTabWidget::CTabWidget(const string &name, int id, Color fgcolor, Color bgcolor, bool bold) : CWidget(name, id) { _currentIndex = -1; _bottom = false; _listenKeys = false; CLayout *layout = new CVBoxLayout(); setLayout(layout); setForegroundColor(fgcolor); setBackgroundColor(bgcolor); setBold(bold); }
void DatumTextItem::setAsTitle() { background = Colors::base03; foreground = Colors::base06; auto f = font(); f.setBold(true); setFont(f); // Allow this item to grow horizontally forever setTextWidth(-1); // Force a redraw onDatumChanged(); }
int FontDisplay::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QLabel::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: setText(*(QString*)_a[1]); break; case 1: setBold(*(bool*)_a[1]); break; case 2: setItalic(*(bool*)_a[1]); break; case 3: setPointSize(*(int*)_a[1]); break; } _id -= 4; } return _id; }
QToolBar * AbstractDataView::toolBar() { if (m_toolBar) { return m_toolBar; } m_toolBar = new QToolBar(); auto font = m_toolBar->font(); font.setBold(false); m_toolBar->setFont(font); m_toolBar->setToolButtonStyle(Qt::ToolButtonStyle::ToolButtonTextBesideIcon); layout()->addWidget(m_toolBar); return m_toolBar; }