本文整理汇总了C++中Archiver::getWebsite方法的典型用法代码示例。如果您正苦于以下问题:C++ Archiver::getWebsite方法的具体用法?C++ Archiver::getWebsite怎么用?C++ Archiver::getWebsite使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Archiver
的用法示例。
在下文中一共展示了Archiver::getWebsite方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addRow
bool KrArchiverResultTable::addRow(SearchObject* search, QGridLayout* grid)
{
Archiver* arch = dynamic_cast<Archiver*>(search);
// Name column
_label = new KUrlLabel(arch->getWebsite(), arch->getSearchName(), this);
_label->setContentsMargins(5, 5, 5, 5);
_label->setAlignment(Qt::AlignTop);
grid->addWidget(_label, _numRows, 0);
connect(_label, SIGNAL(leftClickedUrl(const QString&)),
SLOT(website(const QString&)));
// Found column
_label = new QLabel(arch->getPath(), this);
_label->setContentsMargins(5, 5, 5, 5);
grid->addWidget(_label, _numRows, 1);
// Packing column
_label = new QLabel(this);
_label->setContentsMargins(5, 5, 5, 5);
_label->setAlignment(Qt::AlignTop);
if (arch->getIsPacker() && arch->getFound()) {
_label->setText(i18n("enabled"));
QPalette pal = _label->palette();
pal.setColor(_label->foregroundRole(), "darkgreen");
_label->setPalette(pal);
} else if (arch->getIsPacker() && !arch->getFound()) {
_label->setText(i18n("disabled"));
QPalette pal = _label->palette();
pal.setColor(_label->foregroundRole(), "red");
_label->setPalette(pal);
} else
_label->setText("");
grid->addWidget(_label, _numRows, 2);
// Unpacking column
_label = new QLabel(this);
_label->setContentsMargins(5, 5, 5, 5);
_label->setAlignment(Qt::AlignTop);
if (arch->getIsUnpacker() && arch->getFound()) {
_label->setText(i18n("enabled"));
QPalette pal = _label->palette();
pal.setColor(_label->foregroundRole(), "darkgreen");
_label->setPalette(pal);
} else if (arch->getIsUnpacker() && !arch->getFound()) {
_label->setText(i18n("disabled"));
QPalette pal = _label->palette();
pal.setColor(_label->foregroundRole(), "red");
_label->setPalette(pal);
} else
_label->setText("");
grid->addWidget(_label, _numRows, 3);
// Note column
_label = new QLabel(arch->getNote(), this);
_label->setContentsMargins(5, 5, 5, 5);
_label->setAlignment(Qt::AlignTop);
_label->setWordWrap(true); // wrap words
grid->addWidget(_label, _numRows, 4);
// Apply shared design elements
adjustRow(_grid);
// Ensure the last column takes more space
_label->setMinimumWidth(300);
++_numRows;
return true;
}