Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: CodeEditor, Assist++, Topic++ » QTF editor feature request + patch
QTF editor feature request + patch [message #27155] Mon, 28 June 2010 22:30 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hello Mirek,

When creating some app, I often change my mind about what should the widgets, dialogues etc. say to the user. The QTF is a great tool to write good looking messages, but it could be even better Wink

Now, if you want to edit already existing text, you have to: copy it, press alt+Q, paste it, do the editing, close the dialog and replace previous text with the new one from clipboard.

I think it would make sense to shorten this to: select text, press Alt+Q, do the editing, close dialog. That is cutting two unnecessary key strokes Wink

The code would be something like:
void Ide::Qtf()
{
	QtfDlg dlg;
	LoadFromGlobal(dlg, "QTF-designer");
	int l,h;
	bool sel=editor.GetSelection(l,h);
	if(sel){
		dlg.text<<=(~editor).ToString().Mid(l,h-l);
		dlg.copy.SetLabel("Apply and close");
	}
	dlg.Run();
	if(sel){
		editor.Remove(l,h-l);
		editor.Insert(l,(~dlg.text).ToString());
	}
	StoreToGlobal(dlg, "QTF-designer");
}


What do you think about it?

Best regards,
Honza
Re: QTF editor feature request + patch [message #28597 is a reply to message #27155] Wed, 08 September 2010 09:47 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dolik.rce wrote on Mon, 28 June 2010 16:30

Hello Mirek,

When creating some app, I often change my mind about what should the widgets, dialogues etc. say to the user. The QTF is a great tool to write good looking messages, but it could be even better Wink

Now, if you want to edit already existing text, you have to: copy it, press alt+Q, paste it, do the editing, close the dialog and replace previous text with the new one from clipboard.

I think it would make sense to shorten this to: select text, press Alt+Q, do the editing, close dialog. That is cutting two unnecessary key strokes Wink

The code would be something like:
void Ide::Qtf()
{
	QtfDlg dlg;
	LoadFromGlobal(dlg, "QTF-designer");
	int l,h;
	bool sel=editor.GetSelection(l,h);
	if(sel){
		dlg.text<<=(~editor).ToString().Mid(l,h-l);
		dlg.copy.SetLabel("Apply and close");
	}
	dlg.Run();
	if(sel){
		editor.Remove(l,h-l);
		editor.Insert(l,(~dlg.text).ToString());
	}
	StoreToGlobal(dlg, "QTF-designer");
}


What do you think about it?

Best regards,
Honza


OK, but to be conservative, I would like to have an option (in setup/Environment) that enables it - which would be ON by default.
Re: QTF editor feature request + patch [message #28635 is a reply to message #28597] Wed, 08 September 2010 17:46 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

luzr wrote on Wed, 08 September 2010 09:47

OK, but to be conservative, I would like to have an option (in setup/Environment) that enables it - which would be ON by default.


As you wish Wink Just committed.

This is my first "visible" change to theide, I hope I didn't mess up anything Smile

Honza
Previous Topic: Code assist default selection
Next Topic: Navigate to API help for widget
Goto Forum:
  


Current Time: Thu Mar 28 18:39:41 CET 2024

Total time taken to generate the page: 0.00843 seconds