Skip to main content

App

Struct App 

Source
pub struct App {
Show 47 fields pub db: Database, pub data: AppData, pub timer: Timer, pub tab: FocusTab, pub input_mode: InputMode, pub input_buffer: String, pub input_due_date: String, pub input_tags: String, pub input_number: u32, pub input_priority: Priority, pub input_field: InputField, pub popup: Option<Popup>, pub task_state: ListState, pub settings_state: SettingsState, pub status: Option<String>, pub status_error: bool, pub last_status_set: Instant, pub should_quit: bool, pub theme: Theme, pub theme_catalog: ThemeCatalog, pub icons: IconSet, pub active_task: Option<u64>, pub zen_mode: bool, pub task_filter: TaskFilter, pub active_tag_filter: Option<String>, pub task_search: String, pub searching: bool, pub weekly_chart: Vec<(String, u32)>, pub heatmap_data: Vec<(String, u32)>, pub session_counts: (u32, u32, u32), pub chart_dirty: bool, pub data_version: u64, pub recent_sessions: Vec<StoredSession>, pub stats_session_selected: usize, pub dashboard_task_selected: usize, pub calendar_date: NaiveDate, pub bulk_mode: bool, pub bulk_selected: HashSet<u64>, pub reordering_task: Option<u64>, pub subtask_selected: usize, pub subtask_focus: bool, pub subtask_state: ListState, pub stats_session_page: usize, pub stats_session_total: usize, pub end_warning_shown: bool, pub last_activity: Instant, pub timeline_sessions: Vec<StoredSession>,
}

Fields§

§db: Database§data: AppData§timer: Timer§tab: FocusTab§input_mode: InputMode§input_buffer: String§input_due_date: String§input_tags: String§input_number: u32§input_priority: Priority§input_field: InputField§popup: Option<Popup>§task_state: ListState§settings_state: SettingsState§status: Option<String>§status_error: bool§last_status_set: Instant§should_quit: bool§theme: Theme§theme_catalog: ThemeCatalog§icons: IconSet§active_task: Option<u64>§zen_mode: bool§task_filter: TaskFilter§active_tag_filter: Option<String>§task_search: String§searching: bool§weekly_chart: Vec<(String, u32)>§heatmap_data: Vec<(String, u32)>§session_counts: (u32, u32, u32)§chart_dirty: bool§data_version: u64§recent_sessions: Vec<StoredSession>§stats_session_selected: usize§dashboard_task_selected: usize§calendar_date: NaiveDate§bulk_mode: bool§bulk_selected: HashSet<u64>§reordering_task: Option<u64>§subtask_selected: usize§subtask_focus: bool§subtask_state: ListState§stats_session_page: usize§stats_session_total: usize§end_warning_shown: bool§last_activity: Instant§timeline_sessions: Vec<StoredSession>

Implementations§

Source§

impl App

Source

pub fn settings_visual_row(selected: usize) -> usize

Source

pub fn sync_settings_scroll(&mut self)

Source§

impl App

Source

pub fn handle_key(&mut self, key: KeyEvent)

Source§

impl App

Source

pub fn close_popup(&mut self)

Source

pub fn submit_popup(&mut self)

Source

pub fn confirm_delete(&mut self)

Source§

impl App

Source

pub fn pending_task_ids(&self) -> Vec<u64>

Source

pub fn dashboard_selected_task_id(&self) -> Option<u64>

Source

pub fn pending_task_count(&self) -> u32

Source

pub fn active_task_pending_index(&self) -> Option<u32>

Source

pub fn active_task_progress(&self) -> Option<f64>

Source

pub fn filtered_task_indices(&self) -> Vec<usize>

Source

pub fn dashboard_tasks(&self) -> Vec<&Task>

Source

pub fn set_active_task(&mut self, id: Option<u64>)

Source

pub fn cycle_active_task_status(&mut self)

Source

pub fn cycle_task_status_for(&mut self, id: u64, set_active: bool)

Source

pub fn mark_active_task_done(&mut self)

Source

pub fn start_focus_on_task(&mut self, id: u64)

Source

pub fn cycle_task_filter(&mut self)

Source

pub fn toggle_bulk_mode(&mut self)

Source

pub fn toggle_bulk_item(&mut self)

Source

pub fn clamp_subtask_selection(&mut self)

Source

pub fn sync_subtask_list(&mut self)

Source

pub fn selected_subtask_count(&self) -> usize

Source

pub fn toggle_subtask_focus(&mut self)

Source

pub fn move_subtask_selection(&mut self, delta: i32)

Source

pub fn reset_subtask_selection(&mut self)

Source

pub fn delete_subtask_on_selected(&mut self)

Source

pub fn open_add_subtask(&mut self)

Source

pub fn toggle_subtask_on_selected(&mut self)

Source

pub fn archive_selected_task(&mut self)

Source§

impl App

Source

pub fn end_session(&mut self)

Source

pub fn on_tick(&mut self)

Source

pub fn toggle_timer(&mut self)

Source

pub fn start_timer(&mut self)

Source

pub fn pause_timer(&mut self)

Source

pub fn reset_timer(&mut self)

Source

pub fn cycle_mode(&mut self)

Source

pub fn cycle_timer_preset(&mut self)

Source

pub fn adjust_minutes(&mut self, delta: i32)

Source§

impl App

Source

pub const SESSIONS_PER_PAGE: usize = 15

Source

pub fn new() -> Result<Self>

Source

pub fn apply_theme(&mut self, id: &str)

Source

pub fn queue_empty(&self) -> bool

Source

pub fn daily_goal_met(&self) -> bool

Source

pub fn tick_rate(&self) -> Duration

Source

pub fn window_title(&self) -> String

Source

pub fn bump_data(&mut self)

Source

pub fn refresh_chart_if_needed(&mut self)

Source

pub fn reload_heatmap(&mut self)

Source

pub fn hint(&self) -> String

Source

pub fn set_status(&mut self, msg: impl Into<String>, error: bool)

Source

pub fn export_backup(&mut self)

Source

pub fn open_add_task(&mut self)

Source

pub fn open_edit_task(&mut self)

Source

pub fn open_confirm_delete(&mut self)

Source

pub fn cycle_tag_filter(&mut self)

Source

pub fn selected_task_id(&self) -> Option<u64>

Auto Trait Implementations§

§

impl !Freeze for App

§

impl !RefUnwindSafe for App

§

impl !Sync for App

§

impl !UnwindSafe for App

§

impl Send for App

§

impl Unpin for App

§

impl UnsafeUnpin for App

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more