Exemplo n.º 1
0
void
BrowserApp::AboutRequested()
{
	BAboutWindow* window = new BAboutWindow(kApplicationName,
		kApplicationSignature);
	
	// create the about window

	const char* authors[] = {
		"Andrea Anzani",
		"Stephan Aßmus",
		"Alexandre Deckner",
		"Rene Gollent",
		"Ryan Leavengood",
		"Michael Lotz",
		"Maxime Simon",
		NULL
	};

	BString aboutText("");
	aboutText << "HaikuWebKit " << WebKitInfo::HaikuWebKitVersion();
	aboutText << " (" << WebKitInfo::HaikuWebKitRevision() << ")";
	aboutText << "\nWebKit " << WebKitInfo::WebKitVersion();
	aboutText << " (" << WebKitInfo::WebKitRevision() << ")";

	window->AddCopyright(2007, "Haiku, Inc.");
	window->AddAuthors(authors);
	window->AddExtraInfo(aboutText.String());

	window->Show();
}
Exemplo n.º 2
0
int main(int argc, char **argv)
{
  QString aboutText("KDE und Qt Programmierung\n(c) Addison-Wesley");
  KCmdLineArgs::init(argc, argv, "khelloworld", aboutText, "1.0");
  KApplication app;

  MyMainWindow *top = new MyMainWindow();
  top->show();

  return app.exec();
}
Exemplo n.º 3
0
Ui::Dialog_About::Dialog_About(QWidget *parent): QDialog(parent) {
	setObjectName("Dialog_About");
	setWindowTitle("About");
	resize(380, 312);
	setMaximumSize(380, 312);
	setMinimumSize(380, 312);
	QIcon aboutIcon(":/img/bp-nfoview.png");
	setWindowIcon(aboutIcon);

	ilabel = new QLabel(this);
	ilabel->setGeometry(5,5,370,64);
	ilabel->setPixmap(QPixmap(":/img/bp-nfoview.png").scaled(64,64,Qt::KeepAspectRatio));
	ilabel->setAlignment(Qt::AlignCenter);

	buttonBox = new QDialogButtonBox(this);
	buttonBox->setGeometry(QRect(5, 280, 370, 32));
	buttonBox->setOrientation(Qt::Horizontal);
	buttonBox->setStandardButtons(QDialogButtonBox::Close);
	buttonBox->setCenterButtons(true);
	buttonBox->setObjectName("buttonBox");

	label = new QLabel(this);
	label->setGeometry(QRect(5, 64, 370, 220));
	label->setAlignment(Qt::AlignCenter);
	label->setWordWrap(true);
	label->setOpenExternalLinks(true);
	label->setObjectName("label");

	QString aboutText("<span style=\"font-size:16pt;\"><b>bp-nfoview ");
	aboutText += MAIN_VERSION;
	aboutText += "</b></span><br>A simple lightweight nfo-viewer written in C++ using Qt4 for its interface<br>";

	aboutText += "<br>\nits also using:\n";
	aboutText += "<br>Codepage437Codec ";
	aboutText += QCODEPAGE437CODEC_VERSION;

	aboutText += "<br>AboutDialog ";
	aboutText += DIALOG_ABOUT_VERSION;

	aboutText += "<br><br>Copyright (c) 2010-2013 &lt;[email protected]&gt; <br>licensed under GPL-3<br> See <a href=\"http://www.gnu.org/licenses/gpl.html\">http://www.gnu.org/licenses/</a> for more info";
	label->setText(aboutText);

	connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
	connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
	QMetaObject::connectSlotsByName(this);
}
Exemplo n.º 4
0
int main(int argc, char **argv)
{
    QString aboutText("KDE- und Qt-Programmierung\n(c) 2000 Addison-Wesley Germany");
    KCmdLineArgs::init(argc, argv, "kexample", aboutText, "1.0");
    KApplication app;
    KMainWindow *top = new KMainWindow(0);
    QPopupMenu *filePopup = new QPopupMenu(top);
    KAction *quitAction;
    quitAction = KStdAction::quit(&app, SLOT(quit()));
    quitAction->plug(filePopup);
    top->menuBar()->insertItem(i18n("&File"), filePopup);
    top->menuBar()->insertSeparator();
    top->menuBar()->insertItem(i18n("&Help"), top->helpMenu());
    QLabel *text = new QLabel(i18n("<h1>Hello, world!</h1>"), top);
    top->setCentralWidget(text);
    top->show();

    return app.exec();
}
Exemplo n.º 5
0
RazorAboutDLGPrivate::RazorAboutDLGPrivate()
{
    libTranslate("librazorqt");
    setupUi(this);

    QString css="<style TYPE='text/css'> "
                    "body { font-family: sans-serif;} "
                    ".name { font-size: 16pt; } "
                    "a { white-space: nowrap ;} "
                    "h2 { font-size: 10pt;} "
                    "li { line-height: 120%;} "
                    ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } "
                "</style>"
            ;

    iconLabel->setFixedSize(48, 48);
    iconLabel->setScaledContents(true);
    iconLabel->setPixmap(QPixmap(QString(SHARE_DIR) + "/graphics/razor_logo.png"));

    nameLabel->setText(css + titleText());

    aboutBrowser->setHtml(css + aboutText());
    aboutBrowser->viewport()->setAutoFillBackground(false);

    autorsBrowser->setHtml(css + authorsText());
    autorsBrowser->viewport()->setAutoFillBackground(false);

    thanksBrowser->setHtml(css + thanksText());
    thanksBrowser->viewport()->setAutoFillBackground(false);

    translationsBrowser->setHtml(css + translationsText());
    translationsBrowser->viewport()->setAutoFillBackground(false);

    TechnicalInfo info;
    techBrowser->setHtml(info.html());
    techBrowser->viewport()->setAutoFillBackground(false);

    connect(techCopyToClipboardButton, SIGNAL(clicked()), this, SLOT(copyToCliboardTechInfo()));
    this->setAttribute(Qt::WA_DeleteOnClose);
    show();

}
Exemplo n.º 6
0
void
FileTypes::AboutRequested()
{
	BString aboutText(B_TRANSLATE("FileTypes"));
	int32 titleLength = aboutText.Length();
	aboutText << "\n";
	aboutText << B_TRANSLATE("\twritten by Axel Dörfler\n"
		"\tCopyright 2006-2007, Haiku.\n");
	BAlert *alert = new BAlert("about", aboutText.String(), B_TRANSLATE("OK"));
	BTextView *view = alert->TextView();
	BFont font;

	view->SetStylable(true);

	view->GetFont(&font);
	font.SetSize(18);
	font.SetFace(B_BOLD_FACE);
	view->SetFontAndColor(0, titleLength, &font);

	alert->Go();
}
Exemplo n.º 7
0
//AboutDialogPrivate::AboutDialogPrivate()
AboutDialog::AboutDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AboutDialog)
{
//    this->setAttribute(Qt::WA_DeleteOnClose);
    ui->setupUi(this);

    QString css="<style TYPE='text/css'> "
                    "body { font-family: sans-serif;} "
                    ".name { font-size: 16pt; } "
                    "a { white-space: nowrap ;} "
                    "h2 { font-size: 10pt;} "
                    "li { line-height: 120%;} "
                    ".techInfoKey { white-space: nowrap ; margin: 0 20px 0 16px; } "
                "</style>"
            ;

    ui->iconLabel->setFixedSize(48, 48);
    ui->iconLabel->setScaledContents(true);
    //iconLabel->setPixmap(QPixmap(QString(SHARE_DIR) + "/graphics/razor_logo.png"));

    ui->nameLabel->setText(css + titleText());

    ui->aboutBrowser->setHtml(css + aboutText());
    ui->aboutBrowser->viewport()->setAutoFillBackground(false);

    ui->autorsBrowser->setHtml(css + authorsText());
    ui->autorsBrowser->viewport()->setAutoFillBackground(false);

    ui->thanksBrowser->setHtml(css + thanksText());
    ui->thanksBrowser->viewport()->setAutoFillBackground(false);
    ui->thanksTab->setVisible(false);

    ui->translationsBrowser->setHtml(css + translationsText());
    ui->translationsBrowser->viewport()->setAutoFillBackground(false);


    //    show();
}
Exemplo n.º 8
0
void About::showAboutDialog()
{
    m_dialog = new QDialog ( QApplication::focusWidget() );
    m_dialog->setWindowTitle ( QObject::tr( "About..." ) );
    QVBoxLayout * layout = new QVBoxLayout ( m_dialog );

    QHBoxLayout * titleLayout = new QHBoxLayout ( );
    QLabel * programName = new QLabel ( QString ( "<b>" ) + QObject::tr(ApplicationName) + QString ( " " ) +QString( ZMVIEWER_VERSION_STRING ) + QString ( "</b>" ), m_dialog );
    titleLayout->addWidget ( programName );
    QLabel * programIcon = new QLabel ( m_dialog );
    programIcon->setPixmap ( qApp->windowIcon().pixmap ( 32,32 ) );
    titleLayout->addWidget ( programIcon );
    layout->addLayout ( titleLayout );

    QTabWidget * tab = new QTabWidget ( m_dialog );
    QLabel * label = new QLabel ( aboutText (), m_dialog );
    tab->addTab ( label , QObject::tr( "About" ) );

    QTextBrowser * authors = new QTextBrowser ( m_dialog );
    authors->setHtml ( authorsText () );
    authors->setReadOnly ( true );
    authors->setOpenExternalLinks ( m_dialog );

    tab->addTab ( authors , QObject::tr( "Authors and Thanks" ) );

    layout->addWidget ( tab );
    QPushButton * button = new QPushButton ( QObject::tr( "Ok" ) , m_dialog );
    QHBoxLayout * buttonLayout = new QHBoxLayout ( );
    buttonLayout->addItem ( new QSpacerItem ( 20,30, QSizePolicy::Expanding ) );
    buttonLayout->addWidget ( button );
    layout->addLayout ( buttonLayout );

    QObject::connect ( button, SIGNAL ( clicked() ),m_dialog,SLOT ( accept() ) );
    m_dialog->exec();
    m_dialog->deleteLater();
}