Documentation/Source/eric6.ViewManager.ViewManager.html

changeset 6052
8b49d3e0b4c8
parent 6032
5f80be18bcd7
child 6123
39cd368143db
equal deleted inserted replaced
6051:6e09a9a73cb7 6052:8b49d3e0b4c8
775 <td>Public method to get references to all open editors.</td> 775 <td>Public method to get references to all open editors.</td>
776 </tr><tr> 776 </tr><tr>
777 <td><a href="#ViewManager.getOpenEditorsCount">getOpenEditorsCount</a></td> 777 <td><a href="#ViewManager.getOpenEditorsCount">getOpenEditorsCount</a></td>
778 <td>Public method to get the number of open editors.</td> 778 <td>Public method to get the number of open editors.</td>
779 </tr><tr> 779 </tr><tr>
780 <td><a href="#ViewManager.getOpenEditorsForSession">getOpenEditorsForSession</a></td>
781 <td>Public method to get a lists of all open editors.</td>
782 </tr><tr>
780 <td><a href="#ViewManager.getOpenFilenames">getOpenFilenames</a></td> 783 <td><a href="#ViewManager.getOpenFilenames">getOpenFilenames</a></td>
781 <td>Public method returning a list of the filenames of all editors.</td> 784 <td>Public method returning a list of the filenames of all editors.</td>
782 </tr><tr> 785 </tr><tr>
783 <td><a href="#ViewManager.getSRHistory">getSRHistory</a></td> 786 <td><a href="#ViewManager.getSRHistory">getSRHistory</a></td>
784 <td>Public method to get the search or replace history list.</td> 787 <td>Public method to get the search or replace history list.</td>
884 </tr><tr> 887 </tr><tr>
885 <td><a href="#ViewManager.receive">receive</a></td> 888 <td><a href="#ViewManager.receive">receive</a></td>
886 <td>Public slot to handle received editor commands.</td> 889 <td>Public slot to handle received editor commands.</td>
887 </tr><tr> 890 </tr><tr>
888 <td><a href="#ViewManager.removeSplit">removeSplit</a></td> 891 <td><a href="#ViewManager.removeSplit">removeSplit</a></td>
889 <td>Public method used to remove the current split view.</td> 892 <td>Public method used to remove the current split view or a split view by index.</td>
890 </tr><tr> 893 </tr><tr>
891 <td><a href="#ViewManager.replaceWidget">replaceWidget</a></td> 894 <td><a href="#ViewManager.replaceWidget">replaceWidget</a></td>
892 <td>Public method to get a reference to the replace widget.</td> 895 <td>Public method to get a reference to the replace widget.</td>
893 </tr><tr> 896 </tr><tr>
894 <td><a href="#ViewManager.saveAllEditors">saveAllEditors</a></td> 897 <td><a href="#ViewManager.saveAllEditors">saveAllEditors</a></td>
940 <td>Public method to set some references needed later on.</td> 943 <td>Public method to set some references needed later on.</td>
941 </tr><tr> 944 </tr><tr>
942 <td><a href="#ViewManager.setSbInfo">setSbInfo</a></td> 945 <td><a href="#ViewManager.setSbInfo">setSbInfo</a></td>
943 <td>Public method to transfer statusbar info from the user interface to viewmanager.</td> 946 <td>Public method to transfer statusbar info from the user interface to viewmanager.</td>
944 </tr><tr> 947 </tr><tr>
948 <td><a href="#ViewManager.setSplitCount">setSplitCount</a></td>
949 <td>Public method to set the number of split views.</td>
950 </tr><tr>
945 <td><a href="#ViewManager.setSplitOrientation">setSplitOrientation</a></td> 951 <td><a href="#ViewManager.setSplitOrientation">setSplitOrientation</a></td>
946 <td>Public method used to set the orientation of the split view.</td> 952 <td>Public method used to set the orientation of the split view.</td>
947 </tr><tr> 953 </tr><tr>
948 <td><a href="#ViewManager.shareConnected">shareConnected</a></td> 954 <td><a href="#ViewManager.shareConnected">shareConnected</a></td>
949 <td>Public slot to handle a change of the connected state.</td> 955 <td>Public slot to handle a change of the connected state.</td>
963 <td><a href="#ViewManager.showSearchWidget">showSearchWidget</a></td> 969 <td><a href="#ViewManager.showSearchWidget">showSearchWidget</a></td>
964 <td>Public method to show the search widget.</td> 970 <td>Public method to show the search widget.</td>
965 </tr><tr> 971 </tr><tr>
966 <td><a href="#ViewManager.showWindowMenu">showWindowMenu</a></td> 972 <td><a href="#ViewManager.showWindowMenu">showWindowMenu</a></td>
967 <td>Public method to set up the viewmanager part of the Window menu.</td> 973 <td>Public method to set up the viewmanager part of the Window menu.</td>
974 </tr><tr>
975 <td><a href="#ViewManager.splitCount">splitCount</a></td>
976 <td>Public method to get the number of split views.</td>
968 </tr><tr> 977 </tr><tr>
969 <td><a href="#ViewManager.startSharedEdit">startSharedEdit</a></td> 978 <td><a href="#ViewManager.startSharedEdit">startSharedEdit</a></td>
970 <td>Public slot to start a shared edit session for the current editor.</td> 979 <td>Public slot to start a shared edit session for the current editor.</td>
971 </tr><tr> 980 </tr><tr>
972 <td><a href="#ViewManager.textForFind">textForFind</a></td> 981 <td><a href="#ViewManager.textForFind">textForFind</a></td>
1921 <dd> 1930 <dd>
1922 zoom value to be set (integer) 1931 zoom value to be set (integer)
1923 </dd> 1932 </dd>
1924 </dl><a NAME="ViewManager._addView" ID="ViewManager._addView"></a> 1933 </dl><a NAME="ViewManager._addView" ID="ViewManager._addView"></a>
1925 <h4>ViewManager._addView</h4> 1934 <h4>ViewManager._addView</h4>
1926 <b>_addView</b>(<i>win, fn=None, noName="", addNext=False</i>) 1935 <b>_addView</b>(<i>win, fn=None, noName="", addNext=False, indexes=None</i>)
1927 <p> 1936 <p>
1928 Protected method to add a view (i.e. window). 1937 Protected method to add a view (i.e. window).
1929 </p><dl> 1938 </p><dl>
1930 <dt><i>win</i></dt> 1939 <dt><i>win</i> (EditorAssembly)</dt>
1931 <dd> 1940 <dd>
1932 editor assembly to be added 1941 editor assembly to be added
1933 </dd><dt><i>fn</i></dt> 1942 </dd><dt><i>fn</i> (str)</dt>
1934 <dd> 1943 <dd>
1935 filename of this editor 1944 filename of this editor
1936 </dd><dt><i>noName</i></dt> 1945 </dd><dt><i>noName</i> (str)</dt>
1937 <dd> 1946 <dd>
1938 name to be used for an unnamed editor (string) 1947 name to be used for an unnamed editor
1939 </dd><dt><i>addNext</i></dt> 1948 </dd><dt><i>addNext</i> (bool)</dt>
1940 <dd> 1949 <dd>
1941 flag indicating to add the view next to the current 1950 flag indicating to add the view next to the current
1942 view (bool) 1951 view
1952 </dd><dt><i>indexes</i> (tuple of two int)</dt>
1953 <dd>
1954 of the editor, first the split view index, second the
1955 index within the view
1943 </dd> 1956 </dd>
1944 </dl><dl> 1957 </dl><dl>
1945 <dt>Raises <b>RuntimeError</b>:</dt> 1958 <dt>Raises <b>RuntimeError</b>:</dt>
1946 <dd> 1959 <dd>
1947 Not implemented 1960 Not implemented
2390 <dd> 2403 <dd>
2391 filename of active window (string) 2404 filename of active window (string)
2392 </dd> 2405 </dd>
2393 </dl><a NAME="ViewManager.getEditor" ID="ViewManager.getEditor"></a> 2406 </dl><a NAME="ViewManager.getEditor" ID="ViewManager.getEditor"></a>
2394 <h4>ViewManager.getEditor</h4> 2407 <h4>ViewManager.getEditor</h4>
2395 <b>getEditor</b>(<i>fn, filetype="", addNext=False</i>) 2408 <b>getEditor</b>(<i>fn, filetype="", addNext=False, indexes=None</i>)
2396 <p> 2409 <p>
2397 Public method to return the editor displaying the given file. 2410 Public method to return the editor displaying the given file.
2398 </p><p> 2411 </p><p>
2399 If there is no editor with the given file, a new editor window is 2412 If there is no editor with the given file, a new editor window is
2400 created. 2413 created.
2401 </p><dl> 2414 </p><dl>
2402 <dt><i>fn</i></dt> 2415 <dt><i>fn</i> (str)</dt>
2403 <dd> 2416 <dd>
2404 filename to look for 2417 filename to look for
2405 </dd><dt><i>filetype</i></dt> 2418 </dd><dt><i>filetype</i> (str)</dt>
2406 <dd> 2419 <dd>
2407 type of the source file (string) 2420 type of the source file
2408 </dd><dt><i>addNext</i></dt> 2421 </dd><dt><i>addNext</i> (bool)</dt>
2409 <dd> 2422 <dd>
2410 flag indicating that if a new editor needs to be 2423 flag indicating that if a new editor needs to be
2411 created, it should be added next to the current editor (bool) 2424 created, it should be added next to the current editor
2425 </dd><dt><i>indexes</i> (tuple of two int)</dt>
2426 <dd>
2427 of the editor, first the split view index, second the
2428 index within the view
2412 </dd> 2429 </dd>
2413 </dl><dl> 2430 </dl><dl>
2414 <dt>Returns:</dt> 2431 <dt>Returns:</dt>
2415 <dd> 2432 <dd>
2416 tuple of two values giving a flag indicating a new window 2433 tuple of two values giving a flag indicating a new window
2417 creation and a reference to the editor displaying this file 2434 creation and a reference to the editor displaying this file
2435 </dd>
2436 </dl><dl>
2437 <dt>Return Type:</dt>
2438 <dd>
2439 tuple of (bool, Editor)
2418 </dd> 2440 </dd>
2419 </dl><a NAME="ViewManager.getMostRecent" ID="ViewManager.getMostRecent"></a> 2441 </dl><a NAME="ViewManager.getMostRecent" ID="ViewManager.getMostRecent"></a>
2420 <h4>ViewManager.getMostRecent</h4> 2442 <h4>ViewManager.getMostRecent</h4>
2421 <b>getMostRecent</b>(<i></i>) 2443 <b>getMostRecent</b>(<i></i>)
2422 <p> 2444 <p>
2485 Public method to get the number of open editors. 2507 Public method to get the number of open editors.
2486 </p><dl> 2508 </p><dl>
2487 <dt>Returns:</dt> 2509 <dt>Returns:</dt>
2488 <dd> 2510 <dd>
2489 number of open editors (integer) 2511 number of open editors (integer)
2512 </dd>
2513 </dl><a NAME="ViewManager.getOpenEditorsForSession" ID="ViewManager.getOpenEditorsForSession"></a>
2514 <h4>ViewManager.getOpenEditorsForSession</h4>
2515 <b>getOpenEditorsForSession</b>(<i></i>)
2516 <p>
2517 Public method to get a lists of all open editors.
2518 </p><p>
2519 The returned list contains one list per split view. If the view manager
2520 cannot split the view, only one list of editors is returned.
2521 </p><p>
2522 Note: This method should be implemented by subclasses.
2523 </p><dl>
2524 <dt>Returns:</dt>
2525 <dd>
2526 list of list of editor references
2527 </dd>
2528 </dl><dl>
2529 <dt>Return Type:</dt>
2530 <dd>
2531 list of list of Editor
2490 </dd> 2532 </dd>
2491 </dl><a NAME="ViewManager.getOpenFilenames" ID="ViewManager.getOpenFilenames"></a> 2533 </dl><a NAME="ViewManager.getOpenFilenames" ID="ViewManager.getOpenFilenames"></a>
2492 <h4>ViewManager.getOpenFilenames</h4> 2534 <h4>ViewManager.getOpenFilenames</h4>
2493 <b>getOpenFilenames</b>(<i></i>) 2535 <b>getOpenFilenames</b>(<i></i>)
2494 <p> 2536 <p>
2746 <b>newEditor</b>(<i></i>) 2788 <b>newEditor</b>(<i></i>)
2747 <p> 2789 <p>
2748 Public slot to generate a new empty editor. 2790 Public slot to generate a new empty editor.
2749 </p><a NAME="ViewManager.newEditorView" ID="ViewManager.newEditorView"></a> 2791 </p><a NAME="ViewManager.newEditorView" ID="ViewManager.newEditorView"></a>
2750 <h4>ViewManager.newEditorView</h4> 2792 <h4>ViewManager.newEditorView</h4>
2751 <b>newEditorView</b>(<i>fn, caller, filetype=""</i>) 2793 <b>newEditorView</b>(<i>fn, caller, filetype="", indexes=None</i>)
2752 <p> 2794 <p>
2753 Public method to create a new editor displaying the given document. 2795 Public method to create a new editor displaying the given document.
2754 </p><dl> 2796 </p><dl>
2755 <dt><i>fn</i></dt> 2797 <dt><i>fn</i> (str)</dt>
2756 <dd> 2798 <dd>
2757 filename of this view 2799 filename of this view
2758 </dd><dt><i>caller</i></dt> 2800 </dd><dt><i>caller</i> (Editor)</dt>
2759 <dd> 2801 <dd>
2760 reference to the editor calling this method 2802 reference to the editor calling this method
2761 </dd><dt><i>filetype</i></dt> 2803 </dd><dt><i>filetype</i> (str)</dt>
2762 <dd> 2804 <dd>
2763 type of the source file (string) 2805 type of the source file
2806 </dd><dt><i>indexes</i> (tuple of two int)</dt>
2807 <dd>
2808 of the editor, first the split view index, second the
2809 index within the view
2810 </dd>
2811 </dl><dl>
2812 <dt>Returns:</dt>
2813 <dd>
2814 reference to the new editor object
2815 </dd>
2816 </dl><dl>
2817 <dt>Return Type:</dt>
2818 <dd>
2819 Editor
2764 </dd> 2820 </dd>
2765 </dl><a NAME="ViewManager.nextSplit" ID="ViewManager.nextSplit"></a> 2821 </dl><a NAME="ViewManager.nextSplit" ID="ViewManager.nextSplit"></a>
2766 <h4>ViewManager.nextSplit</h4> 2822 <h4>ViewManager.nextSplit</h4>
2767 <b>nextSplit</b>(<i></i>) 2823 <b>nextSplit</b>(<i></i>)
2768 <p> 2824 <p>
2777 <dd> 2833 <dd>
2778 name of file to be opened (string) 2834 name of file to be opened (string)
2779 </dd> 2835 </dd>
2780 </dl><a NAME="ViewManager.openSourceFile" ID="ViewManager.openSourceFile"></a> 2836 </dl><a NAME="ViewManager.openSourceFile" ID="ViewManager.openSourceFile"></a>
2781 <h4>ViewManager.openSourceFile</h4> 2837 <h4>ViewManager.openSourceFile</h4>
2782 <b>openSourceFile</b>(<i>fn, lineno=-1, filetype="", selStart=0, selEnd=0, pos=0, addNext=False</i>) 2838 <b>openSourceFile</b>(<i>fn, lineno=-1, filetype="", selStart=0, selEnd=0, pos=0, addNext=False, indexes=None</i>)
2783 <p> 2839 <p>
2784 Public slot to display a file in an editor. 2840 Public slot to display a file in an editor.
2785 </p><dl> 2841 </p><dl>
2786 <dt><i>fn</i></dt> 2842 <dt><i>fn</i> (str)</dt>
2787 <dd> 2843 <dd>
2788 name of file to be opened (string) 2844 name of file to be opened
2789 </dd><dt><i>lineno</i></dt> 2845 </dd><dt><i>lineno</i> (int or list of int)</dt>
2790 <dd> 2846 <dd>
2791 line number to place the cursor at (integer) or 2847 line number to place the cursor at or list of line
2792 list of line numbers (list of integers) (cursor will be 2848 numbers (cursor will be placed at the next line greater than
2793 placed at the next line greater than the current one) 2849 the current one)
2794 </dd><dt><i>filetype</i></dt> 2850 </dd><dt><i>filetype</i> (str)</dt>
2795 <dd> 2851 <dd>
2796 type of the source file (string) 2852 type of the source file
2797 </dd><dt><i>selStart</i></dt> 2853 </dd><dt><i>selStart</i> (int)</dt>
2798 <dd> 2854 <dd>
2799 start of an area to be selected (integer) 2855 start of an area to be selected
2800 </dd><dt><i>selEnd</i></dt> 2856 </dd><dt><i>selEnd</i> (int)</dt>
2801 <dd> 2857 <dd>
2802 end of an area to be selected (integer) 2858 end of an area to be selected
2803 </dd><dt><i>pos</i></dt> 2859 </dd><dt><i>pos</i> (int)</dt>
2804 <dd> 2860 <dd>
2805 position within the line to place the cursor at (integer) 2861 position within the line to place the cursor at
2806 </dd><dt><i>addNext</i></dt> 2862 </dd><dt><i>addNext</i> (bool)</dt>
2807 <dd> 2863 <dd>
2808 flag indicating to add the file next to the current 2864 flag indicating to add the file next to the current
2809 editor (bool) 2865 editor
2866 </dd><dt><i>indexes</i> (tuple of two int)</dt>
2867 <dd>
2868 of the editor, first the split view index, second the
2869 index within the view
2870 </dd>
2871 </dl><dl>
2872 <dt>Returns:</dt>
2873 <dd>
2874 reference to the opened editor
2875 </dd>
2876 </dl><dl>
2877 <dt>Return Type:</dt>
2878 <dd>
2879 Editor
2810 </dd> 2880 </dd>
2811 </dl><a NAME="ViewManager.preferencesChanged" ID="ViewManager.preferencesChanged"></a> 2881 </dl><a NAME="ViewManager.preferencesChanged" ID="ViewManager.preferencesChanged"></a>
2812 <h4>ViewManager.preferencesChanged</h4> 2882 <h4>ViewManager.preferencesChanged</h4>
2813 <b>preferencesChanged</b>(<i></i>) 2883 <b>preferencesChanged</b>(<i></i>)
2814 <p> 2884 <p>
2891 <dd> 2961 <dd>
2892 command string (string) 2962 command string (string)
2893 </dd> 2963 </dd>
2894 </dl><a NAME="ViewManager.removeSplit" ID="ViewManager.removeSplit"></a> 2964 </dl><a NAME="ViewManager.removeSplit" ID="ViewManager.removeSplit"></a>
2895 <h4>ViewManager.removeSplit</h4> 2965 <h4>ViewManager.removeSplit</h4>
2896 <b>removeSplit</b>(<i></i>) 2966 <b>removeSplit</b>(<i>index=-1</i>)
2897 <p> 2967 <p>
2898 Public method used to remove the current split view. 2968 Public method used to remove the current split view or a split view
2899 </p><dl> 2969 by index.
2900 <dt>Returns:</dt> 2970 </p><dl>
2901 <dd> 2971 <dt><i>index</i> (int)</dt>
2902 Flag indicating successful deletion 2972 <dd>
2973 index of the split to be removed (-1 means to
2974 delete the current split)
2975 </dd>
2976 </dl><dl>
2977 <dt>Returns:</dt>
2978 <dd>
2979 flag indicating successful deletion
2980 </dd>
2981 </dl><dl>
2982 <dt>Return Type:</dt>
2983 <dd>
2984 bool
2903 </dd> 2985 </dd>
2904 </dl><a NAME="ViewManager.replaceWidget" ID="ViewManager.replaceWidget"></a> 2986 </dl><a NAME="ViewManager.replaceWidget" ID="ViewManager.replaceWidget"></a>
2905 <h4>ViewManager.replaceWidget</h4> 2987 <h4>ViewManager.replaceWidget</h4>
2906 <b>replaceWidget</b>(<i></i>) 2988 <b>replaceWidget</b>(<i></i>)
2907 <p> 2989 <p>
3116 (QLabel) 3198 (QLabel)
3117 </dd><dt><i>sbZoom</i></dt> 3199 </dd><dt><i>sbZoom</i></dt>
3118 <dd> 3200 <dd>
3119 reference to the zoom widget (E5ZoomWidget) 3201 reference to the zoom widget (E5ZoomWidget)
3120 </dd> 3202 </dd>
3203 </dl><a NAME="ViewManager.setSplitCount" ID="ViewManager.setSplitCount"></a>
3204 <h4>ViewManager.setSplitCount</h4>
3205 <b>setSplitCount</b>(<i>count</i>)
3206 <p>
3207 Public method to set the number of split views.
3208 </p><dl>
3209 <dt><i>count</i> (int)</dt>
3210 <dd>
3211 number of split views
3212 </dd>
3121 </dl><a NAME="ViewManager.setSplitOrientation" ID="ViewManager.setSplitOrientation"></a> 3213 </dl><a NAME="ViewManager.setSplitOrientation" ID="ViewManager.setSplitOrientation"></a>
3122 <h4>ViewManager.setSplitOrientation</h4> 3214 <h4>ViewManager.setSplitOrientation</h4>
3123 <b>setSplitOrientation</b>(<i>orientation</i>) 3215 <b>setSplitOrientation</b>(<i>orientation</i>)
3124 <p> 3216 <p>
3125 Public method used to set the orientation of the split view. 3217 Public method used to set the orientation of the split view.
3196 </dl><dl> 3288 </dl><dl>
3197 <dt>Raises <b>RuntimeError</b>:</dt> 3289 <dt>Raises <b>RuntimeError</b>:</dt>
3198 <dd> 3290 <dd>
3199 Not implemented 3291 Not implemented
3200 </dd> 3292 </dd>
3293 </dl><a NAME="ViewManager.splitCount" ID="ViewManager.splitCount"></a>
3294 <h4>ViewManager.splitCount</h4>
3295 <b>splitCount</b>(<i></i>)
3296 <p>
3297 Public method to get the number of split views.
3298 </p><dl>
3299 <dt>Returns:</dt>
3300 <dd>
3301 number of split views
3302 </dd>
3303 </dl><dl>
3304 <dt>Return Type:</dt>
3305 <dd>
3306 int
3307 </dd>
3201 </dl><a NAME="ViewManager.startSharedEdit" ID="ViewManager.startSharedEdit"></a> 3308 </dl><a NAME="ViewManager.startSharedEdit" ID="ViewManager.startSharedEdit"></a>
3202 <h4>ViewManager.startSharedEdit</h4> 3309 <h4>ViewManager.startSharedEdit</h4>
3203 <b>startSharedEdit</b>(<i></i>) 3310 <b>startSharedEdit</b>(<i></i>)
3204 <p> 3311 <p>
3205 Public slot to start a shared edit session for the current editor. 3312 Public slot to start a shared edit session for the current editor.

eric ide

mercurial