Exemple #1
0
int main( int argc, char ** argv )
{
    QApplication::setColorSpec( QApplication::ManyColor );
    QApplication a(argc, argv);

    QString home;
    if (argc > 1) {
        home = argv[1];
    } else {
	// Use a hard coded path. It is only an example.
	home = QDir( "../../doc/html/index.html" ).absPath();
    }

    HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
    help->setCaption("Qt Example - Helpviewer");
    if ( QApplication::desktop()->width() > 400
	 && QApplication::desktop()->height() > 500 )
	help->show();
    else
	help->showMaximized();

    QObject::connect( &a, SIGNAL(lastWindowClosed()),
                      &a, SLOT(quit()) );

    return a.exec();
}
Exemple #2
0
/**
 * Event handler pro kliknutí na tlačítko pro nápovědu
 * @param event
 */
void MenuWindow::clickHelp(wxCommandEvent &event)
{
    //zavolá defaultní prohlížeč a zobrazí nápovědu ve formátu html.
    //wxLaunchDefaultBrowser(wxT("file:///home/smoliczech/Desktop/IPP/trunk/help/index.html"));
    HelpWindow* help = new HelpWindow(this, wxID_ANY, wxEmptyString);
    help->Show();
    
}
Exemple #3
0
void Fractal::helpContents()
{
    updateStatus("");
    
    QString home = QDir( "./PhraX-Help/home.htm" ).absPath();       
//    QString home = QDir( "/usr/share/doc/doxygen-1.4.2/html/index.html" ).absPath();       

    HelpWindow *help = new HelpWindow(home, ".", 0, "help viewer");
    
    help->showMaximized();
    
} // helpContents()
Exemple #4
0
void
MainWindow::MessageReceived(BMessage *msg)
{
	switch (msg->what)
	{
		case B_ABOUT_REQUESTED:
		{
			AboutRequested();
			break;
		}
		case M_SHOW_HELP:
		{
			HelpWindow *helpwin = new HelpWindow();
			helpwin->Show();
			break;
		}
		case M_SHOW_CUSTOM:
		{
			CustomWindow *cswin = new CustomWindow();
			cswin->Show();
			break;
		}
		case M_NEW_GAME:
		{
			SetFace(FACE_NORMAL);
			SetupGame();
			break;
		}
		case M_SHOW_SCORES:
		{
			ScoreWindow *scorewin = new ScoreWindow();
			scorewin->Show();
			break;
		}
		case M_PAUSE_GAME:
		{
			BMenuItem *item = fMenuBar->FindItem(M_PAUSE_GAME);
			if (fTimerView->GetState() == TIMER_START)
			{
				fTimerView->SetState(TIMER_STOP);
				if (item)
					item->SetMarked(true);
				fFieldView->SetPauseMode(true);
			}
			else
			{
				if (item->IsMarked())
				{
					fTimerView->SetState(TIMER_START);
					if (item)
						item->SetMarked(false);
					fFieldView->SetPauseMode(false);
				}
			}
			break;
		}
		case M_SET_DIFFICULTY:
		{
			int32 level;
			if (msg->FindInt32("level",&level) != B_OK)
				break;

			BMenuItem *item = fMenuBar->FindItem(M_SET_DIFFICULTY);
			BMenu *menu = item ? item->Menu() : NULL;

			item = menu->FindMarked();
			if (item)
				item->SetMarked(false);
			menu->ItemAt(level)->SetMarked(true);

			gDifficulty = level;
			SetupGame();
			fFieldView->SetPauseMode(false);
			break;
		}
		case M_UPDATE_COUNT:
		{
			fCounterView->SetCount(fFieldView->MineCount() - fFieldView->FlagCount());
			break;
		}
		case M_START_TIMER:
		{
			fTimerView->SetState(TIMER_RESET);
			fTimerView->SetState(TIMER_START);
			gGameState = GAME_STARTED;
			break;
		}
		case M_SONAR_PENALTY:
		{
			fTimerView->SetState(TIMER_STOP);
			if (fTimerView->GetTime() < 979)
				fTimerView->SetTime(fTimerView->GetTime() + 20);
			else
				fTimerView->SetTime(999);
			fTimerView->SetState(TIMER_START);
			if (fFieldView->CheckWin())
				fFieldView->DoWin();
			break;
		}
		case M_SIZE_CHANGED:
		{
			ResizeTo(fFieldView->Frame().right + 10,fFieldView->Frame().bottom + 10);
			break;
		}
		case M_SET_THEME:
		{
			BString name;
			if (msg->FindString("name",&name) == B_OK)
				SetTheme(name.String());

			break;
		}
		case M_TOGGLE_SOUNDS:
		{
			gPlaySounds = gPlaySounds ? false : true;
			BMenuItem *item = fMenuBar->FindItem(M_TOGGLE_SOUNDS);
			if (item)
				item->SetMarked(!item->IsMarked());
			break;
		}
		default:
		{
			BWindow::MessageReceived(msg);
			break;
		}
	}
}
void ScannerPage::slotHelp ()
{
  QString s = "workwithscanner.html";
  HelpWindow *hw = new HelpWindow(this, s);
  hw->show();
}
Exemple #6
0
/**
  * handleHelpButton()
  * Handles the help button dialog
  */
void MainWindow::handleHelpButton()
{
    HelpWindow* help = new HelpWindow();
    help->show();
}
Exemple #7
0
void CSV::help ()
{
  HelpWindow *hw = new HelpWindow(this, helpFile);
  hw->show();
}
void TestPage::slotHelp ()
{
  QString s = "workwithbacktest.html";
  HelpWindow *hw = new HelpWindow(this, s);
  hw->show();
}
void MainWindow::menu_help_clicked()
{
    HelpWindow *hlp = new HelpWindow( this );
    hlp->setWindowTitle( "Help" );
    hlp->show();
}
void IndexDialog::help ()
{
  HelpWindow *hw = new HelpWindow(this, helpFile);
  hw->show();
}
void StocksDialog::help ()
{
    HelpWindow *hw = new HelpWindow(this, helpFile);
    hw->show();
}
void MainWindow::on_rules_triggered()
{
    HelpWindow *helpWind = new HelpWindow();
    helpWind->setModal(true);
    helpWind->show();
}
Exemple #13
0
void Chintz_base::Help(){
  HelpWindow *help = new HelpWindow("index.html", "docs", 0, "help viewer");
  help->show(); 
}
Exemple #14
0
void MainWindow::helpWindow()
{
  HelpWindow *helpWindow;
  helpWindow = new HelpWindow(this);
  helpWindow->show();
}
void FuturesDialog::help ()
{
  HelpWindow *hw = new HelpWindow(this, helpFile);
  hw->show();
}
void Preferences::slotHelp()
{
  HelpWindow *hw = new HelpWindow(this, helpFile);
  hw->show();
}