void InitializeAlteraFPPaths() { #ifdef PYTHON_WRAPPER loadConfigs(); #endif alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altera_mf.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/220model.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_adder_14.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_adder64_14.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_subtractor_14.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_subtractor64_14.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_multiplier_11.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_multiplier64_11.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_divider_33.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_divider64_61.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_compare32_1.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_compare64_1.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_truncate_3.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_extend_2.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_sitofp32_6.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_sitofp64_6.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_fptosi32_6.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_fptosi64_6.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_adder_13.v"); alteraFPPaths.push_back(legUpDir + "ip/libs/altera/altfp_adder64_13.v"); }
void WapUI::init() { setWindowTitle( tr("WAP") ); QVBoxLayout *vb = new QVBoxLayout( this ); vb->setMargin( 2 ); vb->setSpacing( 4 ); QLabel* defaultLabel = new QLabel( tr("Standard account:"), this ); vb->addWidget( defaultLabel ); dfltAccount = new QLabel(tr("<none selected>"), this ); dfltAccount->setAlignment( Qt::AlignCenter ); QFont f = dfltAccount->font(); f.setBold( true ); dfltAccount->setFont( f ); vb->addWidget( dfltAccount ); QLabel* label = new QLabel( tr("Available WAP accounts:"), this); label->setWordWrap( true ); vb->addWidget( label ); wapList = new QListWidget( this ); wapList->setWhatsThis( tr("the selected account is used as default account") ); wapList->setAlternatingRowColors( true ); wapList->setSelectionBehavior( QAbstractItemView::SelectRows ); wapList->setSelectionMode( QAbstractItemView::SingleSelection ); vb->addWidget( wapList ); connect( wapList, SIGNAL(currentItemChanged(QListWidgetItem*,QListWidgetItem*)), this, SLOT(updateActions())); connect( wapList, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(selectDefaultWAP())); QMenu *contextMenu = QSoftMenuBar::menuFor( this ); wap_add = new QAction( QIcon(":icon/new"), tr("New"), this ); connect( wap_add, SIGNAL(triggered(bool)), this, SLOT(addWap()) ); contextMenu->addAction(wap_add); wap_remove = new QAction( QIcon(":icon/trash"), tr("Delete"), this ); connect( wap_remove, SIGNAL(triggered(bool)), this, SLOT(removeWap()) ); contextMenu->addAction(wap_remove); wap_props = new QAction( QIcon(":icon/settings"), tr("Properties..."), this ); connect( wap_props, SIGNAL(triggered(bool)), this, SLOT(doWap()) ); contextMenu->addAction(wap_props); loadConfigs(); updateActions(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { { QSharedMemory shmem("GOSTunnel-gui"); shmem.attach(); } shmem = new QSharedMemory("GOSTunnel-gui"); if (shmem->attach()) { QMessageBox::warning(this, tr("Ошибка открытия приложения"), tr("Приложение уже запущенно!")); exit(1); } else { shmem->create(1); } ui->setupUi(this); isShowMsgTray = false; mainSettings = NULL; setWindowTitle("GOSTunnel-gui"); setWindowFlags(Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::MSWindowsFixedSizeDialogHint); loadSettings(QCoreApplication::applicationDirPath() + "/config.txt"); loadConfigs(programConfig); this->setTrayIconActions(); this->showTrayIcon(); ui->lwGroups->setContextMenuPolicy(Qt::CustomContextMenu); connect(ui->lwGroups, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenuForGroupsList(QPoint))); QAction *renameAction = new QAction(tr("Переименовать"), this); QAction *deleteAction = new QAction(tr("Удалить"), this); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_btnDeletegroup_clicked())); connect(renameAction, SIGNAL(triggered()), this, SLOT(triggeredRenameAction())); lwMenu = new QMenu(tr("Context menu"), this); lwMenu->addAction(renameAction); lwMenu->addAction(deleteAction); }
TxtWinControl::TxtWinControl(QWidget *parent, QString &fname, TextWindow * txtWin) : QWidget(parent) { this->tw = NULL; this->configName = fname; /* PRES */ if (txtWin == NULL) { ASSERT (false); this->close(); return; } this->tw = txtWin; /* cargamos el archivo */ setupUi(this); //QMetaObject::connectSlotsByName(this); /*conectamos cada componente*/ /*! Cargamos ahora las configuraciones */ loadConfigs(); }