Search:   Help



LyX documentation


Shared groups



Categories: GSOC, ,
<< | Page list | >>

GSoC Project UI Improvement and Non-Linear Writing Enhancement Wiki Page

Category: GSOC

Table of Contents

Status Update

July 12, 2013

My deepest apologies for ignoring the project wiki page. Right now - and thereafter until the completion of non-linear writing project - I will be working part-time. As stated on my proposal, my schedule is a little bit different due to my summer classes (a huge time commitment). Below is a brief explanation of my schedule:

  • May 4 - June 23: Full-time, 40 hrs/week
  • June 23 - Aug. 2: Summer classes in session; 10 hrs/week.
  • Aug. 2 - Aug. 20: Part-time; 15-20 hrs/week.
  • Aug. 20 - completion (no later than Google's official due date): Part-time, 10-15 hrs/week.

Currently I got bogged down in a sync bug: whenever I drag/drop items from the list view, the program will crash. As long as I get over this, I can go on and begin integrating the Corkboard into LyX.

Project Description

The project aims at enhancing LyX's support for non-linear writing process. The project will add an outline view and a corkboard view to LyX on which the user can "play with ideas", namely, to rearrange sections and add notes. The two views will support drag and drop and add and remove features, and changes the user made to these views will be synchronized to the document.

There has been some work on these two features by Rob Oakes. However, the previous implementation updates the model by renewing the entire document model every time there is a significant change to the document. The GSoC project, on the other hand, will use signals and slots to inform the model about changes made to the document.

To see the original project description on the idea list page, click here.

Original Proposal

Proposal for GSoC Project UI Improvement and Non-linear Writing Enhancement

Xueqing Shan

Vanderbilt University, ‘16

May 1, 2013

Background Information

About Me

My first year in Vanderbilt was also my first year intensively learning two new languages: English and computer language, and I enjoyed them both. I took CS 101 and 3 reading-intensive classes last semester, and CS 201 and 4 writing-intensive classes this semester. What I have enjoyed about both of my newly acquired languages is their orderliness and accuracy. Most of my pleasure with computer science comes from the fact that by making strict, accurate commands, I can make my machine smarter and understand me better, while most of my pleasure with English lies in the fact that by thinking and writing in English following its rules and grammars and principles of organization, I feel myself smarter. Hence, the reason I want to contribute to this project is that I want to bring this double-smartness to the common user of LyX. I want to make the machine smart enough to understand and interpret the user, and the user, by communicating with the machine through LyX, can write smarter by making better use of their non-linearly written drafts.

Technical Information

  • Platform and IDE: Xcode 4.6.2 under Mac OS X Mountain Lion 10.8.3. MacBook Air 13-inch, 1.8 GHz Intel Core i5. Memory 4 GB 1600 MHz DDR3.
  • Experience: Java and C++. College computer science classes. Familiar with: basic language syntaxes, data structure, basic algorithms and algorithm analysis, class design, etc.
  • Knowledge prerequisite: Satisfy for basic knowledge requirement (C++), do not satisfy the recommended knowledge (Qt) but can learn.

Big Picture: Non-linear writing process and the goal of this project

Writing is a process of playing with ideas. Writers play with ideas, come up with an outline, then a draft, then several drafts, and eventually revise again and again until they feel they are “finished”. However, in an era in which most of the written works are done on the computer, this non-linear nature of writing poses major challenge to word processing programs: how to make the linearly thinking computer suitable for non-linear writing process. Hence, the goal of this project is to tailor LyX to suit the non-linear writing process of most writers.

Every writer writes differently, but there are several commonalities of non-linear writing process. A typical writing process includes coming up with ideas, gathering information, playing with ideas, and writing. The goals of this project, hence, are:

  1. to integrate the last two steps of non-linear writing process described above (playing with ideas and writing) into one program, and
  2. specifically, to provide a more intuitive way for the user to “play with ideas”.

Current State

The fundamental framework for this project has been done, including:

  1. An integrated corkboard and outliner pane that are connected to a single instance of a QStandardItemModel.
  2. A helper class, called DataManager, available to translate view actions into valid LFUN commands that can be used to manipulate the underlying document buffer. Manages drag/drop operations, insertion of new headings and notes.
  3. The above code works with stability bugs.


  1. Modify the LyX model to use signals/slots mechanism to avoid regenerating the model each time major changes occur in the text to increase performance of outline view.
  2. (Tentative, dependent upon progress, and subject to change) Modify the corkboard view to use QGraphicsScene to include or enhance functionalities such as more flexible arrangement of cards, more flexible notecard views, and clipping texts into cards.


Week 1: Learning week 1

May 6 – May 12. Time cmit: 8 hrs/d, 7 d/wk. Time zone: Beijing.

Goal: Learn the basics of Qt with a focus on those parts relevant to this project, learn LyX development documentations, learn git, install relevant programs and rearrange directories on my computer, and community bonding.

Materials: Qt project online tutorials, git online tutorials, LyX development documentations (focus on “Customization” and “Embedded Objects”).

Day 1: Qt: the basics

Goals: Familiarize myself with all the basics of Qt. Install programs on/customize my laptop for development.

Deliverables: a) Qt study notes and questions; b) simple applications built with Qt (a notepad-like application) using what I have learnt that day.

Day 2: LyX: the basics

Goals: With some basic knowledge of the tools, I will comprehensively review the documentations for developers in LyX wiki. I will start looking at the source code and try to fix a bug or two in order to familiarize myself with the bug-reporting system of LyX.

Deliverables: LyX study notes, including a diagram of source code directories. Report of small bugs found and fixed.

Days 3-5: Qt: some applications and the parts relevant to this project

Goals: Further study of Qt, with a focus on those topics relevant to this project, including Model/View classes and Graphics View Framework. Experiment with Qt examples. Build a simple notecard program using model and QGraphicsScene.

Deliverables: a) a simple notecard program; b) study notes.

Day 6: LyX: more. Send weekly report to mentor

Goals: Further study of LyX, focusing on “Customization” and “Embedded Objects” in LyX wiki; with some more knowledge of Qt, I can gain a better sense of the philosophy behind the design of LyX. Further working on finding small bugs and fix them.

Deliverables: LyX study notes.

Day 7: Buffer Day. Depends on actual progress/planned progress and feedback from mentor.

Week 2: Learning Week 2

May 13 – May 19. Time cmit: 8 hrs/d, 7 d/wk. Time zone: Beijing.

Goal: Gain a more thorough understanding of the existing code, produce a more detailed report of the project and update schedule. Begin working on the project.

Days 1-2: Get to the existing code

Goals: Study existing code for OutlineView and Corkboard view; specifically, how it uses model/view paradigm, how the insets are designed, and how ToC model communicates with insets.

Deliverables: A report of preliminary works of this project and suggestions of further implementations.

Day 3: Update schedule and project plan

Goals: Based on the previous two weeks of study, I should gain a better sense of the project and its direction. I will generate a more detailed report of the entire project, including how the existing work was implemented and an analysis of it and to which direction should the rest of the project go. I will also determine whether this project will include the corkboard view part.

Deliverables: An updated, more detailed project schedule and a project report sent to mentor.

Day 4: Decide the final schedule of this project

Goals: Discuss with mentor about this project; finalize the schedule.

Deliverables: Final schedule of the project.

Days 5-6: Begin working on the project.

Begin working on implementing text insets. For detailed explanation, please see description following weeks 3-5.

Day 7: Buffer day. Depends on actual progress/planned progress and feedback from mentor.

Week 3: Core Work 1

May 20 – May 26. Time cmit: 8 hrs/d, 7d/wk. Time zone: Beijing

The following three weeks will be devoted to the core work of enhancing outline view. The big goal is to avoid regenerating the entire model every time there is a major change in the text.


1) Create a refined design for the OutlineView (and potentially Corkboard, depends on updated schedule from the second week) class.

2) Create a design for class DataManager. This class will serve as an intermediate class communicating with the backend of LyX components.

Week 4-5: Core Work 2

May 27 – June 9. Time cmit: 8 hrs/d, 7d/wk. Time zone: Beijing

Goals: 1) Update the design of inset classes based on discussion results from LyX community. 2) Update the ToC model accordingly so that insets can communicate with the model using signals/slots mechanism.

Weeks 6-7 (June 10 – June 23) Time cmit: 8 hrs/d, 7d/wk. Time zone: Beijing
  1. Finishing-up period of OutlineView part:
a. Further implementations on modification of the way insets and the model communicate with each other.
b. Extensive testing of existing code.
c. If everything goes on schedule, documentation period can begin.
  1. Begin integrating the corkboard components to LyX.
  2. Work on midterm report.

June 23: Second Progress Evaluation (Midterm Evaluation)
Week 8 (June 24 – June 30) Time cmit: 15-20 hrs/wk. Time zone: Chicago. Buffer Week.

First Buffer Week

First week of summer school. Time commitment for classes and homework: 25 - 40 hrs/wk.

During weeks 3-7, core work of modifying outliner view should be done.

If progress is on schedule, this week will be devoted to thoroughly testing existing code.

Constant touch with mentor(s) and the LyX-devel community.

Weeks 9-12 (July 1 – July 28) Time cmit: 15 – 20 hrs/wk. Time zone: Chicago

(If as scheduled) Modify the corkboard view to use QGraphicsScene to include or enhance functionalities such as more flexible arrangement of cards, more flexible notecard views, and clipping texts into cards.

Week 13 (July 29 – Aug 4) Time cmit: 15 – 20 hrs/wk. Time zone: Chicago. Buffer Week.

Second Buffer Week

Last week of summer school. Time commitment for classes and homework: 30 - 50 hrs/wk.

During weeks 9-12, major works should be done for enhancing Corkboard view.

If progress is on schedule, this week will be devoted to intensive testing and bug fixes of the entire project.

Constant touch with mentor(s) and the LyX-devel community.

Weeks 14-15 (Aug 5 – Aug 19) Time cmit: 8 hrs/d, 7 d/wk. Time zone: Beijing

Final wrap-up. Thorough testing and documentation of the entire project.

Alterations to Original Proposal

Progress Record

Week 1: May 6 - May 12

Week 2: May 13 - May 19

Week 3: May 20 - May 26

Week 4: May 27 - June 2

Week 5: June 2 - June 9

  • Day 1: Learnt about using signals and slots to communicate with the model by studying Rob's implementation of insertCards and removeCards slots.
  • Day 2 - 4: Worked on (implement and debug) four public slots to make the architecture more event driven. The four slots are: insertCardsToModel (corresponding signal: additionButtonClicked(CardWidget *) from CardWidget class, also called by dragEvent function in Corkboard class), insertCardsToCorkboard (rowsInserted() signal from the model), removeCardsFromModel(deletionButtonClicked(CardWidget *) from CardWidget class), and removeCardsFromCorkboard (rowsRemoved() signal from the model).
  • Day 5: Got rid of the grid layout (Vincent), fixed minor bugs and begin to move the Corkboard class from QGraphcisScene to QMainWindow.
  • Weekend: Fixed resizing issue and drag and drop support. Implementation merged to master branch on

Week 6: June 10 - June 16

Notes and Todo's

  • Notes:
    1. Vincent's e770c7a:
      1. Changed the base class of the manager class from QMainWindow to QWidget and class name from MainWindow to CorkboardWidget or CorkboardManager.
      2. Reimplemented show() function.
    2. Vincent's 40938b1:
      1. Added vertical scrollbars when needed and banned horizontal scrollbars.
      2. Fixed screen shaking problem.
    3. Ashley's 9b5b59f:
      1. Moved the card manager function (convertToIndexFromScenePos) back to Corkboard class and free the manager class from arranging cards on the corkboard.
    4. Ashley's c04d9aa:
      1. Record card content in the model as well. Currently, the model only saves the card title but not the card content. Hence, if you drag a card and drop it at another location, the card content will change from the custom content (for example, "hello world"), to the default content ("click here to edit card content"). I plan to fix this issue by putting the card content at another QStandardItem object placed at (same_row_as_title, 1) position in the model.
    5. Ashley's 4924f30:
      1. Fixed the issue of a card flashing at the end of card stack when dragging a card to a new position.
  • Todo's:
    1. Move corkboard into my local lyx source code.
    2. (Optional) Add animation effect when adding/removing & dragging and dropping cards.
Edit - History - Print - Recent Changes - All Recent Changes - Search
Page last modified on 2013-07-13 03:37 UTC