Bug 64686 - ability to arbitrarily move and arrange plots on a window
Summary: ability to arbitrarily move and arrange plots on a window
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: RedHat Enterprise Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-21 21:37 UTC by Matthew Truch
Modified: 2004-05-07 22:42 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Truch 2003-09-21 21:37:14 UTC
Version:           0.91 (using KDE KDE 3.1)
Installed from:    RedHat RPMs

Now that when you delete a plot the space remains empty (which I think is a good thing), there should be a "clean up" feature which removes all the blank space and organizes the plots as kst would upon startup.
                                                                                   
Also, one should be able to arbitraily drag plots around on the window, in one of two ways (user selectable): snap to grid (I'm not sure what size grid would be appropriate) and completely arbitrary (aka gridsize == pixelsize).
Comment 1 George Staikos 2003-09-22 06:52:34 UTC
Hm I meant to accept this one, not the other one. 
Comment 2 George Staikos 2003-09-22 06:54:12 UTC
Subject: kdeextragear-2/kst/kst

CVS commit by staikos: 

Add an option to clean up the layout.

CCMAIL: 64686@bugs.kde.org


  M +7 -0      kstview.cpp   1.44
  M +2 -0      kstview.h   1.20


--- kdeextragear-2/kst/kst/kstview.cpp  #1.43:1.44
@@ -109,4 +109,5 @@ KstView::KstView(KstApp *parent, const c
 
   popupmenu->insertItem(i18n("&Delete Plot"), this, SLOT(deleteCurrentPlot()), Key_Delete);
+  popupmenu->insertItem(i18n("Clean Up Layout"), this, SLOT(cleanupLayout()));
 
   _addMenu = new KPopupMenu(this);
@@ -1270,4 +1271,10 @@ void KstView::deleteCurrentPlot() {
     update();
   }
+}
+
+void KstView::cleanupLayout() {
+  needrecreate = true;
+  KST::plotList.arrangePlots(KST::plotList.getPlotCols());
+  update();
 }
 

--- kdeextragear-2/kst/kst/kstview.h  #1.19:1.20
@@ -89,4 +89,6 @@ public slots:
   void printToGraphicsFile(const QString &Filename, int w, int h);
 
+  void cleanupLayout();
+
 public:
   KstMouse *MouseInfo;


Comment 3 George Staikos 2003-09-22 06:57:26 UTC
Note: for future reference, please file separate wishlists in separate reports.  It's 
difficult to track otherwise. 
 
How do you envision the implementation of dragging plots?  In general the mouse is 
already rather used.  Drag does zoom, shift+drag and ctrl+drag do specialized 
zooms, and alt+drag is reserved by KWin.  The only solution I can think of is to add 
another mouse mode.  Is this acceptable?  Is it worth the effort? 
Comment 4 Matthew Truch 2003-09-25 01:15:17 UTC
I was thinking that, from the context menu (right click on a plot), would be the
option "move", and once you select "move", moving the mouse moves the plot.  Any
mouse click after that (left, right, whatever) would leave move-mode.  

However, any way that this would be implimented would be fine, that's just how I
would try to code it (if i had the ability).  
Comment 5 George Staikos 2003-09-25 02:07:54 UTC
Subject: Re:  ability to arbitrarily move and arrange plots on a window

On Wednesday 24 September 2003 19:15, you wrote:
> ------- Additional Comments From matt@truch.net  2003-09-25 01:15 -------
> I was thinking that, from the context menu (right click on a plot), would
> be the option "move", and once you select "move", moving the mouse moves
> the plot.  Any mouse click after that (left, right, whatever) would leave
> move-mode.
>
> However, any way that this would be implimented would be fine, that's just
> how I would try to code it (if i had the ability).

  This is perhaps a bit unorthodox in the KDE world (it's not the way KDE apps 
behave).  It is a possible approach though.  Since it still requires opening 
a menu, I think it might be just as easy to implement another mouse mode.  
Effective a menu item would be another mouse mode, it would just end after 
one action is complete.

Comment 6 Netterfield 2003-09-25 12:25:34 UTC
I think having it drop out of move mode is a bad idea.  Often one move will be followed by another. 
 
What do you think about this: 
 
-Make a new mouse mode (arrow/select) 
(one could attempt to mix it with text mode, but this might be less clear) 
 
-in this mode, grab points appear around the selected plot for resizing; dragging anywhere else 
moves 
(one could decided that plots can only be moved within the grid, but this seems unnecesary.) 
 
-plots can overlap each other.  They are drawn according to their order in the plot list. 
(transparent plots would be hard with the current architecture, and one might want to imbed a small 
plot over a big one) 
 
-performing a 'clean up layout' orders the plots in the plot list according to the location of the top left 
corner, and puts them back on the grid.  If the layout has been edited by hand, then a clean up 
should genereate a confirmation dialog. 
 
Comment 7 George Staikos 2003-09-25 18:39:11 UTC
Subject: Re:  ability to arbitrarily move and arrange plots on a window

On Thursday 25 September 2003 06:25, you wrote:
>  I think having it drop out of move mode is a bad idea.  Often
> one move will be followed by another.

   I agree.

> What do you think about this:
>
> -Make a new mouse mode (arrow/select)
> (one could attempt to mix it with text mode, but this might be less clear)
>
> -in this mode, grab points appear around the selected plot for resizing;
> dragging anywhere else moves
> (one could decided that plots can only be moved within the grid, but this
> seems unnecesary.)
>
> -plots can overlap each other.  They are drawn according to their order in
> the plot list. (transparent plots would be hard with the current
> architecture, and one might want to imbed a small plot over a big one)

   This will require quite some changes in the plot drawing code.  There are 
many assumptions in there.  That being said, I think they might be quite nice 
changes to make.

   The drag and drop code is a bit complicated for this, but as a hack we 
could always grab images of the plot and turn them into canvas objects.  Then 
we could use QCanvas to provide DnD, resizing, etc. 

> -performing a 'clean up layout' orders the plots in the plot list according
> to the location of the top left corner, and puts them back on the grid.  If
> the layout has been edited by hand, then a clean up should genereate a
> confirmation dialog.

   More changes. :-)

Comment 8 George Staikos 2004-05-07 22:42:11 UTC
Well it's basically implemented in CVS-HEAD now.