本文整理汇总了C++中reload函数的典型用法代码示例。如果您正苦于以下问题:C++ reload函数的具体用法?C++ reload怎么用?C++ reload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了reload函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
return 0;
case 'l':
logp("-l <logfile> option obsoleted\n");
break;
case 'n':
forking=0;
break;
case 'r':
regex=optarg;
break;
case 's':
strip=atoi(optarg);
break;
case 'v':
printf("%s-%s\n", progname(), VERSION);
return 0;
case 'z':
browsefile=optarg;
break;
case 'h':
case '?':
default:
usage();
return 1;
break;
}
}
if(optind<argc)
{
usage();
return 1;
}
if(reload(&conf, configfile,
1 /* first time */,
0 /* no oldmax_children setting */,
0 /* no oldmax_status_children setting */)) return 1;
if((act==ACTION_RESTORE || act==ACTION_VERIFY) && !backup)
{
logp("No backup specified. Using the most recent.\n");
backup="0";
}
if(conf.mode==MODE_CLIENT)
{
if(orig_client && *orig_client)
{
if(!(conf.orig_client=strdup(orig_client)))
{
logp("out of memory\n");
return 1;
}
}
}
if(conf.mode==MODE_SERVER
&& (act==ACTION_STATUS || act==ACTION_STATUS_SNAPSHOT))
{
// Server status mode needs to run without getting the lock.
}
else
{
if(get_lock(conf.lockfile))
{
logp("Could not get lockfile.\n");
示例2: reload
void FontTexture::bind()
{
reload();
glBindTexture(GL_TEXTURE_2D, id);
}
示例3: reload
void KreCategoriesListWidget::createCategory( const Element & category, int parent_id )
{
reload( ForceReload );
}
示例4: SIGNAL
void PainterTerrain::setWaterAlgorithm(PathWaterAlgorithm *da){
water_algorithm = da;
render_tab = render_water;
QObject::connect(water_algorithm, SIGNAL(reload()), this, SLOT(updateGL()));
this->GLWidget::updateGL();
}
示例5: reload
void KOEventEditor::modified()
{
// Play dumb, just reload the event. This dialog has become so complicated
// that there is no point in trying to be smart here...
reload();
}
示例6: reload
void gRuleEditorWidget::on_btnRemoveEvent_clicked()
{
if(ui->listEvents->selectedItems().count() == 0)return;
m_conn.removeSenderEvent(ui->listEvents->currentRow());
reload();
}
示例7: file_name_
ShadingModel::ShadingModel(std::string const& name,
std::string const& file_name)
: file_name_(file_name), shader_stages_(4), name_(name) {
reload();
}
示例8: create
void create()
{
reload("tianzhu_huang_tang");
set_name("╗к╠└", ({"huang tang", "huang", "tang"}));
示例9: SLOT
void KonqSideBarWebModule::pageLoaded() {
if( reloadTimeout > 0 ) {
QTimer::singleShot( reloadTimeout, this, SLOT(reload()) );
}
}
示例10: qDebug
ImageStatus ImageItem::render(const RenderSetting &setting, ImageModel *model)
{
if (renderSetting() == setting && renderStatus() == IMAGE_STATUS_DONE)
{
qDebug("Image:%s is already ready\n", name().toStdString().c_str());
return renderStatus();
}
// MUST NOT reload at this time
setRenderStatus(IMAGE_STATUS_WAIT);
qDebug("Render Image:%s!!! \n", name().toStdString().c_str());
if (!(renderSetting() == setting) &&
!model->getImagesMgr().makeEnoughMemory(tryCalcImageLength(
setting.contentArea().width(),
setting.contentArea().height(),
QImage::Format_Indexed8),
name(),
model->renderPolicy()))
{
setRenderStatus(IMAGE_STATUS_ABORT);
return renderStatus();
}
// if the data is null, reload the image
if (needReload(setting) && !reload())
{
qWarning("Reload fails\n\n");
setRenderStatus(IMAGE_STATUS_ABORT);
return renderStatus();
}
if (data_ == 0)
{
setRenderStatus(IMAGE_STATUS_ABORT);
return renderStatus();
}
int cur_area_size = data_->width() * data_->height();
int scaled_area_size = setting.contentArea().width() * setting.contentArea().height();
if (cur_area_size < scaled_area_size)
{
// pre-quantize
quantize();
}
else if (cur_area_size > scaled_area_size)
{
dirty_ = true;
}
if (setting.rotation() != renderSetting().rotation())
{
rotate(setting.rotation());
}
if (setting.contentArea() != renderSetting().contentArea())
{
if (!scaled(setting.contentArea().size()))
{
setRenderStatus(IMAGE_STATUS_ABORT);
return renderStatus();
}
}
// post-quantize
quantize();
setRenderSetting(setting);
setRenderStatus(IMAGE_STATUS_DONE);
return renderStatus();
}
示例11: reload
ImageStatus ImageItem::renderThumbnail(const QRect &bounding_rect,
QRect &display_area,
shared_ptr<ImageThumbnail> thumbnail,
ImageModel *model)
{
// check the previous thumbnail image
if (thumbnail->image() != 0)
{
if (thumbnail->size() != display_area.size())
{
thumbnail->clearPage();
}
else
{
return IMAGE_STATUS_DONE;
}
}
// if there is no data being loaded, reload the image
scoped_ptr<QImage> cur_data;
if (data_ == 0)
{
reload();
}
cur_data.reset(new QImage(*data_));
if (!display_area.isValid())
{
getThumbnailRectangle(bounding_rect, cur_data->size(), &display_area);
}
if (model->getThumbsMgr().makeEnoughMemory(tryCalcImageLength(
display_area.width(),
display_area.height(),
QImage::Format_Indexed8),
name(),
model->renderPolicy()))
{
int width = display_area.width();
int height = display_area.height();
int cur_area_size = cur_data->width() * cur_data->height();
int scaled_area_size = width * height;
bool dithered = false;
if (cur_area_size < scaled_area_size)
{
// pre-dither
dithering_strategy_->dither(cur_data.get());
dithered = true;
}
if (cur_data->size() != display_area.size())
{
cur_data.reset(scaled(display_area.size(), cur_data.get()));
}
if (!dithered && ImageGlobalSettings::instance().needDither())
{
// post-dither
dithering_strategy_->dither(cur_data.get());
}
thumbnail->setImage(cur_data.release());
thumbnail->setOriginSize(actualSize());
return IMAGE_STATUS_DONE;
}
return IMAGE_STATUS_FAIL;
}
示例12: reload
void AttributeManager::initialize()
{
reload();
}
示例13: QObject
EnvMap::EnvMap(QProcess *process)
: QObject(0), _process(process)
{
reload();
}
示例14: create
void create()
{
reload("wuji_xiaoer_er");
set_name("店小二", ({"xiao er","xiaoer","xiao","waiter","er"}));
示例15: reload
// Reload the configuration using the specified configuration loader
bool Configuration::reload(ConfigLoader* configLoader)
{
this->configLoader = configLoader;
return reload();
}