menix::menix(QWidget *parent) : QMainWindow(parent), m_ui(new Ui::menix) { m_ui->setupUi(this); QToolBar *toolbarIconos = addToolBar(tr("Iconos")); toolbarIconos->addAction(QIcon(":/preferences-system.png"),"Opciones",this,SLOT( abrirOpciones() ) ); toolbarIconos->addAction(QIcon(":/terminal.png"),"Debug",this,SLOT(abrirDebug())); opciones = new opcionesGlobales(); numero = opciones->NumeroDestino(); puerto = opciones->Puerto(); pin = opciones->Pin(); centro = opciones->CentroMensajes(); fixok = opciones->Fixok(); ips = new QStringList( opciones->Ips() ); file = new QFile( opciones->fileLog() ); file->open( QIODevice::WriteOnly | QIODevice::Text ); flog = new QTextStream( file ); mensaje = new smsat(centro,puerto,flog,pin,fixok); crearAcciones(); crearBandeja(); // testPuerto( mensaje ); Server *tcp = new Server(ips,this); connect(tcp,SIGNAL(sendMessage(QString)),this,SLOT(sendMessage(QString))); connect(mensaje,SIGNAL(sendAt(QString)),this,SLOT(sendedMessage(QString))); connect(mensaje,SIGNAL(displayMsg(QString)),this,SLOT(showPopup(QString))); }
VentanaPrincipal::VentanaPrincipal() { editorTexto = new EditorCodigo; setCentralWidget(editorTexto); crearAcciones(); crearMenus(); crearToolBars(); crearBarraEstado(); crearWidgetsMovibles(); leerConfiguracion(); connect(editorTexto->document(), SIGNAL(contentsChanged()), this, SLOT(archivoFueModificado())); setArchivoActual(""); setUnifiedTitleAndToolBarOnMac(true); }