Ejemplo n.º 1
0
BasicSettings::BasicSettings(LXQt::Settings *settings, QWidget *parent) :
    QWidget(parent),
    m_settings(settings),
    m_moduleModel(new ModuleModel()),
    ui(new Ui::BasicSettings)
{
    ui->setupUi(this);
    connect(ui->findWmButton, SIGNAL(clicked()), this, SLOT(findWmButton_clicked()));
    connect(ui->startButton, SIGNAL(clicked()), this, SLOT(startButton_clicked()));
    connect(ui->stopButton, SIGNAL(clicked()), this, SLOT(stopButton_clicked()));
    restoreSettings();

    ui->moduleView->setModel(m_moduleModel);
    ui->moduleView->header()->setSectionResizeMode(0, QHeaderView::Stretch);
    ui->moduleView->header()->setSectionResizeMode(1, QHeaderView::ResizeToContents);
}
Ejemplo n.º 2
0
BrowserWindow::BrowserWindow(const QString& userName, const QUrl& url, QWidget* parent) :
    QMainWindow(parent),
    ui(new Ui::BrowserWindow)
{
    ui->setupUi(this);

    webView = new WebView(this->ui->centralwidget);
	webView->setObjectName(QStringLiteral("webView"));
	webView->setUrl(QUrl(QStringLiteral("about:blank")));
    this->ui->verticalLayout->addWidget(webView);

	this->statusLabel = new QLabel(tr("<b>Not Connected</b>")) ;
    this->statusBar()->addWidget(this->statusLabel);

    this->currentHistoryItem = -1;
    historySetEnabled();

	connect(this->ui->prevButton, SIGNAL(clicked()),
			this, SLOT(prevButton_clicked()));
	connect(this->ui->nextButton, SIGNAL(clicked()),
			this, SLOT(nextButton_clicked()));
	connect(this->ui->reloadButton, SIGNAL(clicked()),
			this, SLOT(reloadButton_clicked()));
	connect(this->ui->stopButton, SIGNAL(clicked()),
			this, SLOT(stopButton_clicked()));
	connect(this->ui->goButton, SIGNAL(clicked()),
			this, SLOT(goButton_clicked()));

	connect(webView, SIGNAL(loadStarted()),
			this, SLOT(webView_loadStarted()));
	connect(webView, SIGNAL(loadProgress(int)),
			this, SLOT(webView_loadProgress(int)));
	connect(webView, SIGNAL(loadFinished(bool)),
			this, SLOT(webView_loadFinished(bool)));
	connect(webView, SIGNAL(titleChanged(QString)),
			this, SLOT(webView_titleChanged(QString)));
	connect(webView, SIGNAL(linkClicked(QUrl)),
			this, SLOT(webView_linkClicked(QUrl)));

    this->userName = userName;

    setUrl(url);
}