当前位置: 首页>>代码示例>>C++>>正文


C++ TQStringList::clear方法代码示例

本文整理汇总了C++中TQStringList::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ TQStringList::clear方法的具体用法?C++ TQStringList::clear怎么用?C++ TQStringList::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TQStringList的用法示例。


在下文中一共展示了TQStringList::clear方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: determineFileSystemType

TQString TDEStorageDevice::determineFileSystemType(TQString path) {
	TQStringList mountTable;
	TQString prevPath = path;
	dev_t prevDev = 0;
	int pos;
	struct stat directory_info;
	if (path.startsWith("/")) {
		stat(path.local8Bit(), &directory_info);
		prevDev = directory_info.st_dev;
		// Walk the directory tree up to the root, checking for any change in st_dev
		// If a change is found, the previous value of path is the mount point itself
		while (path != "/") {
			pos = path.findRev("/", -1, TRUE);
			if (pos < 0) {
				break;
			}
			path = path.mid(0, pos);
			if (path == "") {
				path = "/";
			}
			stat(path.local8Bit(), &directory_info);
			if (directory_info.st_dev != prevDev) {
				break;
			}
			prevPath = path;
			prevDev = directory_info.st_dev;
		}
	}

	// Read in mount table
	mountTable.clear();
	TQFile file( "/proc/mounts" );
	if ( file.open( IO_ReadOnly ) ) {
		TQTextStream stream( &file );
		while ( !stream.atEnd() ) {
			mountTable.append(stream.readLine());
		}
		file.close();
	}

	// Parse mount table
	TQStringList::Iterator it;
	for ( it = mountTable.begin(); it != mountTable.end(); ++it ) {
		TQStringList mountInfo = TQStringList::split(" ", (*it), true);
		if ((*mountInfo.at(1)) == prevPath) {
			return (*mountInfo.at(2));
		}
	}

	// Unknown file system type
	return TQString::null;
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:52,代码来源:tdestoragedevice.cpp

示例2: loadDbFile

void KMDriverDB::loadDbFile()
{
	// first clear everything
	m_entries.clear();
	m_pnpentries.clear();

	TQFile	f(dbFile());
	if (f.exists() && f.open(IO_ReadOnly))
	{
		TQTextStream	t(&f);
		TQString		line;
		TQStringList	words;
		KMDBEntry	*entry(0);

		while (!t.eof())
		{
			line = t.readLine().stripWhiteSpace();
			if (line.isEmpty())
				continue;
			int	p = line.find('=');
			if (p == -1)
				continue;
			words.clear();
			words << line.left(p) << line.mid(p+1);
			if (words[0] == "FILE")
			{
				if (entry) insertEntry(entry);
				entry = new KMDBEntry;
				entry->file = words[1];
			}
			else if (words[0] == "MANUFACTURER" && entry)
				entry->manufacturer = words[1].upper();
			else if (words[0] == "MODEL" && entry)
				entry->model = words[1];
			else if (words[0] == "MODELNAME" && entry)
				entry->modelname = words[1];
			else if (words[0] == "PNPMANUFACTURER" && entry)
				entry->pnpmanufacturer = words[1].upper();
			else if (words[0] == "PNPMODEL" && entry)
				entry->pnpmodel = words[1];
			else if (words[0] == "DESCRIPTION" && entry)
				entry->description = words[1];
			else if (words[0] == "RECOMMANDED" && entry && words[1].lower() == "yes")
				entry->recommended = true;
			else if (words[0] == "DRIVERCOMMENT" && entry)
				entry->drivercomment = ("<qt>"+words[1].replace("&lt;", "<").replace("&gt;", ">")+"</qt>");
		}
		if (entry)
			insertEntry(entry);
	}
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:51,代码来源:kmdriverdb.cpp

示例3: encodetxt

void KgpgView::encodetxt(TQStringList selec,TQStringList encryptOptions,bool, bool symmetric)
{
        //////////////////              encode from editor
        if (KGpgSettings::pgpCompatibility())
                encryptOptions<<"--pgp6";

	if (symmetric) selec.clear();

	KgpgInterface *txtCrypt=new KgpgInterface();
        connect (txtCrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),TQT_TQOBJECT(this),TQT_SLOT(updatetxt(TQString)));
        txtCrypt->KgpgEncryptText(editor->text(),selec,encryptOptions);
        //KMessageBox::sorry(0,"OVER");

        //KgpgInterface::KgpgEncryptText(editor->text(),selec,encryptOptions);
        //if (!resultat.isEmpty()) editor->setText(resultat);
        //else KMessageBox::sorry(this,i18n("Decryption failed."));
}
开发者ID:Fat-Zer,项目名称:tdeutils,代码行数:17,代码来源:kgpgview.cpp

示例4: addPluginPage

void KateConfigDialog::addPluginPage (Kate::Plugin *plugin)
{
  if (!Kate::pluginConfigInterfaceExtension(plugin))
    return;

  for (uint i=0; i<Kate::pluginConfigInterfaceExtension(plugin)->configPages(); i++)
  {
    TQStringList path;
    path.clear();
    path << i18n("Application")<<i18n("Plugins") << Kate::pluginConfigInterfaceExtension(plugin)->configPageName(i);
    TQVBox *page=addVBoxPage(path, Kate::pluginConfigInterfaceExtension(plugin)->configPageFullName(i), Kate::pluginConfigInterfaceExtension(plugin)->configPagePixmap(i, TDEIcon::SizeSmall));

    PluginPageListItem *info=new PluginPageListItem;
    info->plugin = plugin;
    info->page = Kate::pluginConfigInterfaceExtension(plugin)->configPage (i, page);
    connect( info->page, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) );
    pluginPages.append(info);
  }
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:19,代码来源:kateconfigdialog.cpp

示例5: slotOk

void KXmlCommandDlg::slotOk()
{
	if (m_cmd)
	{
		m_cmd->setMimeType((m_mimetype->currentText() == "all/all" ? TQString::null : m_mimetype->currentText()));
		m_cmd->setDescription(m_description->text());
		TQStringList	l;
		TQListViewItem	*item = m_requirements->firstChild();
		while (item)
		{
			l << item->text(0);
			item = item->nextSibling();
		}
		m_cmd->setRequirements(l);
		l.clear();
		for (uint i=0; i<m_selectedmime->count(); i++)
			l << m_selectedmime->text(i);
		m_cmd->setInputMimeTypes(l);
	}
	KDialogBase::slotOk();
}
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:21,代码来源:kxmlcommanddlg.cpp

示例6: processExited

void DiskSensor::processExited(TDEProcess *)
{
    TQStringList stringList = TQStringList::split('\n',sensorResult);
    sensorResult = "";
    TQStringList::Iterator it = stringList.begin();
    //TQRegExp rx( "^(/dev/).*(/\\S*)$");
    TQRegExp rx( ".*\\s+(/\\S*)$");

    while( it != stringList.end())
    {
        rx.search( *it );
        if ( !rx.cap(0).isEmpty())
        {
            mntMap[rx.cap(1)] = *it;
        }
        it++;
    }
    stringList.clear();

    TQString format;
    TQString mntPt;
    SensorParams *sp;
    Meter *meter;

    TQObjectListIt lit( *objList );
    while (lit != 0)
    {
        sp = (SensorParams*)(*lit);
        meter = sp->getMeter();
        format = sp->getParam("FORMAT");
        mntPt = sp->getParam("MOUNTPOINT");
        if (mntPt.length() == 0)
            mntPt="/";

        if (format.length() == 0 )
        {
            format = "%u";
        }
        format.replace( TQRegExp("%fp", false),TQString::number(getPercentFree(mntPt)));
        format.replace( TQRegExp("%fg",false),
                        TQString::number(getFreeSpace(mntPt)/(1024*1024)));
        format.replace( TQRegExp("%fkb",false),
                        TQString::number(getFreeSpace(mntPt)*8) );
        format.replace( TQRegExp("%fk",false),
                        TQString::number(getFreeSpace(mntPt)) );
        format.replace( TQRegExp("%f", false),TQString::number(getFreeSpace(mntPt)/1024));
        
        format.replace( TQRegExp("%up", false),TQString::number(getPercentUsed(mntPt)));
        format.replace( TQRegExp("%ug",false),
                        TQString::number(getUsedSpace(mntPt)/(1024*1024)));
        format.replace( TQRegExp("%ukb",false),
                        TQString::number(getUsedSpace(mntPt)*8) );
        format.replace( TQRegExp("%uk",false),
                        TQString::number(getUsedSpace(mntPt)) );
        format.replace( TQRegExp("%u", false),TQString::number(getUsedSpace(mntPt)/1024));

        format.replace( TQRegExp("%tg",false),
                        TQString::number(getTotalSpace(mntPt)/(1024*1024)));
        format.replace( TQRegExp("%tkb",false),
                        TQString::number(getTotalSpace(mntPt)*8));
        format.replace( TQRegExp("%tk",false),
                        TQString::number(getTotalSpace(mntPt)));
        format.replace( TQRegExp("%t", false),TQString::number(getTotalSpace(mntPt)/1024));
        meter->setValue(format);
        ++lit;
    }
    if ( init == 1 )
    {
        emit initComplete();
        init = 0;
    }
}
开发者ID:Fat-Zer,项目名称:tdeutils,代码行数:72,代码来源:disksensor.cpp

示例7: numRecentFileHelpString

KateConfigDialog::KateConfigDialog ( KateMainWindow *parent, Kate::View *view )
 : KDialogBase ( KDialogBase::TreeList,
                 i18n("Configure"),
                 KDialogBase::Ok | KDialogBase::Apply|KDialogBase::Cancel | KDialogBase::Help,
                 KDialogBase::Ok,
                 parent,
                 "configdialog" )
{
  TDEConfig *config = KateApp::self()->config();

  KWin::setIcons( winId(), KateApp::self()->icon(), KateApp::self()->miniIcon() );

  actionButton( KDialogBase::Apply)->setEnabled( false );

  mainWindow = parent;

  setMinimumSize(600,400);

  v = view;

  pluginPages.setAutoDelete (false);
  editorPages.setAutoDelete (false);

  TQStringList path;

  setShowIconsInTreeList(true);

  path.clear();
  path << i18n("Application");
  setFolderIcon (path, SmallIcon("kate", TDEIcon::SizeSmall));

  path.clear();

  //BEGIN General page
  path << i18n("Application") << i18n("General");
  TQFrame* frGeneral = addPage(path, i18n("General Options"), BarIcon("go-home", TDEIcon::SizeSmall));

  TQVBoxLayout *lo = new TQVBoxLayout( frGeneral );
  lo->setSpacing(KDialog::spacingHint());
  config->setGroup("General");

  // GROUP with the one below: "Appearance"
  TQButtonGroup *bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Appearance"), frGeneral );
  lo->addWidget( bgStartup );

  // show full path in title
  config->setGroup("General");
  cb_fullPath = new TQCheckBox( i18n("&Show full path in title"), bgStartup);
  cb_fullPath->setChecked( mainWindow->viewManager()->getShowFullPath() );
  TQWhatsThis::add(cb_fullPath,i18n("If this option is checked, the full document path will be shown in the window caption."));
  connect( cb_fullPath, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );

  // sort filelist if desired
   cb_sortFiles = new TQCheckBox(bgStartup);
   cb_sortFiles->setText(i18n("Sort &files alphabetically in the file list"));
   cb_sortFiles->setChecked(parent->filelist->sortType() == KateFileList::sortByName);
   TQWhatsThis::add( cb_sortFiles, i18n(
         "If this is checked, the files in the file list will be sorted alphabetically.") );
   connect( cb_sortFiles, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );

  // GROUP with the one below: "Behavior"
  bgStartup = new TQButtonGroup( 1, Qt::Horizontal, i18n("&Behavior"), frGeneral );
  lo->addWidget( bgStartup );

  // number of recent files
  TQHBox *hbNrf = new TQHBox( bgStartup );
  TQLabel *lNrf = new TQLabel( i18n("&Number of recent files:"), hbNrf );
  sb_numRecentFiles = new TQSpinBox( 0, 1000, 1, hbNrf );
  sb_numRecentFiles->setValue( mainWindow->fileOpenRecent->maxItems() );
  lNrf->setBuddy( sb_numRecentFiles );
  TQString numRecentFileHelpString ( i18n(
        "<qt>Sets the number of recent files remembered by Kate.<p><strong>NOTE: </strong>"
        "If you set this lower than the current value, the list will be truncated and "
        "some items forgotten.</qt>") );
  TQWhatsThis::add( lNrf, numRecentFileHelpString );
  TQWhatsThis::add( sb_numRecentFiles, numRecentFileHelpString );
  connect( sb_numRecentFiles, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( slotChanged() ) );

  // Use only one instance of kate (MDI) ?
  cb_useInstance = new TQCheckBox(bgStartup);
  cb_useInstance->setText(i18n("Always use the current instance of kate to open new files"));
  cb_useInstance->setChecked(parent->useInstance);
  TQWhatsThis::add( cb_useInstance, i18n(
        "When checked, all files opened from outside of Kate will only use the "
        "currently opened instance of Kate.") );
  connect( cb_useInstance, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );

  // sync the konsole ?
  cb_syncKonsole = new TQCheckBox(bgStartup);
  cb_syncKonsole->setText(i18n("Sync &terminal emulator with active document"));
  cb_syncKonsole->setChecked(parent->syncKonsole);
  TQWhatsThis::add( cb_syncKonsole, i18n(
        "If this is checked, the built in Konsole will <code>cd</code> to the directory "
        "of the active document when started and whenever the active document changes, "
        "if the document is a local file.") );
  connect( cb_syncKonsole, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotChanged() ) );

  // modified files notification
  cb_modNotifications = new TQCheckBox(
      i18n("Wa&rn about files modified by foreign processes"), bgStartup );
//.........这里部分代码省略.........
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:101,代码来源:kateconfigdialog.cpp

示例8: initActions

void KMMainView::initActions()
{
	TDEIconSelectAction	*vact = new TDEIconSelectAction(i18n("&View"),0,m_actions,"view_change");
	TQStringList	iconlst;
	iconlst << "view_icon" << "view_detailed" << "view_tree";
	vact->setItems(TQStringList::split(',',i18n("&Icons,&List,&Tree"),false), iconlst);
	vact->setCurrentItem(0);
	connect(vact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeView(int)));

	TDEActionMenu	*stateAct = new TDEActionMenu(i18n("Start/Stop Printer"), "tdeprint_printstate", m_actions, "printer_state_change");
	stateAct->setDelayed(false);
	stateAct->insert(new TDEAction(i18n("&Start Printer"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_start"));
	stateAct->insert(new TDEAction(i18n("Sto&p Printer"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_stop"));

	stateAct = new TDEActionMenu(i18n("Enable/Disable Job Spooling"), "tdeprint_queuestate", m_actions, "printer_spool_change");
	stateAct->setDelayed(false);
	stateAct->insert(new TDEAction(i18n("&Enable Job Spooling"),"tdeprint_enableprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_enable"));
	stateAct->insert(new TDEAction(i18n("&Disable Job Spooling"),"tdeprint_stopprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotChangePrinterState()),m_actions,"printer_disable"));

	new TDEAction(i18n("&Remove"),"edittrash",0,TQT_TQOBJECT(this),TQT_SLOT(slotRemove()),m_actions,"printer_remove");
	new TDEAction(i18n("&Configure..."),"configure",0,TQT_TQOBJECT(this),TQT_SLOT(slotConfigure()),m_actions,"printer_configure");
	new TDEAction(i18n("Add &Printer/Class..."),"tdeprint_addprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotAdd()),m_actions,"printer_add");
	new TDEAction(i18n("Add &Special (pseudo) Printer..."),"tdeprint_addpseudo",0,TQT_TQOBJECT(this),TQT_SLOT(slotAddSpecial()),m_actions,"printer_add_special");
	new TDEAction(i18n("Set as &Local Default"),"tdeprint_defaulthard",0,TQT_TQOBJECT(this),TQT_SLOT(slotHardDefault()),m_actions,"printer_hard_default");
	new TDEAction(i18n("Set as &User Default"),"tdeprint_defaultsoft",0,TQT_TQOBJECT(this),TQT_SLOT(slotSoftDefault()),m_actions,"printer_soft_default");
	new TDEAction(i18n("&Test Printer..."),"tdeprint_testprinter",0,TQT_TQOBJECT(this),TQT_SLOT(slotTest()),m_actions,"printer_test");
	new TDEAction(i18n("Configure &Manager..."),"tdeprint_configmgr",0,TQT_TQOBJECT(this),TQT_SLOT(slotManagerConfigure()),m_actions,"manager_configure");
	new TDEAction(i18n("Initialize Manager/&View"),"reload",0,TQT_TQOBJECT(this),TQT_SLOT(slotInit()),m_actions,"view_refresh");

	TDEIconSelectAction	*dact = new TDEIconSelectAction(i18n("&Orientation"),0,m_actions,"orientation_change");
	iconlst.clear();
	iconlst << "view_top_bottom" << "view_left_right";
	dact->setItems(TQStringList::split(',',i18n("&Vertical,&Horizontal"),false), iconlst);
	dact->setCurrentItem(0);
	connect(dact,TQT_SIGNAL(activated(int)),TQT_SLOT(slotChangeDirection(int)));

	new TDEAction(i18n("R&estart Server"),"tdeprint_restartsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerRestart()),m_actions,"server_restart");
	new TDEAction(i18n("Configure &Server..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigure()),m_actions,"server_configure");
	new TDEAction(i18n("Configure Server Access..."),"tdeprint_configsrv",0,TQT_TQOBJECT(this),TQT_SLOT(slotServerConfigureAccess()),m_actions,"server_access_configure");

	TDEToggleAction	*tact = new TDEToggleAction(i18n("Show &Toolbar"),0,m_actions,"view_toolbar");
	tact->setCheckedState(i18n("Hide &Toolbar"));
	connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotToggleToolBar(bool)));
	tact = new TDEToggleAction( i18n( "Show Me&nu Toolbar" ), 0, m_actions, "view_menubar" );
	tact->setCheckedState(i18n("Hide Me&nu Toolbar"));
	connect( tact, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggleMenuBar( bool ) ) );
	tact = new TDEToggleAction(i18n("Show Pr&inter Details"),"tdeprint_printer_infos", 0,m_actions,"view_printerinfos");
	tact->setCheckedState(KGuiItem(i18n("Hide Pr&inter Details"),"tdeprint_printer_infos"));
	tact->setChecked(true);
	connect(tact,TQT_SIGNAL(toggled(bool)),TQT_SLOT(slotShowPrinterInfos(bool)));

	tact = new TDEToggleAction(i18n("Toggle Printer &Filtering"), "filter", 0, m_actions, "view_pfilter");
	tact->setChecked(KMManager::self()->isFilterEnabled());
	connect(tact, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggleFilter(bool)));

	new TDEAction( i18n( "%1 &Handbook" ).arg( "TDEPrint" ), "contents", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_help" );
	new TDEAction( i18n( "%1 &Web Site" ).arg( "TDEPrint" ), "network", 0, TQT_TQOBJECT(this), TQT_SLOT( slotHelp() ), m_actions, "invoke_web" );

	TDEActionMenu	*mact = new TDEActionMenu(i18n("Pri&nter Tools"), "package_utilities", m_actions, "printer_tool");
	mact->setDelayed(false);
	connect(mact->popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(slotToolSelected(int)));
	TQStringList	files = TDEGlobal::dirs()->findAllResources("data", "tdeprint/tools/*.desktop");
	for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it)
	{
		KSimpleConfig	conf(*it);
		conf.setGroup("Desktop Entry");
		mact->popupMenu()->insertItem(conf.readEntry("Name", "Unnamed"), mact->popupMenu()->count());
		m_toollist << conf.readEntry("X-TDE-Library");
	}

	// add actions to the toolbar
	m_actions->action("printer_add")->plug(m_toolbar);
	m_actions->action("printer_add_special")->plug(m_toolbar);
	m_toolbar->insertLineSeparator();
	m_actions->action("printer_state_change")->plug(m_toolbar);
	m_actions->action("printer_spool_change")->plug(m_toolbar);
	m_toolbar->insertSeparator();
	m_actions->action("printer_hard_default")->plug(m_toolbar);
	m_actions->action("printer_soft_default")->plug(m_toolbar);
	m_actions->action("printer_remove")->plug(m_toolbar);
	m_toolbar->insertSeparator();
	m_actions->action("printer_configure")->plug(m_toolbar);
	m_actions->action("printer_test")->plug(m_toolbar);
	m_actions->action("printer_tool")->plug(m_toolbar);
	m_pactionsindex = m_toolbar->insertSeparator();
	m_toolbar->insertLineSeparator();
	m_actions->action("server_restart")->plug(m_toolbar);
	m_actions->action("server_configure")->plug(m_toolbar);
	m_toolbar->insertLineSeparator();
	m_actions->action("manager_configure")->plug(m_toolbar);
	m_actions->action("view_refresh")->plug(m_toolbar);
	m_toolbar->insertLineSeparator();
	m_actions->action("view_printerinfos")->plug(m_toolbar);
	m_actions->action("view_change")->plug(m_toolbar);
	m_actions->action("orientation_change")->plug(m_toolbar);
	m_actions->action("view_pfilter")->plug(m_toolbar);

	// add actions to the menu bar
	TQPopupMenu *menu = new TQPopupMenu( this );
	m_actions->action( "printer_add" )->plug( menu );
//.........这里部分代码省略.........
开发者ID:Fat-Zer,项目名称:tdelibs,代码行数:101,代码来源:kmmainview.cpp

示例9: TDECModule

KWindowActionsConfig::KWindowActionsConfig (bool _standAlone, TDEConfig *_config, TQWidget * parent, const char *)
  : TDECModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone)
{
  TQString strWin1, strWin2, strWin3, strAllKey, strAll1, strAll2, strAll3, strAllW;
  TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
  TQGrid *grid;
  TQGroupBox *box;
  TQLabel *label;
  TQString strMouseButton1, strMouseButton3;
  TQString txtButton1, txtButton3;
  TQStringList items;
  bool leftHandedMouse = ( TDEGlobalSettings::mouseSettings().handed == TDEGlobalSettings::KMouseSettings::LeftHanded);

/**  Inactive inner window ******************/

  box = new TQVGroupBox(i18n("Inactive Inner Window"), this, "Inactive Inner Window");
  box->layout()->setMargin(KDialog::marginHint());
  box->layout()->setSpacing(KDialog::spacingHint());
  layout->addWidget(box);
  TQWhatsThis::add( box, i18n("Here you can customize mouse click behavior when clicking on an inactive"
                             " inner window ('inner' means: not titlebar, not frame).") );

  grid = new TQGrid(3, Qt::Vertical, box);

  strMouseButton1 = i18n("Left button:");
  txtButton1 = i18n("In this row you can customize left click behavior when clicking into"
     " the titlebar or the frame.");

  strMouseButton3 = i18n("Right button:");
  txtButton3 = i18n("In this row you can customize right click behavior when clicking into"
     " the titlebar or the frame." );

  if ( leftHandedMouse )
  {
     tqSwap(strMouseButton1, strMouseButton3);
     tqSwap(txtButton1, txtButton3);
  }

  strWin1 = i18n("In this row you can customize left click behavior when clicking into"
     " an inactive inner window ('inner' means: not titlebar, not frame).");

  strWin3 = i18n("In this row you can customize right click behavior when clicking into"
     " an inactive inner window ('inner' means: not titlebar, not frame).");

  // Be nice to lefties
  if ( leftHandedMouse ) tqSwap(strWin1, strWin3);

  label = new TQLabel(strMouseButton1, grid);
  TQWhatsThis::add( label, strWin1 );

  label = new TQLabel(i18n("Middle button:"), grid);
  strWin2 = i18n("In this row you can customize middle click behavior when clicking into"
     " an inactive inner window ('inner' means: not titlebar, not frame).");
  TQWhatsThis::add( label, strWin2 );

  label = new TQLabel(strMouseButton3, grid);
  TQWhatsThis::add( label, strWin3 );

  items.clear();
  items   << i18n("Activate, Raise & Pass Click")
          << i18n("Activate & Pass Click")
          << i18n("Activate")
          << i18n("Activate & Raise");

  TQComboBox* combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coWin1 = combo;
  TQWhatsThis::add( combo, strWin1 );

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coWin2 = combo;
  TQWhatsThis::add( combo, strWin2 );

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coWin3 = combo;
  TQWhatsThis::add( combo, strWin3 );


/** Inner window, titlebar and frame **************/

  box = new TQVGroupBox(i18n("Inner Window, Titlebar && Frame"), this, "Inner Window, Titlebar and Frame");
  box->layout()->setMargin(KDialog::marginHint());
  box->layout()->setSpacing(KDialog::spacingHint());
  layout->addWidget(box);
  TQWhatsThis::add( box, i18n("Here you can customize TDE's behavior when clicking somewhere into"
                             " a window while pressing a modifier key."));

  grid = new TQGrid(5, Qt::Vertical, box);

  // Labels
  label = new TQLabel(i18n("Modifier key:"), grid);

  strAllKey = i18n("Here you select whether holding the Meta key or Alt key "
    "will allow you to perform the following actions.");
  TQWhatsThis::add( label, strAllKey );
//.........这里部分代码省略.........
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:101,代码来源:mouse.cpp

示例10: TQLabel


//.........这里部分代码省略.........
        << i18n("Lower")
        << i18n("Operations Menu")
        << i18n("Toggle Raise & Lower")
        << i18n("Nothing")
        << i18n("Shade");

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coTiAct2 = combo;
  TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>active</em> window."));

  // Titlebar and frame, active, mouse button 3
  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coTiAct3 =  combo;
  TQWhatsThis::add(combo, txtButton3 );

  txtButton1 = i18n("Behavior on <em>left</em> click into the titlebar or frame of an "
     "<em>inactive</em> window.");

  txtButton3 = i18n("Behavior on <em>right</em> click into the titlebar or frame of an "
     "<em>inactive</em> window.");

  // Be nice to left handed users
  if ( leftHandedMouse ) tqSwap(txtButton1, txtButton3);

  label = new TQLabel(i18n("Inactive"), grid);
  label->setAlignment(AlignCenter);
  TQWhatsThis::add( label, i18n("In this column you can customize mouse clicks into the titlebar"
                               " or the frame of an inactive window.") );

  items.clear();
  items  << i18n("Activate & Raise")
         << i18n("Activate & Lower")
         << i18n("Activate")
         << i18n("Shade")
         << i18n("Operations Menu")
         << i18n("Raise")
         << i18n("Lower")
         << i18n("Nothing");

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coTiInAct1 = combo;
  TQWhatsThis::add(combo, txtButton1);

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coTiInAct2 = combo;
  TQWhatsThis::add(combo, i18n("Behavior on <em>middle</em> click into the titlebar or frame of an <em>inactive</em> window."));

  combo = new TQComboBox(grid);
  combo->insertStringList(items);
  connect(combo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
  coTiInAct3 = combo;
  TQWhatsThis::add(combo, txtButton3);

/**  Maximize Button ******************/

  box = new TQHGroupBox(i18n("Maximize Button"), this, "Maximize Button");
  box->layout()->setMargin(KDialog::marginHint());
  box->layout()->setSpacing(KDialog::spacingHint());
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:67,代码来源:mouse.cpp


注:本文中的TQStringList::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。