// CStartServerWindow message handlers
BOOL CStartServerWindow::OnInitDialog()
{
	CDialog::OnInitDialog();
	
	DWORD dwStyle = m_list.GetExtendedStyle();
	dwStyle |= LVS_EX_FULLROWSELECT;					//选中某行使整行高亮(只适用与report风格的listctrl)
	dwStyle |= LVS_EX_GRIDLINES;						//网格线(只适用与report风格的listctrl)
	//dwStyle |= LVS_EX_ONECLICKACTIVATE;
	m_list.SetExtendedStyle(dwStyle);					//设置扩展风格

	dwStyle = m_list1.GetExtendedStyle();
	dwStyle |= LVS_EX_FULLROWSELECT;					//选中某行使整行高亮(只适用与report风格的listctrl)
	dwStyle |= LVS_EX_GRIDLINES;						//网格线(只适用与report风格的listctrl)
	//dwStyle |= LVS_EX_ONECLICKACTIVATE;
	m_list1.SetExtendedStyle(dwStyle);					//设置扩展风格

	int idx = 0;
	m_list.InsertColumn(idx++, _T("componentType"),				LVCFMT_CENTER,	150);
	m_list.InsertColumn(idx++, _T("addr"),						LVCFMT_CENTER,	200);
	m_list.InsertColumn(idx++, _T("running"),					LVCFMT_CENTER,	200);

	idx = 0;
	m_list1.InsertColumn(idx++, _T("componentType"),			LVCFMT_CENTER,	200);
	m_list1.InsertColumn(idx++, _T("addr"),						LVCFMT_CENTER,	250);

	loadLayouts();
	return TRUE;  // return TRUE  unless you set the focus to a control
}
Beispiel #2
0
int manager::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: { QString _r = autoCalc((*reinterpret_cast< const QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 1: { QString _r = calc((*reinterpret_cast< const QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 2: loadLayouts(); break;
        case 3: restoreLayouts(); break;
        case 4: { QString _r = getFunctions((*reinterpret_cast< QString(*)>(_a[1])));
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 5: setABC(); break;
        case 6: setNumbers(); break;
        case 7: setAngleModeRadian(); break;
        case 8: setAngleModeDegree(); break;
        case 9: { QString _r = getAngleMode();
            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
        case 10: setClipboard((*reinterpret_cast< QString(*)>(_a[1]))); break;
        default: ;
        }
        _id -= 11;
    }
    return _id;
}
Beispiel #3
0
Config::Config() :
    m_currentLayout(NULL)
{
    m_settings = new QSettings(qApp->applicationName(),qApp->organizationName());
    m_lastLayoutFile = m_settings->value("lastLayoutFile",QLocale::system().name()+".ltf").toString();
    m_fontSize = m_settings->value("fontSize",QVariant(12)).toInt();
    m_separateKeyboard = m_settings->value("separateKeyboard",QVariant(false)).toBool();
    m_lastLayout = m_settings->value("lastLayout",QLocale::system().name()).toString();


    loadLayouts();
}
void LayoutManager::loadUserLayouts()
{
	QDir layoutsDir = QDir( KStandardDirs::locateLocal( "appdata", QString::fromUtf8("contactlistlayouts") ) );

	layoutsDir.setSorting( QDir::Name );

	QStringList filters;
	filters << "*.xml" << "*.XML";
	layoutsDir.setNameFilters(filters);
	layoutsDir.setSorting( QDir::Name );

	QFileInfoList list = layoutsDir.entryInfoList();

	for ( int i = 0; i < list.size(); ++i )
	{
		QFileInfo fileInfo = list.at(i);
		kDebug() << "found user file: " << fileInfo.fileName();
		loadLayouts( layoutsDir.filePath( fileInfo.fileName() ), true );
	}
}
void LayoutManager::loadDefaultLayouts()
{
	loadLayouts( KStandardDirs::locate( "data", "kopete/DefaultContactListLayouts.xml" ), false );
	loadLayouts( KStandardDirs::locate( "data", "kopete/CompactContactListLayouts.xml" ), false );
}