FileOpenFixture() { tmpPath = bfs::absolute(bfs::unique_path()); BOOST_TEST_CHECKPOINT("Creating special filenames"); #ifdef _WIN32 // Widestring UCS2 path fileNormal = bfs::path(L"1Normal.txt"); fileUmlaut = bfs::path(L"2Um\u00E4\u00F6\u00FCLaut.txt"); fileSpecial = bfs::path(L"3Spe\u0139\u00D4cial.txt"); #else // Use UTF8 (widestring not portable, either 16 or 32 bit) fileNormal = bfs::path("1Normal.txt"); fileUmlaut = bfs::path("2Um\xC3\xA4\xC3\xB6\xC3\xBC" "Laut.txt"); fileSpecial = bfs::path("3Spe\xC4\xB9\xC3\x94" "cial.txt"); #endif BOOST_TEST_CHECKPOINT("Creating tmp path" << tmpPath); bfs::create_directories(tmpPath); BOOST_TEST_CHECKPOINT("Creating files"); bnw::ofstream fNormal(tmpPath / fileNormal); bnw::ofstream fUmlaut(tmpPath / fileUmlaut); bnw::ofstream fSpecial(tmpPath / fileSpecial); BOOST_TEST_CHECKPOINT("Filling files"); fNormal << "OK"; fUmlaut << "OK"; fSpecial << "OK"; }
QPanelSetting::QPanelSetting() { gridLayout = NULL; //setPalette(QPalette(QColor(220, 230, 220))); setAutoFillBackground(true); QFont fHugeBold("Curier", 12, QFont::Bold); QFont fHugeItalic("Curier", 12, QFont::StyleItalic); QFont fLargeBold("Curier", 10, QFont::Bold); QFont fBold("Curier", 8, QFont::Bold); QFont fNormal("Curier", 8, QFont::Normal); groupBox_Settings = new QGroupBox("Settings ..."); groupBox_Settings->setFont(fLargeBold); QGridLayout *grid = new QGridLayout(); this->setLayout(grid); grid->addWidget(groupBox_Settings, 0, 0); label_coBox_USBDeviceName = new QLabel(); label_coBox_USBDeviceName->setText("Device-Name"); label_coBox_USBDeviceName->setFont(fLargeBold); label_coBox_USBDeviceBaudrate = new QLabel(); label_coBox_USBDeviceBaudrate->setText("Baudrate"); label_coBox_USBDeviceBaudrate->setFont(fLargeBold); label_coBox_AVRDeviceAccSpeed = new QLabel(); label_coBox_AVRDeviceAccSpeed->setText("Access-Speed"); label_coBox_AVRDeviceAccSpeed->setFont(fLargeBold); label_coBox_AVRDeviceName = new QLabel(); label_coBox_AVRDeviceName->setText("AVR-Target-Device:"); label_coBox_AVRDeviceName->setFont(fLargeBold); label_AVRDeviceNameView = new QLabel(); label_AVRDeviceNameView->setText("not determined"); label_AVRDeviceNameView->setFont(fLargeBold); label_coBox_USBDeviceXBeeType = new QLabel(); label_coBox_USBDeviceXBeeType->setText("XBeeDeviceType"); label_coBox_USBDeviceXBeeType->setFont(fLargeBold); label_coBox_XBeeRemoteNodeIdentifier = new QLabel(); label_coBox_XBeeRemoteNodeIdentifier->setText("RemoteNodeIdentifier"); label_coBox_XBeeRemoteNodeIdentifier->setFont(fLargeBold); label_coBox_XBeeRemoteNodeIdentifier->setEnabled(false); coBox_USBDeviceName = new QComboBox(); coBox_USBDeviceName->setMinimumWidth(170); coBox_USBDeviceName->setFont(fNormal); coBox_USBDeviceBaudrate = new QComboBox(); coBox_USBDeviceBaudrate->setMinimumWidth(170); coBox_USBDeviceBaudrate->setFont(fNormal); coBox_USBDeviceBaudrate->setCurrentIndex(0); coBox_AVRDeviceAccSpeed = new QComboBox(); coBox_AVRDeviceAccSpeed->setMinimumWidth(170); coBox_AVRDeviceAccSpeed->setFont(fNormal); coBox_USBDeviceXBeeType = new QComboBox(); coBox_USBDeviceXBeeType->setMinimumWidth(170); coBox_USBDeviceXBeeType->setFont(fNormal); coBox_XBeeRemoteNodeIdentifier = new QComboBox(); coBox_XBeeRemoteNodeIdentifier->setMinimumWidth(200); coBox_XBeeRemoteNodeIdentifier->setFont(fNormal); coBox_XBeeRemoteNodeIdentifier->setEnabled(false); labelPixmap_USB_ISP_Adapter = new QLabel; labelPixmap_USB_ISP_Adapter->setBackgroundRole(QPalette::Base); labelPixmap_USB_ISP_Adapter->setScaledContents(false); labelPixmap_USB_ISP_Adapter->setPixmap(QPixmap::fromImage(QImage(":/images/USB_ISP_Adapter.png").scaledToWidth(200, Qt::SmoothTransformation))); labelPixmap_USB_UART_Adapter = new QLabel; labelPixmap_USB_UART_Adapter->setBackgroundRole(QPalette::Base); labelPixmap_USB_UART_Adapter->setScaledContents(false); labelPixmap_USB_UART_Adapter->setPixmap(QPixmap::fromImage(QImage(":/images/USB_UART_Adapter.png").scaledToWidth(200, Qt::SmoothTransformation))); labelPixmap_USB_XBEE_Adapter = new QLabel; labelPixmap_USB_XBEE_Adapter->setBackgroundRole(QPalette::Base); labelPixmap_USB_XBEE_Adapter->setScaledContents(false); labelPixmap_USB_XBEE_Adapter->setPixmap(QPixmap::fromImage(QImage(":/images/USB_XBEE_Adapter.png").scaledToWidth(200, Qt::SmoothTransformation))); connect(coBox_USBDeviceName, SIGNAL(currentIndexChanged (QString)), this, SLOT(USBDevice_Name_changed(QString))); connect(coBox_USBDeviceBaudrate, SIGNAL(currentIndexChanged (QString)), this, SLOT(USBDevice_Baudrate_changed(QString))); connect(coBox_AVRDeviceAccSpeed, SIGNAL(currentIndexChanged (QString)), this, SLOT(AVRDevice_AccessSpeed_changed(QString))); connect(coBox_USBDeviceXBeeType, SIGNAL(currentIndexChanged (QString)), this, SLOT(XBEE_AdapterType_changed(QString))); connect(coBox_XBeeRemoteNodeIdentifier, SIGNAL(currentIndexChanged (QString)), this, SLOT(XBEE_RemoteNodeIdentifier_changed(QString))); setMode(APPLICATION_MODE_None); signaling = true; }