GnuCash 038f90a+
Loading...
Searching...
No Matches
Public Member Functions
PageTransDeets Class Reference

Transaction Details page. More...

Public Member Functions

 PageTransDeets (GtkBuilder *builder)
 
time64 get_date_time ()
 
const char * get_description ()
 
void connect (StockAssistantModel *)
 
void prepare (StockAssistantModel *)
 

Detailed Description

Transaction Details page.

Collects the transaction date (changing of which may trigger the model to run maybe_change_txn_types if the balance on the new date is different from the balance on the prior or default date) and the transaction description.

Definition at line 1841 of file assistant-stock-transaction.cpp.

Constructor & Destructor Documentation

◆ PageTransDeets()

PageTransDeets::PageTransDeets ( GtkBuilder *  builder)

Definition at line 1855 of file assistant-stock-transaction.cpp.

1855 :
1856 m_page (get_widget (builder, "transaction_details_page")),
1857 m_date (builder),
1858 m_description (get_widget (builder, "transaction_description_entry"))
1859{
1860 m_date.attach(builder, "transaction_details_table", "transaction_date_label", 0);
1861}

Member Function Documentation

◆ connect()

void PageTransDeets::connect ( StockAssistantModel model)

Definition at line 1864 of file assistant-stock-transaction.cpp.

1865{
1866 m_date.connect(G_CALLBACK (stock_assistant_model_date_changed_cb),
1867 static_cast<void*>(model));
1868 g_signal_connect(m_description, "changed",
1869 G_CALLBACK (stock_assistant_model_description_changed_cb),
1870 static_cast<void*>(model));
1871}

◆ get_date_time()

time64 PageTransDeets::get_date_time ( )
inline

Definition at line 1849 of file assistant-stock-transaction.cpp.

1849{ return m_date.get_date_time(); }

◆ get_description()

const char * PageTransDeets::get_description ( )
inline

Definition at line 1850 of file assistant-stock-transaction.cpp.

1850{ return gtk_entry_get_text (GTK_ENTRY (m_description)); }

◆ prepare()

void PageTransDeets::prepare ( StockAssistantModel model)

Definition at line 1874 of file assistant-stock-transaction.cpp.

1875{
1876 model->set_transaction_date(get_date_time());
1877 model->set_transaction_desc(get_description());
1878 g_signal_connect(m_page, "focus", G_CALLBACK(assistant_page_set_focus), m_description);
1879}
void set_transaction_desc(const char *desc)
Setter.
void set_transaction_date(time64 date)
Setter.

The documentation for this class was generated from the following file: