Actively Q-switched all-fiber laser with an electrically controlled microstructured fiber.