#include <vdkfilechooser.h>
Inheritance diagram for VDKFileChooser:
#include <vdk/vdkfilechooser.h> FileStringArray selections; VDKFileChooser* fc = new VDKFileChooser(this, &selections,"File chooser"); // fc->MultiSelection = true; // comment out for multi selection mode fc->AddFilterPattern("All files","*"); fc->AddFilterPattern("C sources","*.c"); fc->AddFilterPattern("CC sources","*.cc"); fc->AddFilterPattern("C/CC headers","*.h"); fc->SetDefaultFilter("All files"); fc->ShowModal(); // returns selections array filled with 1 or more filenames pending // on selection mode (set with MultiSelection property) if(selections.size() == 1) { printf("\nSelected:%s",(char*) selections[0]); fflush(stdout); } else if(selections.size() > 1) { for(int t = 0; t < selections.size(); t++) printf("\nSelected:%s",(char*) selections[t]); fflush(stdout); }
|
Constructor
|
|
Add a filter based on a pattern
|
|
remove <name> filter from filter's list
|
|
set <name> filter as default
|
|
Must be overridden by subclasses, in this method user fills form with useful widgets Implements VDKForm. |
|
sets file chooser mode, can be one of following:
|
|
setting this property to true allow selecting more than one file (false by default) |