Esempio n. 1
0
    //les actions
void MNotePad::creerAction()
{
    a_nouveauTab = new QAction(QIcon("images/nouveau.png"),tr("nouveau"),this);
    a_nouveauTab->setShortcut(tr("Ctrl+N"));
    connect(a_nouveauTab,SIGNAL(triggered()),this,SLOT(nouveauTab()));
    a_ouvrirTab = new QAction(QIcon("images/ouvrir.png"),tr("ouvrir"),this);
    a_ouvrirTab->setShortcut(tr("Ctrl+O"));
    connect(a_ouvrirTab,SIGNAL(triggered()),this,SLOT(ouvrirTab()));
    a_saveTab = new QAction(QIcon("images/save.png"),tr("save"),this);
    a_saveTab->setShortcut(tr("Ctrl+S"));
    connect(a_saveTab,SIGNAL(triggered()),this,SLOT(saveTab()));
    a_fermerTab = new QAction(tr("fermer"),this);
    a_fermerTab->setShortcut(tr("Ctrl+W"));
    connect(a_fermerTab,SIGNAL(triggered()),this,SLOT(fermerTab()));
    a_quitter = new QAction(QIcon("images/quitter.png"),tr("quitter"),this);
    a_quitter->setShortcut(tr("Ctrl+Q"));
    connect(a_quitter,SIGNAL(triggered()),qApp,SLOT(quit()));

    a_precedent = new QAction(QIcon("images/precedent.png"),tr("precedent"),this);
    a_precedent->setShortcut(tr("Ctrl+Z"));
    connect(a_precedent,SIGNAL(triggered()),this,SLOT(precedent()));
    a_suivant = new QAction(QIcon("images/suivant.png"),tr("suivant"),this);
    a_suivant->setShortcut(tr("Ctrl+F"));
    connect(a_suivant,SIGNAL(triggered()),this,SLOT(suivant()));
    a_font = new QAction(QIcon("images/font.png"),tr("font"),this);
    connect(a_font,SIGNAL(triggered()),this,SLOT(font()));

    a_apropos = new QAction(QIcon("images/apropos.png"),tr("A propos"),this);
    connect(a_apropos,SIGNAL(triggered()),this,SLOT(apropos()));
    a_aproposQt = new QAction(QIcon("images/aproposQt.png"),tr("A propos de Qt"),this);
    connect(a_aproposQt,SIGNAL(triggered()),qApp,SLOT(aboutQt()));
    }
Esempio n. 2
0
AboutDialog::AboutDialog(QWidget *parent)
    :QDialog( parent)
{
ui.setupUi(this);
QPixmap pixmap;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
if (qApp->devicePixelRatio()==2)
{
pixmap.load(":/images/[email protected]");
pixmap.setDevicePixelRatio(qApp->devicePixelRatio());
}
else pixmap.load(":/images/splash.png");
#else
pixmap.load(":/images/splash.png");
#endif
ui.label->setPixmap(pixmap);
ui.textBrowser1->setOpenExternalLinks(true);
ui.textBrowser2->setOpenExternalLinks(true);
ui.textBrowser3->setOpenExternalLinks(true);
ui.textBrowser4->setOpenExternalLinks(true);
QString head=QString::fromUtf8("<b>Texmaker ")+QLatin1String(TEXMAKERVERSION)+QString::fromUtf8("</b><br>(compiled with Qt ")+QLatin1String(QT_VERSION_STR);
#if !defined(OLDPOPPLER)
head+=QString::fromUtf8(" and Poppler ")+QLatin1String(POPPLER_VERSION);
#endif
ui.textBrowser1->setHtml(head+QString::fromUtf8(")<br><b>Copyright (c) 2003-2014 by Pascal Brachet</b><br><br>Project home site : <a href=\"http://www.xm1math.net/texmaker/\">http://www.xm1math.net/texmaker/</a><br><br><a href=\"https://github.com/gustawho/texmaker-breeze\">GitHub page for this modified version</a>"));
ui.textBrowser2->setHtml(QString::fromUtf8("<b>Copyright (c) 2003-2014 by Pascal Brachet</b><br><br>Texmaker contains code from these programs:<br>Hunspell (GPL)<br>qpdfview ((C) Adam Reichold GPL)<br>QtCreator (Copyright (C) Digia - License: GPL)<br>SyncTeX ( (C) Jerome Laurens - License: GPL)<br>Texworks ((C) Jonathan Kew - License: GPL)<br>AtD ((C) www.afterthedeadline.com - License : LGPL)<br>Tiled (Copyright  Vsevolod Klementjev - License: GPL)<br>jsdifflib ((C) Chas Emerick - license : BSD)<br>Breeze icon theme ((C) KDE Visual Design Group - License: LGPLv3)<br>"));
ui.textBrowser3->setHtml(QString::fromUtf8("<b>Thanks to these contributors :</b><br>Joël Amblard<br>Annette Klepp<br>Nguyen Duy Dien<br>Wouter Franssen<br>Patrick Wieschollek<br>Oriol González Llobet<br>Andriy Bandura<br> Merlin Raschtuttis<br>Sebastián Vanrell<br>Kleanthis Manolopoulos<br>Володимир Боденчук<br>Sandris LACIS<br>Koutheir ATTOUCHI<br>Andreas Pettersson<br>George Boumis<br>Pedro F. Silva<br>Nikolić Miroslav<br>Michele Mastropietro<br>Peter Axt<br>Torbjörn Klatt<br>Tomas Olarte Hernandez<br>Jan Jełowicki<br>Tamas Orosz<br>Adrián Yanes Martínez<br>Koen Wybo<br>Pavel Fric<br>Christian Cenker<br>Seyyed Razi Alavizadeh<br>Frederic Devernay<br>Luis Silvestre<br>Davide Alberelli<br>Ilya Barygin<br>Javier Jardón Cabezas<br>Felipe Bugno<br>Carles Gumí<br>Martin Dreher<br>Andreas Volk<br>Felix Löhr<br>Bernd Warken<br>Wolfgang Dautermann<br>Carlos Eduardo Valencia Urbina<br>Kleanthis Manolopoulos"));
QTextCodec *codec = QTextCodec::codecForName("UTF-8");
QString content;
QFile apropos(":/utilities/license_html.txt");
apropos.open(QIODevice::ReadOnly);
QTextStream in(&apropos);
in.setCodec(codec);
while (!in.atEnd()) 
	{
	content+= in.readLine()+"\n";
	}
apropos.close();
ui.textBrowser4->setHtml(content);
}
Esempio n. 3
0
int MSudoku::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: generer(); break;
        case 1: initialiser(); break;
        case 2: sauvegarder(); break;
        case 3: charger(); break;
        case 4: changerTheme(); break;
        case 5: apropos(); break;
        case 6: resoudre(); break;
        case 7: verification(); break;
        case 8: possibilites(); break;
        case 9: gagner(); break;
        }
        _id -= 10;
    }
    return _id;
}
Esempio n. 4
0
int
main(int argc, char *argv[])
{
	ENTRY *ep;
	TAG *tp;
	int ch, rv;
	char *conffile, **p, *p_augment, *p_path;

	__progname = argv[0];
	_wildcard(&argc, &argv);
	conffile = NULL;
	p_augment = p_path = NULL;
	while ((ch = getopt(argc, argv, "C:M:m:P:")) != -1)
		switch (ch) {
		case 'C':
			conffile = optarg;
			break;
		case 'M':
		case 'P':		/* backward compatible */
			p_path = optarg;
			break;
		case 'm':
			p_augment = optarg;
			break;
		case '?':
		default:
			usage();
		}
	argv += optind;
	argc -= optind;

	if (argc < 1)
		usage();

	if ((found = malloc((u_int)argc * sizeof(int))) == NULL)
		err(1, NULL);
	memset(found, 0, argc * sizeof(int));

	for (p = argv; *p; ++p)			/* convert to lower-case */
		lowstr(*p, *p);

	if (p_augment)
		apropos(argv, p_augment, 1);
	if (p_path || (p_path = getenv("MANPATH")))
		apropos(argv, p_path, 1);
	else {
		config(conffile);
		ep = (tp = getlist("_whatdb")) == NULL ?
		    NULL : tp->list.tqh_first;
		for (; ep != NULL; ep = ep->q.tqe_next)
			apropos(argv, ep->s, 0);
	}

	if (!foundman)
		errx(1, "no %s file found", _PATH_WHATIS);

	rv = 1;
	for (p = argv; *p; ++p)
		if (found[p - argv])
			rv = 0;
		else
			(void)printf("%s: nothing appropriate\n", *p);
	exit(rv);
}