Exemplo n.º 1
0
void TApp::handleEvent(TEvent &event) {

  TApplication::handleEvent(event);
  if (event.what == evCommand) {
    switch(event.message.command) {
	 case cmAbout:       // display the about box
	   AboutDialog();
	   clearEvent(event);
	   break;
	 case cmList:        // display our list box
	   ListDialog();
	   clearEvent(event);
	   break;
    }
  }
}
Exemplo n.º 2
0
PageWelcome::PageWelcome(MainWindow* main_window)
	: QWidget(main_window->centralWidget()) {

	m_main_window = main_window;

	QLabel *label_logo = new QLabel(this);
	label_logo->setPixmap(QPixmap(":/img/header.png"));
	QLabel *label_welcome = new QLabel(this);
	label_welcome->setText("<p>Welcome to SimpleScreenRecorder!</p>\n\n"
						   "<p>Despite the name, this program actually has a lot of options. Don't worry though, there are really just two things that you "
						   "need to know. One, the default settings are usually fine. If you don't know what something does, just use the default. "
						   "Two, almost all settings have tooltips. Just hover the mouse over something to find out what it does.</p>\n\n"
						   "<p>For more information:<br>\n"
						   "<a href=\"http://www.maartenbaert.be/simplescreenrecorder/\">http://www.maartenbaert.be/simplescreenrecorder/</a></p>");
	label_welcome->setWordWrap(true);
	label_welcome->setTextFormat(Qt::RichText);
	label_welcome->setTextInteractionFlags(Qt::TextBrowserInteraction);
	label_welcome->setOpenExternalLinks(true);
	QPushButton *button_about = new QPushButton("About SimpleScreenRecorder", this);
	QPushButton *button_continue = new QPushButton(QIcon::fromTheme("go-next"), "Continue", this);

	connect(button_about, SIGNAL(clicked()), this, SLOT(AboutDialog()));
	connect(button_continue, SIGNAL(clicked()), m_main_window, SLOT(GoPageInput()));

	QVBoxLayout *layout = new QVBoxLayout(this);
	{
		QHBoxLayout *layout2 = new QHBoxLayout();
		layout->addLayout(layout2);
		layout2->addStretch();
		layout2->addWidget(label_logo);
		layout2->addStretch();
	}
	layout->addWidget(label_welcome);
	{
		QHBoxLayout *layout2 = new QHBoxLayout();
		layout->addLayout(layout2);
		layout2->addWidget(button_about);
		layout2->addStretch();
	}
	layout->addStretch();
	layout->addWidget(button_continue);

}
Exemplo n.º 3
0
void MainWindow::showAboutBox()
{
    AboutDialog().exec();
}
Exemplo n.º 4
0
void MainWindow::showAboutDialog() {
    AboutDialog(this).exec();
}
Exemplo n.º 5
0
void MainFrame::AboutDialogHandler(wxCommandEvent& WXUNUSED(event))
{
	AboutDialog(this).ShowModal();
}
Exemplo n.º 6
0
void Core::runPlugin()
{
    AboutDialog().exec();
}
Exemplo n.º 7
0
void MainFrame::OnAbout(wxCommandEvent& event)
{
    AboutDialog().ShowModal();
}
Exemplo n.º 8
0
void MathTools::on_aboutAction_triggered() {
  AboutDialog(this).exec();
}
Exemplo n.º 9
0
static void cb_About(Fl_Item*, void*) {
  AboutDialog("Volume Control","1.0","");
}
Exemplo n.º 10
0
void
MainWindow::onAbout() {
    AboutDialog(this, ccliveVersion, isCcliveFlag, libName, libVersion).exec();
}
Exemplo n.º 11
0
static void ContextMenu(PluginInstance *This, HWND hwnd)
{
	int cmd;
	HMENU menu;
	POINT pt;
	unsigned char buf[MAX_PATH], buf2[200];

	pt.x=0; pt.y=0;
	GetCursorPos(&pt);

	// create context menu dynamically
	menu=CreatePopupMenu();
	if(This->errorflag) {
		AppendMenu(menu,MF_ENABLED,ID_SHOWERROR,"SHOW ERROR MESSAGE");
		AppendMenu(menu,MF_SEPARATOR,0,NULL);
	}

	AppendMenu(menu,(This->loadstate>=STATE_LOADED?MF_ENABLED:MF_GRAYED),ID_SAVEAS,"Save Image &As...");
	AppendMenu(menu,(This->lpdib?MF_ENABLED:MF_GRAYED),ID_COPYIMAGE,"&Copy Image");
	AppendMenu(menu,MF_ENABLED,ID_COPYURL,"Cop&y Image Location");
	if(This->islink) {
		AppendMenu(menu,MF_ENABLED,ID_COPYLINKLOC,"Copy Link Location");
	}

	url2filename(buf,This->url);
	escapeformenu(buf);
	if(lstrlen(buf)) {
		wsprintf(buf2,"View Image (%s)",buf);
	}
	else {
		wsprintf(buf2,"View Image");
	}
	AppendMenu(menu,MF_ENABLED,ID_VIEWIMAGE,buf2);


	AppendMenu(menu,MF_SEPARATOR,0,NULL);
	// AppendMenu(menu,(This->mng?MF_ENABLED:MF_GRAYED),ID_STOPANIM,"Stop Animation");


	AppendMenu(menu,(This->mng?MF_ENABLED:MF_GRAYED)|
		(This->frozen?MF_CHECKED:MF_UNCHECKED),ID_FREEZE,"&Freeze Animation");

	// AppendMenu(menu,(This->mng?MF_ENABLED:MF_GRAYED),ID_RESTARTANIM,"Restart Animation");

	AppendMenu(menu,MF_SEPARATOR,0,NULL);

	AppendMenu(menu,MF_ENABLED,ID_PROPERTIES,"Properties...");

	AppendMenu(menu,MF_ENABLED,ID_ABOUT,"About MNG Plug-in...");

	cmd=TrackPopupMenuEx(menu, TPM_LEFTALIGN|TPM_TOPALIGN|TPM_NONOTIFY|TPM_RETURNCMD|
		TPM_RIGHTBUTTON,pt.x,pt.y,hwnd,NULL);

	DestroyMenu(menu);

	switch(cmd) {

	case ID_STOPANIM:
		if(This->mng) {
			KillTimer(This->fhWnd,1);
			This->timer_set=0;
			mng_display_freeze(This->mng);
		}
		break;

	case ID_FREEZE:
		This->frozen = !This->frozen;
		if(This->frozen) {
			KillTimer(This->fhWnd,1);
			This->timer_set=0;
			mng_display_freeze(This->mng);
		}
		else {
			handle_read_error(This, mng_display_resume(This->mng) );

		}
		break;

	case ID_RESTARTANIM:
		if(!This->frozen) {
			KillTimer(This->fhWnd,1);
			This->timer_set=0;
			mng_display_freeze(This->mng);
		}
		This->frozen=1;
		mng_display_reset(This->mng);
		This->frozen=0;
		handle_read_error(This, mng_display_resume(This->mng) );
		break;

	case ID_SAVEAS:
		SaveImage(This);
		break;
	case ID_COPYIMAGE:
		if(This->lpdib) {
			CopyToClipboard(This,(unsigned char*)This->lpdib,This->dibsize,CF_DIB);
		}
		else {
			warn(This,"No image to copy");
		}
		break;
	case ID_COPYURL:
		CopyToClipboard(This,This->url,lstrlen(This->url)+1,CF_TEXT);
		break;
	case ID_COPYLINKLOC:
		if(This->islink) {
			CopyToClipboard(This,This->linkurl,lstrlen(This->linkurl)+1,CF_TEXT);
		}
		break;
	case ID_VIEWIMAGE:
		if(lstrlen(This->url)) 
			NPN_GetURL(This->instance,This->url,"_self");
		break;
	case ID_PROPERTIES:
		PropDialog(This);
		break;
	case ID_ABOUT:
		AboutDialog(This);
		break;
	case ID_SHOWERROR:
		display_last_error(This);
		break;
	}
}