Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement read only feature #96

Closed
brupelo opened this issue Nov 27, 2019 · 3 comments
Closed

Implement read only feature #96

brupelo opened this issue Nov 27, 2019 · 3 comments

Comments

@brupelo
Copy link
Contributor

brupelo commented Nov 27, 2019

@gamecreature Rick, hi again... how you doing? I hope you're alright.

Here's the thing, I've got my interest back on your project and I was wondering... how difficult would be implementing a setReadOnly feature similarly to other text editors such as Scintilla?

Could you please describe how much effort would be to get it done? I'd be willing to give it a shot if not very difficult but I'd need to know exactly the proper steps to do it correctly.

Thanks in advance!

Ns. I've see your amazing project has been stuck for few months, are you not actively developing anymore?

@gamecreature
Copy link
Member

No the project is not dead. It's just that I don't have enough time for it at the moment.

Implementing readonly shouldn't be very hard. There's only entry point for changing the text document. Maybe I've implemented it earlier in an internal project which uses edbee. I will check that out.

@emoon
Copy link
Contributor

emoon commented Jul 18, 2020

I'm interested in this feature as well.

gamecreature added a commit that referenced this issue Jul 25, 2020
…r controller->setReadonly()

Update CMakeList.txt
@gamecreature
Copy link
Member

Just pushed en implemented readonly mode to master.
Use controller->setReadonly(true) or widget->setReadonly(true)

There's also a toggleReadonly command 'toggle_readonly': (See sample implementation of the edbee app context menu)
https://github.com/edbee/edbee-app/blob/843b3d9093db769488dc0059510015e13a3eeb68/edbee-app/ui/mainwindow.cpp#L904-L907

QAction* readonlyAction = controller->createAction( "toggle_readonly", tr("Toggle Readonly"), QIcon(), menu ) ;
readonlyAction->setCheckable(true);
readonlyAction->setChecked(controller->readonly());
menu->addAction(readonlyAction);

SlySven pushed a commit to SlySven/edbee-lib that referenced this issue Oct 27, 2020
…y() or controller->setReadonly()

Update CMakeList.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants