Changeset View
Changeset View
Standalone View
Standalone View
kate/session/katesessionmanagedialog.h
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 52 | protected Q_SLOTS: | |||
---|---|---|---|---|---|
122 | void updateSessionList(); | 122 | void updateSessionList(); | ||
123 | 123 | | |||
124 | /** | 124 | /** | ||
125 | * To enable/disable not useful buttons | 125 | * To enable/disable not useful buttons | ||
126 | */ | 126 | */ | ||
127 | void dontAskToggled(); | 127 | void dontAskToggled(); | ||
128 | 128 | | |||
129 | /** | 129 | /** | ||
130 | * To change the sort order of the session list | | |||
131 | */ | | |||
132 | void changeSortOrder(); | | |||
133 | | ||||
134 | /** | | |||
135 | * Slot for @c m_filterField | 130 | * Slot for @c m_filterField | ||
136 | */ | 131 | */ | ||
137 | void filterChanged(); | 132 | void filterChanged(); | ||
138 | 133 | | |||
139 | private: | 134 | private: | ||
140 | /** | 135 | /** | ||
141 | * Result codes used to call @c done() | 136 | * Result codes used to call @c done() | ||
142 | */ | 137 | */ | ||
143 | enum ResultCode { | 138 | enum ResultCode { | ||
144 | ResultQuit = QDialog::Rejected, | 139 | ResultQuit = QDialog::Rejected, | ||
145 | ResultOpen, | 140 | ResultOpen, | ||
146 | ResultNew, | 141 | ResultNew, | ||
147 | }; | 142 | }; | ||
148 | 143 | | |||
149 | /** | 144 | /** | ||
150 | * Sort order of the session list | | |||
151 | */ | | |||
152 | enum SortOrder { | | |||
153 | SortAlphabetical, | | |||
154 | SortChronological, | | |||
155 | }; | | |||
156 | | ||||
157 | /** | | |||
158 | * Re-implemented to avoid crash when in edit state | 145 | * Re-implemented to avoid crash when in edit state | ||
159 | */ | 146 | */ | ||
160 | void closeEvent(QCloseEvent *event) override; | 147 | void closeEvent(QCloseEvent *event) override; | ||
161 | 148 | | |||
162 | /** | 149 | /** | ||
163 | * Disables all buttons on the "normal" button stack page and the close button | 150 | * Disables all buttons on the "normal" button stack page and the close button | ||
164 | */ | 151 | */ | ||
165 | void disableButtons(); | 152 | void disableButtons(); | ||
Show All 23 Lines | |||||
189 | * The item which is currently edited by the user or @c nullptr to indicate | 176 | * The item which is currently edited by the user or @c nullptr to indicate | ||
190 | * that nothing is on edit. | 177 | * that nothing is on edit. | ||
191 | */ | 178 | */ | ||
192 | KateSessionChooserItem *m_editByUser = nullptr; | 179 | KateSessionChooserItem *m_editByUser = nullptr; | ||
193 | 180 | | |||
194 | /** | 181 | /** | ||
195 | * Used by @c updateSessionList() to choose a new current item | 182 | * Used by @c updateSessionList() to choose a new current item | ||
196 | */ | 183 | */ | ||
197 | QString m_prefferedSession; | 184 | QString m_preferredSession; | ||
198 | | ||||
199 | /** | | |||
200 | * How the list of sessions has to be ordered | | |||
201 | */ | | |||
202 | int m_sortOrder = SortChronological; | | |||
203 | 185 | | |||
204 | /** | 186 | /** | ||
205 | * Used in dtor to do some savings or not | 187 | * Used in dtor to do some savings or not | ||
206 | */ | 188 | */ | ||
207 | bool m_chooserMode = false; | 189 | bool m_chooserMode = false; | ||
208 | 190 | | |||
209 | /** | 191 | /** | ||
210 | * Will filled with sessions to be deleted by @c updateDeleteList() and process | 192 | * Will filled with sessions to be deleted by @c updateDeleteList() and process | ||
211 | * by @c deleteSessions() | 193 | * by @c deleteSessions() | ||
212 | */ | 194 | */ | ||
213 | QSet<KateSession::Ptr> m_deleteList; | 195 | QSet<KateSession::Ptr> m_deleteList; | ||
214 | }; | 196 | }; | ||
215 | 197 | | |||
216 | #endif | 198 | #endif |