Turecko-americká vycházející matematická hvězda Levent Alpöge ze společnosti Anthropic vyvolal pozdvižení oznámením (PDF), že s pomocí superinteligence Claude od Antropicu dokázal vyřešit jeden ze sedmi největších matematických problémů tisíciletí, slavnou Riemannovu hypotézu (prvočísla se mezi čísly objevují zdánlivě nepravidelně, hypotéza tvrdí, že za jejich rozmístěním je určitý řád). Svůj důkaz uvolnil jako open-source
… více »
#include
#include "window.h"
#include "windowadapters.h"
#include "adapters_compont.h"
MainWindow::MainWindow(QWidget *parent): QMainWindow(parent)
{
window = NULL;
uii.setupUi(this);
connect(uii.actionExit, SIGNAL(triggered()), this, SLOT(close()));
// -----------------------------------------------------------------------------
QPushButton * adapterButton = new QPushButton;
adapterButton->setText("Adapters");
uii.vboxLayout->addWidget(adapterButton);
connect(adapterButton, SIGNAL(clicked()), this, SLOT(ShowAdapters()));
QPushButton * eraseButton = new QPushButton;
eraseButton->setText("Erase");
uii.vboxLayout->addWidget(eraseButton);
connect(eraseButton, SIGNAL(clicked()), this, SLOT(WindowErase()));
QPushButton * exitButton = new QPushButton;
exitButton->setText("Exit");
uii.vboxLayout->addWidget(exitButton);
connect(exitButton, SIGNAL(clicked()), this, SLOT(close()));
QSpacerItem * spacer1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
uii.vboxLayout->addItem(spacer1);
scrollArea = new QScrollArea;
uii.vboxLayout1->addWidget(scrollArea);
// ---------------------------------------------------------------------
}
void MainWindow::ShowAdapters()
{
if(window==NULL)
{
window = new windowadapters;
scrollArea->takeWidget();
scrollArea->setWidget(window);
scrollArea->setWidgetResizable(window);
}
}
void MainWindow::WindowErase()
{
if(window!=NULL)
{
window->close();
window=NULL;
}
}
#include QtGui>
#include "window.h"
#include "windowadapters.h"
#include "adapters_compont.h"
MainWindow::MainWindow(QWidget *parent): QMainWindow(parent)
{
window = NULL;
uii.setupUi(this);
connect(uii.actionExit, SIGNAL(triggered()), this, SLOT(close()));
// -----------------------------------------------------------------------------
QPushButton * adapterButton = new QPushButton;
adapterButton->setText("Adapters");
uii.vboxLayout->addWidget(adapterButton);
connect(adapterButton, SIGNAL(clicked()), this, SLOT(ShowAdapters()));
QPushButton * eraseButton = new QPushButton;
eraseButton->setText("Erase");
uii.vboxLayout->addWidget(eraseButton);
connect(eraseButton, SIGNAL(clicked()), this, SLOT(WindowErase()));
QPushButton * exitButton = new QPushButton;
exitButton->setText("Exit");
uii.vboxLayout->addWidget(exitButton);
connect(exitButton, SIGNAL(clicked()), this, SLOT(close()));
QSpacerItem * spacer1 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
uii.vboxLayout->addItem(spacer1);
// ---------------------------------------------------------------------
}
void MainWindow::ShowAdapters()
{
if(window==NULL)
{
scrollArea = new QScrollArea;
window = new windowadapters;
scrollArea->setWidget(window);
scrollArea->setWidgetResizable(window);
uii.vboxLayout1->addWidget(scrollArea);
}
}
void MainWindow::WindowErase()
{
if(window!=NULL)
{
window->close();
window=NULL;
delete scrollArea;
}
}
Tiskni
Sdílej: