Exemplo n.º 1
0
void
TheApp::AboutRequested()
{
	const char* holders[] = {
		"2009-2010 Andrea Anzani",
		"2010-2015 Dario Casalinuovo",
		"2009-2010 Pier Luigi Fiorini",
		NULL
	};

	const char* authors[] = {
		"Andrea Anzani",
		"Dario Casalinuovo",
		"Pier Luigi Fiorini",
		NULL
	};

	BString extraInfo;
	extraInfo << "Caya is released under the GNU GPL License." << "\n";
	extraInfo << "Some parts of Caya are available under MIT license." << "\n";
	extraInfo << "Built: " << BUILD_DATE;

	AboutWindow* about = new AboutWindow("Caya", holders,
		authors, extraInfo.String());
	about->Show();
	delete about;
}
Exemplo n.º 2
0
AboutApp::AboutApp()
	: BApplication("application/x-vnd.Haiku-About")
{
	AboutWindow *window = new(std::nothrow) AboutWindow();
	if (window)
		window->Show();
}
Exemplo n.º 3
0
int32 AboutWindow::ScrollIt (void *data)
{
	/* This thread function controls the scrolling of the marqueeview */
	AboutWindow *wnd ((AboutWindow*)data);
	float textLen, height, ptY;
	BPoint pt;

	/* Calculate a few things here so that our 'while' loop is as fast as possible */	
	wnd->textView->LockLooper();
	textLen = wnd->textView->TextLength() - 1;
	height = wnd->Bounds().Height();
	pt = wnd->textView->PointAt (wnd->textView->TextLength() - 1);
	ptY = pt.y + height;
	wnd->textView->UnlockLooper();
	MarqueeView *vw = wnd->textView;

	/* Control the scrolling view */
	for (;;)
	{
		if (vw->LockLooper() == true)
			vw->ScrollBy (0, 1);
		else
			break;
		
		if (vw->Bounds().bottom > ptY)
			vw->ScrollTo (0, 0);
		
		vw->UnlockLooper();
		snooze (SCROLL_DELAY);
	}

	return 0;
}
Exemplo n.º 4
0
// Show centered, borderless Aboutwindow
void Fontboy::ShowSplashScreen(bool mode)
{
	AboutWindow *fmabout = new AboutWindow(mode);
	
	if (fmabout != NULL) {
		fmabout->Center();
		fmabout->Show();
	}
}
Exemplo n.º 5
0
AboutApp::AboutApp()
	: BApplication("application/x-vnd.Haiku-About")
{
	B_TRANSLATE_MARK_SYSTEM_NAME("AboutSystem");

	AboutWindow *window = new(std::nothrow) AboutWindow();
	if (window)
		window->Show();
}
Exemplo n.º 6
0
void MainWindow::on_actionAbout_triggered()
{

AboutWindow * abw = new AboutWindow(this);

abw->setWindowModality(Qt::WindowModal);

abw->show();

}
Exemplo n.º 7
0
void MrPeeps::AboutRequested(void)
{
    AboutWindow *ab;
    if(modifiers() & (B_LEFT_COMMAND_KEY | B_LEFT_SHIFT_KEY |
                      B_LEFT_CONTROL_KEY | B_LEFT_OPTION_KEY))
        ab=new AboutWindow(ABOUT_OK2);
    else
        ab=new AboutWindow();
    ab->Show();
}
Exemplo n.º 8
0
void AppGuiBase::openWindow(int windowType)
{
    if(windowType == WINDOW_LOG) {
        logWindow->Show();
    } else if (windowType == WINDOW_SETTINGS) {
        settingsWindow->Show();
    } else if(windowType == WINDOW_ABOUT) {
        AboutWindow* aWindow = new AboutWindow(GetParent());
        aWindow->m_Text->SetText("Octanium.eu 2012");
        int aW = aWindow->Width();
        int aH = aWindow->Height();
        aWindow->m_Text->SetPos( (aW-aWindow->m_Text->Width())*0.5, (aH-aWindow->m_Text->Height())*0.5 );
    }
}
Exemplo n.º 9
0
void MainWindowBase::onActionAbout()
{
    AboutWindow* aboutWindow = new AboutWindow(this);
    aboutWindow->show();
    connect(aboutWindow, SIGNAL(finished()), aboutWindow, SLOT(deleteLater()));
}
Exemplo n.º 10
0
void MainWindow::aboutGame(){
    AboutWindow aboutWindow;
    aboutWindow.setModal(true);
    aboutWindow.setStyleSheet("QDialog{background-image:url(:/Resource/images/Background.png)}");
    aboutWindow.exec();
}
Exemplo n.º 11
0
/**
  * handleAboutButton()
  * Handles the about button dialog
  */
void MainWindow::handleAboutButton()
{
    AboutWindow* aboutWindow = new AboutWindow();
    aboutWindow->show();
}
Exemplo n.º 12
0
void EditorWindow::on_actionHelp_triggered()
{
    AboutWindow *about = new AboutWindow(this);
    about->show();
}
Exemplo n.º 13
0
void
App::AboutRequested(void)
{
	AboutWindow *win = new AboutWindow();
	win->Show();
}
Exemplo n.º 14
0
void MainWindow::on_AboutW_activated()
{
   // Показать окно "О программе"
   AboutWindow about;
   about.exec();
}
Exemplo n.º 15
0
void MainWindow::on_AboutW_triggered()
{
    // Показать окно "О программе"
    AboutWindow about;
    about.exec();
}
Exemplo n.º 16
0
void PApp::MessageReceived(BMessage *msg)
{
	try
	{
		switch (msg->what)
		{
			case msg_SaveAll:
			{
				const doclist& lst = CDoc::DocList();
				doclist::const_iterator di;

				for (di = lst.begin(); di != lst.end(); di++)
				{
					BWindow *w = dynamic_cast<PDoc*>(*di);
					if (w)
						w->PostMessage(msg_Save);
				}
				break;
			}

			case msg_CloseAll:
			{
				const doclist& lst = CDoc::DocList();
				doclist::const_reverse_iterator di;

				for (di = lst.rbegin(); di != lst.rend(); di++)
				{
					PDoc *doc = dynamic_cast<PDoc*>(*di);

					if (doc && ! doc->IsWorksheet() && doc->Lock())
					{
						if (doc->QuitRequested())
							doc->Quit();
						else
						{
							doc->Unlock();
							break;
						}
					}
				}
				break;
			}

			case B_NODE_MONITOR:
			{
				CDoc::HandleFolderNodeMonitorMsg(msg);
				break;
			}

			case msg_OpenSelected:
				DialogCreator<COpenSelection>::CreateDialog(NULL);
				break;

			case msg_OpenInclude:
			{
				const char *i;
				FailOSErr(msg->FindString("include", &i));
				const char *src = NULL;
				msg->FindString("from-source", &src);
				FindAndOpen(i, src);
				break;
			}

			case msg_FindCmd:
			{
				int c = 1 << current_workspace();

				if (gPrefs->GetPrefInt(prf_I_SmartWorkspaces, 1))
					FindDialog()->SetWorkspaces(c);

				FindDialog()->SetCaller(PDoc::TopWindow());
				FindDialog()->Show();

				FindDialog()->Activate(true);
				break;
			}

			case B_REFS_RECEIVED:
			case 'OpFi':
				RefsReceived(msg);
				break;

			case msg_About:
			{
				AboutWindow *abwin = new AboutWindow();
				abwin->Show();
				break;
			}
			
			case msg_IdeBringToFront:
				PDoc::IDEBringToFront();
				break;

			case msg_IdeProjectToGroup:
				PDoc::IDEProject2Group();
				break;

			case msg_FindDifferences:
			{
				BRect r(100,100,500,250);
				new CDiffWindow(r, "Differences");
				break;
			}

			case msg_Open:
			{
				if (fOpenPanel->IsShowing())
				{
					fOpenPanel->Window()->SetWorkspaces(1 << current_workspace());
					fOpenPanel->Window()->Activate();
				}
				else
				{
					BEntry entry;
					gCWD.GetEntry(&entry);

					BAutolock lock(fOpenPanel->Window());

					entry_ref ref;
					entry.GetRef(&ref);
					fOpenPanel->SetPanelDirectory(&ref);
					fOpenPanel->Window()->SetWorkspaces(1 << current_workspace());

					if (gPrefs->GetPrefInt(prf_I_ZoomOpenPanel, 0))
					{
						BRect r = BScreen().Frame();

						fOpenPanel->Window()->MoveTo(r.left + 80, r.top + 40);
						fOpenPanel->Window()->ResizeTo(480, r.Height() - 50);
					}

					fOpenPanel->Show();
				}
				break;
			}

			case msg_CommandLineOpen:
			{
				entry_ref doc;
				FailOSErr (msg->FindRef("refs", &doc));

				CDocWindow *w;
				BEntry e;

				if (e.SetTo(&doc) == B_OK && e.Exists())
					w = dynamic_cast<CDocWindow*>(OpenWindow(doc));
				else
				{
					w = NewWindow(NULL);
					w->SetEntryRef(&doc);
				}

				long lineNr;
				if (w && msg->FindInt32("line", &lineNr) == B_OK)
				{
					BMessage m(msg_SelectLines);
					FailOSErr(m.AddInt32("from", lineNr));
					FailOSErr(m.AddInt32("to", lineNr - 1));
					w->PostMessage(&m, w->PreferredHandler());
				}

				if (w)
				{
					BMessage reply;
					reply.AddInt32("thread", w->Thread());
					msg->SendReply(&reply);
				}
				break;
			}

			case B_SILENT_RELAUNCH:
			case msg_New:
				if (be_roster->IsRunning("application/x-vnd.dw-Paladin"))
				{
					BMessage newMsg(PALADIN_SHOW_ADD_NEW_PANEL);
					BMessenger msgr("application/x-vnd.dw-Paladin");
					msgr.SendMessage(&newMsg);
				}
				else
					NewWindow();
				break;

			case msg_Select:
			{
				PDoc *doc;
				if ((doc = PDoc::TopWindow()) != NULL)
				{
					BMessage copy(*msg);
					doc->PostMessage(&copy);
				}
				break;
			}

			case msg_DocClosed:
				if (CDoc::CountDocs() == 0)
					Quit();
				break;

			case msg_Tile:
				PDoc::Tile();
				break;

			case msg_Stack:
				PDoc::Stack();
				break;

			case msg_Zoom:
				if (PDoc::TopWindow())
					PDoc::TopWindow()->Zoom();
				break;

			case msg_Worksheet:
				OpenWorksheet();
				break;

			case msg_NewGroup:
				new PGroupWindow;
				break;

			case 1:
				puts(rcsid);
				break;

			case msg_Quit:
				PostMessage(B_QUIT_REQUESTED);
				break;

			case msg_Preferences:
			{
				long l;
				if (fPrefOpener) wait_for_thread(fPrefOpener, &l);
				fPrefOpener = (thread_id)NULL;
				if (fPrefsDialog) {
					BAutolock lock(fPrefsDialog);
					if (!lock.IsLocked()) {
						THROW(("Preferences panel failed to lock"));
						break;
					}

					int c = 1 << current_workspace();

					if (gPrefs->GetPrefInt(prf_I_SmartWorkspaces, 1))
						fPrefsDialog->SetWorkspaces(c);

					if (fPrefsDialog->IsHidden()) {
						fPrefsDialog->Show();
					}

					fPrefsDialog->Activate(true);
				}
				else
					THROW(("Preferences panel failed to open"));
				break;
			}

			default:
				BApplication::MessageReceived(msg);
		}
	}
	catch (HErr& e)
	{
		e.DoError();
	}
} /* PApp::MessageReceived */
Exemplo n.º 17
0
void MainWindow::aboutButtonClicked() {
    AboutWindow *aboutWindow = new AboutWindow(this);
    aboutWindow->setStyleSheet("QDialog{background-color:#1d2020}");
    aboutWindow->setModal(true);
    aboutWindow->exec();
}
Exemplo n.º 18
0
void MainWindow::aboutWin()
{
  AboutWindow *aboutWindow;
  aboutWindow = new AboutWindow(this);
  aboutWindow->show();
}