本文整理汇总了C++中Help类的典型用法代码示例。如果您正苦于以下问题:C++ Help类的具体用法?C++ Help怎么用?C++ Help使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Help类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compareItems
virtual int compareItems(Item il, Item ir) {
Help *lval = (Help*)il;
Help *rval = (Help*)ir;
if (lval->p() == rval->p()) return 0;
if (lval->p()<rval->p()) return -1;
return 1;
}
示例2: command_generator
char* command_generator(const char* text, int state)
{
Help commands = readline_help_function();
Help::const_iterator it = commands.begin();
int length,match_counter;
match_counter = 0;
if(readline_current_match >= commands.size())
return (char*)NULL;
length = strlen(text);
for(;it != commands.end();it++)
{
if(!strncmp(it->first.c_str(),text,length) && match_counter >= readline_current_match)
{
char* returnMe = (char*) calloc(it->first.size()+1,sizeof(char));
strcat(returnMe,it->first.c_str());
readline_current_match++;
return returnMe;
}
match_counter++;
}
return (char*) NULL;
}
示例3: help
void clusterMembersDialog::help()
{
QString tab_title = m_dialog->tabWidget->tabText(
m_dialog->tabWidget->currentIndex());
QString anchor = tab_title.replace('/', '-').replace(' ', '-').toLower();
Help *h = Help::getHelpWindow(this);
h->setName("Cluster-Member Management");
h->setSource(QUrl("clusterMembersDialog.html#" + anchor));
h->raise();
h->show();
}
示例4: help
void ipcopAdvancedDialog::help()
{
QString tab_title = m_dialog->tabWidget->tabText(
m_dialog->tabWidget->currentIndex());
QString anchor = tab_title.replace('/', '-').replace(' ', '-').toLower();
Help *h = Help::getHelpWindow(this);
h->setName("Firewall platform: IPCOP");
h->setSource(QUrl("ipcopAdvancedDialog.html#" + anchor));
h->raise();
h->show();
}
示例5:
void linux24AdvancedDialog::help()
{
QString tab_title = m_dialog->tabWidget->tabText(
m_dialog->tabWidget->currentIndex());
QString anchor = tab_title.replace('/', '-').replace(' ', '-').toLower();
Help *h = Help::getHelpWindow(this);
h->setName("Host type Linux 2.4/2.6");
h->setSource(QUrl("linux24AdvancedDialog.html#" + anchor));
h->raise();
h->show();
}
示例6: help
void pixosIfaceOptsDialog::help()
{
QString tab_title = m_dialog->tabWidget->tabText(
m_dialog->tabWidget->currentIndex());
QString anchor = tab_title.replace('/', '-').replace(' ', '-').toLower();
Help *h = Help::getHelpWindow(this);
h->setName("PIX Interface");
h->setSource(QUrl("pixosIfaceOptsDialog.html#" + anchor));
h->raise();
h->show();
}
示例7: Help
void VoronoiWindow::helpPushButton_clicked()
{
Help* help = new Help(this, "help", false);
help->init(""); // TODO: Voronoi.html and Delaunay.html
if(help->erro_ == false)
{
help->show();
help->raise();
}
else
delete help;
}
示例8: main
int main()
{
Help* help = new Help();
switch(help->menu())
{
case 2:
double divisor, dividendo;
cout << "Digite o Divisor e posteriormente o dividendo" << endl;
cin >> divisor >> dividendo;
Divisao* div = new Divisao(divisor, dividendo);
cout << "Resultado: " << div->getResult() << endl;
break;
}
return 0;
}
示例9: Help
void Node::mousePressEvent(QMouseEvent *) {
Help *help = new Help(this, (Qt::Popup | Qt::Dialog));
help->resize(610, 458);
help->show();
}
示例10: main
//.........这里部分代码省略.........
tmp+=0.25; if(tmp>1.0)tmp=1.0;
val->setNum(tmp);
n->replace("p", val);
}
}
for (it.toFirst();it.current();++it) { //Parkplaetze bewerten
n = nl_i->find(it.currentKey());
if ((n->classname()).compare("agriculture") == 0){
QString *val = new QString("0.0");
unsigned int size=((*n)["size"])->toUInt();
if(size>4700){
n->replace("p", val);
}
}
}
nl_i->calcNewGEOValues(gN,gS,gW,gE,newX,newY,xRes,yRes);
MyList hl;
it.toFirst();
while(it.current()) {
float p;
//<<<<<<< ga_bu_industrie.cpp
// if (!(*it)["p"]) p=0.5;
// else p=(*it)["p"]->toFloat();
// if(p>0.0000001) {
// Help* h = new Help(p,it.currentKey());
// hl.append(h);
// }
//=======
if (!(**it)["p"]) p=(float)0.987;
else p=(**it)["p"]->toFloat();
Help* h = new Help(p,it.currentKey());
hl.append(h);
//>>>>>>> 1.6
++it;
}
hl.sort();
newX = int((gE-gW) / xRes);//calculate new image size
newY = int((gN-gS) / yRes);//calculate new image size
qDebug("$$$newX: %d, newY: %d, xRes: %f, yRes: %f, gN: %f, gS: %f, gE: %f, gW: %f",
newX, newY, xRes, yRes, gN, gS, gE, gW);
QFile fp(argv[2]); // 'XML' - description
if (!fp.open(IO_WriteOnly)) qDebug("write: file not accesable to %s\n",argv[2]);
QTextStream str(&fp);
QDict<int> dict( 17, FALSE ); //dictionary for the class nr.
QArray<NodeInfo*> infolist(nl_i->size()+1); // array of pointers to NodeInfo
Help *pl;
int i = 1;
int helplabel = 0;//, label = 0;
Image out_img(typeid(signed int),newX,newY,1); //generate out image
#ifdef WIN32
QArray <int> vec(nl_i->size()+1);
#else
int vec[nl_i->size()+1];
#endif
for (int ix=0; ix<nl_i->size()+1; ix++) vec[ix]=0; //info for labeling
out_img.setGeoCoordinates(gW,gN,gE,gS);
for ( pl=hl.first(); pl != 0; pl=hl.next() ) {
Node *node=nl_i->find(pl->cl_name());
//label = node->id();
NodeInfo* ni = new NodeInfo(newX, newY);
示例11: Help
Help(Help& rval){p_=rval.p(); cl_name_=rval.cl_name();}
示例12: on_actionScribo_Help_triggered
/**
* Opens the help dialog with a video
*/
void MainWindow::on_actionScribo_Help_triggered()
{
Help help;
help.setModal(true);
help.exec();
}
示例13:
bool operator == (Help& lval){return (p_==lval.p());}
示例14: QDialog
StartTipDialog::StartTipDialog(QWidget *parent): QDialog(parent)
{
setAttribute(Qt::WA_DeleteOnClose);
setModal(false);
http_getter = new HttpGet();
connect(http_getter, SIGNAL(done(const QString&)),
this, SLOT(downloadComplete(const QString&)));
m_dialog = new Ui::StartTipDialog_q;
m_dialog->setupUi(this);
QString pgm = m_dialog->program_name->text();
m_dialog->program_name->setText(pgm.arg(GENERATION));
m_dialog->program_version->setText(VERSION);
QString locale = QLocale::system().name(); //"en_US";
QStringList paths;
paths.append(QString(Constants::getResourcesDirectory().c_str()) +
"/help/" + locale);
paths.append(QString(Constants::getResourcesDirectory().c_str()) +
"/help/" + "en_US");
m_dialog->textview->setSearchPaths(paths);
m_dialog->textview->setOpenLinks(true);
m_dialog->textview->setOpenExternalLinks(true);
current_tip = -1;
// preload tips that come with the package
// we use separate Help() object for the tip of the day becayse it should
// have different size and should not be persistent
Help *h = new Help(NULL, "");
int tip_no = 1;
while (true)
{
QString tip_file;
tip_file.sprintf("tip%02d.html", tip_no);
QString contents;
if (fwbdebug)
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
qDebug("Trying tip file %s", tip_file.toAscii().constData());
#else
qDebug("Trying tip file %s", tip_file.toLatin1().constData());
#endif
QString help_file = h->findHelpFile(tip_file);
if (!help_file.isEmpty())
{
tips.append("file:" + tip_file);
tip_no++;
} else
break;
}
delete h;
current_tip = tips.size() - 1;
if (fwbdebug) qDebug("Have %d tips", tips.size());
first_run = st->getBool("UI/FirstRun");
}
示例15: Init
bool Init() {
Current = Structure::INTRO;
//Inicializacion de SDL
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
return false;
//Inicializacion de Display
if ((Display = SDL_SetVideoMode(1024, 768, 32,
SDL_HWSURFACE | SDL_DOUBLEBUF)) == NULL)
return false;
//Inicializacion de ventanas
if (!intro->Init())
return false;
if (!menu->Init())
return false;
if (!help->Init())
return false;
if (!ingame->Init())
return false;
if (!story->Init())
return false;
return true;
}