mirror of
https://github.com/YACReader/yacreader
synced 2025-07-21 06:24:39 -04:00
A?adido margen izquierdo al splitter principal para que coincida con el handler (falta comprobar como se ven en macosx)
A?adido bot?n para configurar el puerto del servidor
This commit is contained in:
@ -3,6 +3,7 @@ Mejorada la gesti
|
||||
A<EFBFBD>adido bot<6F>n que permite ocultar las portadas en la pantalla de importaci<63>n
|
||||
A<EFBFBD>adidos t<>tulos "Bibliotecas" y "Carpetas" a la barra de navegaci<63>n
|
||||
Nuevos iconos para seleccionar la carpeta ra<72>z, expandir y contraer todos.
|
||||
Bot<EFBFBD>n para cambiar el puerto del servidor por el usuario.
|
||||
|
||||
6.2
|
||||
Nueva ventana de "bienvenida"
|
||||
|
@ -193,7 +193,7 @@ void LibraryWindow::doLayout()
|
||||
left = new QWidget;
|
||||
QVBoxLayout * l = new QVBoxLayout;
|
||||
selectedLibrary = new QComboBox;
|
||||
l->setContentsMargins(2,0,0,0);
|
||||
l->setContentsMargins(sHorizontal->handleWidth(),0,0,0);
|
||||
|
||||
YACReaderTitledToolBar * librariesTitle = new YACReaderTitledToolBar(tr("Libraries"));
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <QHostAddress>
|
||||
#include <QSettings>
|
||||
#include <QPalette>
|
||||
#include <QIntValidator>
|
||||
|
||||
#include "startup.h"
|
||||
#include "yacreader_global.h"
|
||||
@ -56,8 +57,7 @@ extern Startup * s;
|
||||
ServerConfigDialog::ServerConfigDialog(QWidget * parent)
|
||||
:QDialog(parent)
|
||||
{
|
||||
accept = new QPushButton(tr("Update IPs"));
|
||||
connect(accept,SIGNAL(clicked()),this,SLOT(generateQR()));
|
||||
accept = new QPushButton(tr("set port"),this);
|
||||
qrCodeImage = new QPixmap();
|
||||
qrCode = new QLabel(this);
|
||||
qrCode->move(196,73);
|
||||
@ -101,9 +101,14 @@ ServerConfigDialog::ServerConfigDialog(QWidget * parent)
|
||||
ip->setMinimumWidth(110);
|
||||
|
||||
port = new QLineEdit("8080",this);
|
||||
port->setReadOnly(true);
|
||||
port->setReadOnly(false);
|
||||
port->setMaximumWidth(50);
|
||||
port->move(571,110);
|
||||
port->move(520,110);
|
||||
QValidator *validator = new QIntValidator(1024, 65535, this);
|
||||
port->setValidator(validator);
|
||||
|
||||
accept->move(520,149);
|
||||
connect(accept,SIGNAL(pressed()),this,SLOT(updatePort()));
|
||||
|
||||
check = new QCheckBox(this);
|
||||
check->move(453,314);
|
||||
@ -251,6 +256,7 @@ void ServerConfigDialog::generateQR()
|
||||
|
||||
void ServerConfigDialog::generateQR(const QString & serverAddress)
|
||||
{
|
||||
qrCode->clear();
|
||||
qrGenerator = new QProcess();
|
||||
QStringList attributes;
|
||||
attributes << "-o" << "-" /*QCoreApplication::applicationDirPath()+"/utils/tmp.png"*/ << "-s" << "8" << "-l" << "H" << "-m" << "0" << serverAddress;
|
||||
@ -283,3 +289,18 @@ void ServerConfigDialog::regenerateQR(const QString & ip)
|
||||
{
|
||||
generateQR(ip+":"+s->getPort());
|
||||
}
|
||||
|
||||
void ServerConfigDialog::updatePort()
|
||||
{
|
||||
|
||||
QSettings * settings = new QSettings(QCoreApplication::applicationDirPath()+"/YACReaderLibrary.ini",QSettings::IniFormat); //TODO unificar la creaci<63>n del fichero de config con el servidor
|
||||
settings->beginGroup("listener");
|
||||
settings->setValue("port",port->text().toInt());
|
||||
settings->endGroup();
|
||||
|
||||
s->stop();
|
||||
s->start();
|
||||
|
||||
generateQR(ip->currentText()+":"+port->text());
|
||||
|
||||
}
|
@ -34,6 +34,7 @@ Q_OBJECT
|
||||
void regenerateQR(const QString & ip);
|
||||
void updateImage();
|
||||
void enableServer(int status);
|
||||
void updatePort();
|
||||
signals:
|
||||
void portChanged(QString port);
|
||||
|
||||
|
@ -18,7 +18,7 @@ YACReaderTitledToolBar::YACReaderTitledToolBar(const QString & title, QWidget *p
|
||||
|
||||
QLabel * nameLabel = new QLabel(title,this);
|
||||
|
||||
QString nameLabelStyleSheet = "QLabel {color:#454545; padding:0 0 0 0px; margin:0px; font-size:14px; font-weight:bold;}";
|
||||
QString nameLabelStyleSheet = "QLabel {color:#454545; padding:0 0 0 0px; margin:0px; font-size:13px; font-weight:bold;}";
|
||||
nameLabel->setStyleSheet(nameLabelStyleSheet);
|
||||
|
||||
mainLayout->addWidget(nameLabel,Qt::AlignLeft);
|
||||
|
Reference in New Issue
Block a user