Пример #1
0
AboutData::AboutData()
        : KAboutData("basket", "", ki18n("BasKet Note Pads"),
                     VERSION, ki18n(description), KAboutData::License_GPL_V2,
                     ki18n("(c) 2003-2007, S\303\251bastien Lao\303\273t, (c) 2013-2016, Gleb Baryshev"),
                     KLocalizedString(),
                     "http://basket.kde.org/",
                     "https://bugs.launchpad.net/basket")
{
    //Pass basket.kde.org to constructor to be used as D-Bus domain name, but set the displayed address below
    setHomepage("https://launchpad.net/basket");

    addAuthor(ki18n("OmegaPhil"),
              ki18n("Paste as plaintext option"),
              "*****@*****.**");

    addAuthor(ki18n("Kelvie Wong"),
              ki18n("Maintainer"),
              "*****@*****.**");

    addAuthor(ki18n("S\303\251bastien Lao\303\273t"),
              ki18n("Original Author"),
              "*****@*****.**");

    addAuthor(ki18n("Petri Damst\303\251n"),
              ki18n("Basket encryption, Kontact integration, KnowIt importer"),
              "*****@*****.**");

    addAuthor(ki18n("Alex Gontmakher"),
              ki18n("Baskets auto lock, save-status icon, HTML copy/paste, basket name tooltip, drop to basket name"),
              "*****@*****.**");

    addAuthor(ki18n("Marco Martin"),
              ki18n("Original icon"),
              "*****@*****.**");
}
Пример #2
0
AboutData::AboutData()
        : KAboutData(AboutData::componentName(), AboutData::displayName(),
                     VERSION, i18n(description), KAboutLicense::GPL_V2,
                     i18n("Copyright © 2003–2007, Sébastien Laoût; Copyright © 2013–2019, Gleb Baryshev"),
                     QString(),
                     "http://basket.kde.org/")
{
    //Pass basket.kde.org to constructor to be used as D-Bus domain name, but set the displayed address below
    setHomepage("https://launchpad.net/basket");
    setBugAddress("https://bugs.launchpad.net/basket");

    addAuthor(i18n("OmegaPhil"),
              i18n("Paste as plaintext option"),
              "*****@*****.**");

    addAuthor(i18n("Kelvie Wong"),
              i18n("Maintainer"),
              "*****@*****.**");

    addAuthor(i18n("Sébastien Laoût"),
              i18n("Original Author"),
              "*****@*****.**");

    addAuthor(i18n("Petri Damstén"),
              i18n("Basket encryption, Kontact integration, KnowIt importer"),
              "*****@*****.**");

    addAuthor(i18n("Alex Gontmakher"),
              i18n("Baskets auto lock, save-status icon, HTML copy/paste, basket name tooltip, drop to basket name"),
              "*****@*****.**");

    addAuthor(i18n("Marco Martin"),
              i18n("Original icon"),
              "*****@*****.**");
}
Пример #3
0
//choix du site pour l'EPG
void MainWindow::changeWebsite(int indexToNavigateTo)
{
    if(indexToNavigateTo == 0)
    {
        setHomepage(getTvexpressComUrl());
    }
    else if(indexToNavigateTo == 1)
    {
        setHomepage(getProgrammetvNetUrl());
    }
    else if(indexToNavigateTo == 2)
    {
        setHomepage(getCesoirtvComUrl());
    }
    else if(indexToNavigateTo == 3)
    {
        setHomepage(getTvmagComUrl());
    }
    else if(indexToNavigateTo == 4)
    {
        setHomepage(getProgrammeTvUrl());
    }
    webbrowser->load(getHomepage());
}
Пример #4
0
/**
 * Setup the mount points for default ressources common to all htopml
 * web UI infrastructure.
**/
void HtopmlHttpServer::setupCommonRessources(void )
{
	//basic ressources required for highcharts
	DirectoryHttpNode * ressourcesNode = new DirectoryHttpNode("/ressources/",HTOPML_EXTDEPS_PATH);
	ressourcesNode->registerFile("jquery/jquery.min.js");
	ressourcesNode->registerFile("d3js/d3.min.js");
	ressourcesNode->registerFile("highcharts/js/highcharts.js");
	ressourcesNode->registerFile("highcharts/js/highcharts-more.js");
	ressourcesNode->registerFile("highcharts/js/modules/exporting.js");
	ressourcesNode->registerFile("highcharts/js/themes/gray.js");
	this->registerHttpNode(ressourcesNode);

	//theme node
	DirectoryHttpNode * themeNode = new DirectoryHttpNode("/theme/",HTOPML_WWW_PATH "/theme/");
	themeNode->registerFile("body.jpg");
	themeNode->registerFile("header.jpg");
	themeNode->registerFile("menu_hover.png");
	themeNode->registerFile("htopml.css",false);
	themeNode->registerFile("layout.htm",false);
	themeNode->registerFile("htopml.js",false);
	this->registerHttpNode(themeNode);

	//common js
	this->quickRegisterFile("/common.js",HTOPML_WWW_PATH "/common.js");

	//icon nodes
	DirectoryHttpNode * iconsNode = new DirectoryHttpNode("/theme/icons/",HTOPML_WWW_PATH "/theme/icons/");
	iconsNode->registerFile("home.png");
	iconsNode->registerFile("unknown.png");
	themeNode->registerChildNode(iconsNode);

	//set home pages
	addTemplatePage("/index.htm",HTOPML_WWW_PATH "/index.htm",false);
	menu.addEntry("Home","/index.htm","/theme/icons/home.png");
	setHomepage("/index.htm");
	
	//double map node
	this->registerHttpNode(doubleMapNode);
}
Пример #5
0
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    //objet pour la gestion des réglages
    settingsTable = new QSettings("outadoc", "FreeStance");

    options = new Options(this);
    about = new About(this);
    help = new Help(this);
    settings = new AppSettings;

    //on vérifie les mises à jour
    checkForUpdates();

    bool hasBeenSet = settingsTable->value("hasBeenSet", false).toBool();
    //si le programme n'a jamais été utilisé...
    if(hasBeenSet != true)
    {
        settingsTable->setValue("hasBeenSet", false);
        options->show();
    }

    //on centre la fenêtre
    QDesktopWidget *widget = QApplication::desktop();
    int desktop_width = widget->width();
    int desktop_height = widget->height();
    int x = desktop_width / 2 - width() / 2;
    int y = desktop_height / 2 - height() / 2 - 25;
    move(QPoint(x, y));

    //on récupère le dernier profil utilisé pour l'utiliser par défaut dans le programme
    if(settings->getProfileToUse() == 1)
    {
        ui->actionProfil_1->setChecked(true);
        ui->actionProfil_2->setChecked(false);
        ui->actionProfil_3->setChecked(false);
    }

    else if (settings->getProfileToUse() == 2)
    {
        ui->actionProfil_1->setChecked(false);
        ui->actionProfil_2->setChecked(true);
        ui->actionProfil_3->setChecked(false);
    }

    else if(settings->getProfileToUse() == 3)
    {
        ui->actionProfil_1->setChecked(false);
        ui->actionProfil_2->setChecked(false);
        ui->actionProfil_3->setChecked(true);
    }

    //url pour les programmes tv
    setProgrammetvNetUrl(QUrl(tr("http://www.programme-tv.net/programme/free-13/")));
    setProgrammeTvUrl(QUrl(tr("http://dev.outadoc.fr/freestance/tvprog.html")));
    setCesoirtvComUrl(QUrl(tr("http://cesoirtv.com/")));
    setTvmagComUrl(QUrl(tr("http://www.tvmag.com/programme-tv/guide-tele.html?boId=2")));
    setTvexpressComUrl(QUrl(tr("http://tv-express.com/")));
    setHomepage(getTvexpressComUrl());

    //chargement du guide epg
    webbrowser = new QWebView;
    vbox = new QVBoxLayout;
    vbox->addWidget(webbrowser);
    ui->web_frame->setLayout(vbox);
    ui->prgrbar_browser->setVisible(false);
    webbrowser->load(getHomepage());

    //connections pour l'epg
    connect(ui->b_refresh, SIGNAL(clicked()), webbrowser, SLOT(reload()));
    connect(ui->b_prev, SIGNAL(clicked()), webbrowser, SLOT(back()));
    connect(ui->b_fw, SIGNAL(clicked()), webbrowser, SLOT(forward()));
    connect(ui->cbox_site, SIGNAL(currentIndexChanged(int)), this, SLOT(changeWebsite(int)));
    connect(webbrowser, SIGNAL(loadStarted()), this, SLOT(beginLoading()));
    connect(webbrowser, SIGNAL(loadProgress(int)), this, SLOT(loading(int)));
    connect(webbrowser, SIGNAL(loadFinished(bool)), this, SLOT(stopLoading(bool)));
    connect(ui->actionPr_f_rences, SIGNAL(triggered()), options, SLOT(show()));
    connect(ui->actionV_rifier_les_mises_jour, SIGNAL(triggered()), SLOT(checkForUpdates()));

    //on affiche la version dans le bas
    ui->lbl_actual_version->setText(VERSION);

    //le stay on top ne marche pas pour le moment, donc
    ui->actionToujours_au_dessus->setVisible(false);
}
Пример #6
0
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    browser_ = new WebBrowser;
    browser_->loadSettings();
    browser_->GoHome();
    //setCentralWidget(browser_);
    // PESTAÑAS
    QTabWidget *tabWidgetMainWindow = new QTabWidget(this);
    tabWidgetMainWindow->setMinimumSize(800,600);
    tabWidgetMainWindow->addTab(browser_, "Pestaña 1");
    tabWidgetMainWindow->addTab(new WebBrowser, "Pestaña 2");
    tabWidgetMainWindow->setCurrentIndex(1);
    tabWidgetMainWindow->show();
    setCentralWidget(tabWidgetMainWindow);

    zoomVar = 1;    // inicialización del zoom

    // inicializamos los menus
    mainMenu_ = new QMenuBar(this);
    setMenuBar(mainMenu_);

    mnuArchivo_ = new QMenu(tr("&Archivo"), this);
    //mainMenu_ -> addMenu(mnuArchivo_);

    mnuEditar_ = new QMenu(tr("&Editar"), this);
    //mainMenu_ -> addMenu(mnuEditar_);

    mnuVer_ = new QMenu(tr("&Ver"), this);
    mainMenu_ -> addMenu(mnuVer_);
    actPlusZoom = new QAction(tr("&Aumentar zoom"), this);
    actPlusZoom -> setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Plus));
    mnuVer_->addAction(actPlusZoom);
    connect(actPlusZoom, SIGNAL(triggered()), this, SLOT(setPlusZoom()));

    actMinusZoom_ = new QAction(tr("&Disminuir zoom"), this);
    actMinusZoom_ -> setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Minus));
    mnuVer_->addAction(actMinusZoom_);
    connect(actMinusZoom_, SIGNAL(triggered()), this, SLOT(setMinusZoom()));


    mnuMarcadores_ = new QMenu(tr("&Marcadores"), this);
    mainMenu_ -> addMenu(mnuMarcadores_);
    actAddBookmark_ = new QAction(tr("&Añadir a marcadores"), this);
    actAddBookmark_ -> setShortcut(QKeySequence(Qt::CTRL + Qt::ALT + Qt::Key_O));
    mnuMarcadores_->addAction(actAddBookmark_);
    connect(actAddBookmark_, SIGNAL(triggered()), this, SLOT(addMarcador()));

    mnuHerramientas_ = new QMenu(tr("&Herramientas"), this);
    mainMenu_ -> addMenu(mnuHerramientas_);
    actSetHomepage_ = new QAction(tr("Establecer como pagina principal"), this);
    mnuHerramientas_->addAction(actSetHomepage_);
    connect(actSetHomepage_, SIGNAL(triggered()), browser_, SLOT(setHomepage()));

    mnuHistorial_ = new QMenu(tr("&Historial"), this);
    mainMenu_ -> addMenu(mnuHistorial_);
    actDeleteHistory_ = new QAction(tr("&Borrar el historial"), this);
    actDeleteHistory_->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_D));
    mnuHistorial_->addAction(actDeleteHistory_);
    connect(actDeleteHistory_,  SIGNAL(triggered()), this, SLOT(deleteHistory()));

    showHistory();

    readBookmarkFile();
    for (int i = 0; i < bookmarkList.size(); ++i) {
        QAction* tmp = new QAction(tr(bookmarkList.at(i).toLocal8Bit().constData()), this);
        mnuMarcadores_->addAction(tmp);
        connect(tmp,SIGNAL(triggered()),this,SLOT(PulsarMarcador()));
    }
}